Skip to content

fix(agc): bind the sample order depth set after its pipeline - #9503

Merged
oneandonlydean merged 2 commits into
boykopovar:mainfrom
JJenkx:windows/sample-order-bind-after-pipeline
Nov 15, 2026
Merged

oneandonlydean merged 2 commits into
boykopovar:mainfrom
JJenkx:windows/sample-order-bind-after-pipeline

Conversation

@JJenkx

@JJenkx JJenkx commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What

SampleOrders::Depth bound its sampled-image descriptor set once, after vkCmdBeginRenderPass and before any pipeline. Each draw then bound its own pipeline. On AMD's Windows driver, the first draw's pixel shader read its image descriptor from address 0x200000000, and the device was lost. agc_driver_sample_order_grid_reference fails on that driver with:

[device-fault] result 0: GPU fault
[device-fault] read invalid at 0x200000000 (precision 0x1000)
AGC graphics: vkQueueSubmit recorder: Vulkan result -4

Radeon GPU Detective 1.6.3.7 places the page fault in the sample order pixel shader:

  • The in-progress marker is the depth reorder draw (Draw(VertexCount=3)).
  • The faulting instruction is the first image descriptor load, s_load_dwordx8 s[12:19], s[0:1]. Its address is built as s0 = s7, s1 = 0x2, so the shader received a descriptor set address of 0.

How I narrowed it down, on that device, with local switches that are not in this PR:

  • Skipping the colour storage reorder: still faults.
  • Skipping the depth reorder: no fault.
  • Within the depth reorder, skipping the image copy: still faults. Skipping the draw: no fault.
  • Writing binding 1 as well: still faults.
  • Dropping the render pass sample locations, or every sample location state of the pass: still faults.
  • Binding the set after the pipeline: no fault.

The set is now bound right after each pipeline, inside draw. The Vulkan rules allow the old order, since the layout is the same object. Binding after the pipeline is equivalent and avoids this driver's behaviour.

Tested

Windows 11 Enterprise 10.0.22621, AMD Radeon RX 6700 XT, AMD proprietary driver 26.10.1 (Adrenalin 25.10.45.16), WinLibs GCC 15.2 UCRT, Release. Base main a6dcea9; #8310's test change is applied locally so that MinGW builds it. Each test was run 10 times one after another:

test main this PR this PR + #9056
agc_driver_sample_order_grid_reference 0/10 (device lost, above) 0/10, now at the depth check: the composite of uniform renders: sample 0 of pixel (0, 0) holds depth 1.08e33 10/10
agc_driver_sample_order 0/10 0/10 (depth readback, #9056's subject) 10/10
agc_driver_sample_order_recipe_depth_locations 0/10 0/10 (same) 10/10

With this PR and #9056, the full suite passes 1872 of 1875. The 3 that fail:

tools/check_conventions.py passes.

The RGD text summary and the full ctest log are kept locally. I can attach them on request.

Additional independent evidence (2026-10-24)

brummilab reports three runs per variant on main 60465afd3ac4, AMD Radeon RX 6600 XT (Navi 23), driver 32.0.21045.16010, Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release. This PR uses head ba1a4d0cd; #9056 uses 53949c077.

Variant sample order grid reference recipe depth locations planning
main fails GPU fault/device lost fails passes
#9056 only passes fails passes passes
this PR only fails fails fails passes
#9056 + this PR passes passes passes passes

The reporter obtained the same result in all three runs. These are attributed independent observations, not locally reproduced; validation layers were not enabled. They add a second device/driver observation and do not replace the earlier validation-layer comparison or establish title performance. The author of the original descriptor bind confirms that binding after each pipeline is the intended equivalent ordering.

The agreed ordering with #9508 is recorded on the dependency checklist below. A fresh focused validation comparison against the then-current main remains outstanding; these peer tests use their stated pinned base, and Windows is currently user-paused.

Fresh Linux current-main comparison (2026-10-24)

Head 24f5d3aaab5274bb9510c7b0721508b5569ec8f0 merges main b930da950d5d076c19d8e6a025805f3799cadbc5 into the original branch. The only main/change production difference is the descriptor-bind reorder. Both full focused targets rebuilt on the same Ryzen 9 7950X / Radeon RX 6650 XT (RADV NAVI23), Mesa 26.2.4, Linux 7.2.9, GCC 16.2.1 Release.

agc_driver_sample_order, _grid_reference, _recipe_depth_locations, and _planning pass 4/4 on main and 4/4 on the change, without skips. Each ran separately with ctest -V, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 MESA_SHADER_CACHE_DISABLE=true VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, explicit layer path/RADV ICD and loader diagnostics. All six physical test logs confirm actual Khronos insertion. Planning is a mock test and does not supply physical validation coverage.

This is not validation-clean: both arms log VUID-VkWriteDescriptorSet-descriptorType-00337 (sampled image view lacks sampled usage). The VUID identifier appears 6 / 14 / 12 times respectively in the sample-order / grid-reference / recipe-depth logs on each build; planning has zero. These are log occurrences, not a count of distinct error messages. No new VUID type or increased occurrence count, missing-layer warning, device loss or timeout appears. No #9056/#9057 changes are folded in. This is Linux unit evidence; it does not reproduce the AMD Windows device loss, replace the older Windows reports or claim title/FPS improvement. Windows remains user-paused.

Fresh build/test logs, JUnit, exact patch and comparison runner, SHA256 8bbc77d4a48811cd5dcb042aad1b9fc53af89a63a74d21a1b7768c0074734337.

Current Linux qualification — 2026-10-29

Refreshed head 1b8af30a2bac5fa1f3b6800599b46726adb2fc21 integrates pinned main 5454cd2e455994d992aca39335ce60507eeda1eb.

The descriptor bind remains after pipeline binding inside the draw callback. The existing agreement is #9503 first, then #9508’s author refreshes its descriptor-heap integration. A fresh manual hunk review confirms #9508 must move its heap-aware bind accordingly. The automated overlap fetch failed with unresolved deltas; this is recorded rather than reported as a clean automated overlap audit. No fresh negative control or affected-AMD-GPU reproduction is claimed.

Fresh matched Linux Release builds on AMD Radeon RX6650XT / RADV, with SPIRV-Tools enabled: main 12 passes and change 12 passes (three repetitions of each focused group), zero skips and zero VUIDs. Actual Khronos validation-layer instance insertions are 9 on main and 9 on the change. CPU-only groups are not counted as GPU coverage. Conventions, whitespace and submodule-pointer checks pass. Later-main merge previews were clean; those preview trees were not executed. Every GPU harness used the shared reservation and launch queue.

Evidence: raw logs, JUnit and source receipts; SHA-256 6a2fabb6619b69017f29fc3ce403661c6fb4fbd899869c6a82a6ed62920ab48d. Queue and cleanup receipts. Current overlap audit, including fetch failure. No new Windows, macOS, native-title or performance qualification is claimed. Earlier measurements retain their original source pins.

AI-assisted: yes (Codex).

Current qualification — 2026-10-30

Integrated the one-line topic onto main 08a10d225306ad102b57408e2ef7566bcfb829b2 at ddffce84287cbf752b7e70e478a6be78029f9215. This includes the newer PipelineCache.cpp and ShaderResources.cpp paths identified by the review. The bind remains inside the draw callback immediately after pipeline binding; its topic range-diff is identical and current-main gitlinks are retained. Historical39fc186 results remain historical.

Fresh matched Release builds with SPIRV-Tools enabled on AMD Radeon RX 6650 XT / RADV Mesa 26.2.4, Khronos validation layer 1.4.363: all four focused groups pass three times on both main and the change (12 per arm), no skips, VUIDs or compatibility warnings; nine actual layer insertions per arm. The grid-reference test executes three times per arm: both report zero color/depth differences. Its approximate control differs in 1544 samples. This validates the integrated path; it does not demonstrate a failing baseline or a performance gain on this GPU.

Conventions, whitespace, source/binary manifests and exact-head verification pass. The agreed order remains this PR first, then #9508's author refreshes its heap-aware bind into the same post-pipeline location. Current #9508 at 82f76ffa still needs that composition; its source was not changed. Whole GPU harnesses used the shared reservation/FIFO and service-owned PTYs; cleanup completed. No new Windows, native-title or FPS claim; earlier affected-GPU reports retain their pins.

Evidence: immutable source and qualification receipts, SHA-256 26a1d57ff804acd2418467e4c1b7344d6d3e0bd0b8bd677be1416aa1d43c840b (download verified).

Later-main driver qualification scope — 2026-10-30

The later current-main report tests public topic ddffce84287c as private integration 01ade978ac4a10beae136d4c7602412a5c7ebb8c on main 5ecef095b61e7a406b279c97896f3a8a6fbd6353. Only the one-line bind reorder differs between the paired trees. Four cases execute and pass on each arm, including the grid reference, with three actual validation-layer insertions per arm, zero skips and zero VUIDs. SPIRV-Tools is disabled on both arms: this qualifies the requested driver/grid comparison, with no shader-optimizer coverage or new Windows/device-loss/performance claim. The earlier08a SPIRV-Tools-enabled report remains separately pinned. Public source was not rewritten for this later private integration.

AI-assisted: yes (Codex).

Additional Windows driver reports (2026-11-06)

AlfaRojo's RDNA 2 integrated-GPU report compares main b611e634f7 with head ddffce8428 merged as eeef87d41f: grid-reference fails on main and passes 3/3 with this PR. #14341 alone fails; the combination passes. These are independent Windows measurements without validation layers.

irwanrivaldi's Radeon 860M (RDNA 3.5) report uses main b11c7bf84f plus the same PR head, AMD driver 32.0.32015.7029, without #14341 or validation layers. Main differs from the reference in 402 color and 2048 depth samples. With this PR, all depth samples match, but 42 color samples still differ in all three runs, so grid-reference still fails on that device. The other three sample-order tests pass. This does not establish a complete fix for #12277 or all AMD devices. The remaining color mismatch needs separate diagnosis on an affected driver; no new local reproduction is claimed.

Checklist

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The one-line reorder is valid Vulkan state usage: the spec says compatible descriptor sets may be bound without a pipeline having been bound first, so rebinding immediately after each pipeline is legal (Vulkan descriptor-set binding rules). The live overlap scan reports no open-PR overlap. The reported RX 6700 XT red/green runs and RGD fault location are useful evidence; policy checks pass, while hosted product/relinker jobs are skipped. I did not run local tests.

Before merge, please complete the repository-required GPU validation comparison for this AGC change. CONTRIBUTING.md requires the same focused tests on main and the change, on the same machine/GPU, with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, using ctest -V; verify the layer was actually found and compare logs for new VUID- errors. The current test report does not include that run and says the CTest/RGD logs remain local. Please run the focused sample-order tests with those settings and attach the concise results/logs (including any #8310 test-only overlay or #9056 combination needed to interpret the run). I’m requesting changes for this required GPU validation evidence, not for the reorder itself.

@wachi35676

Copy link
Copy Markdown
Contributor

Confirmed on AMD's Windows driver. On an RDNA 2 iGPU (1002:13c0, 32.0.21042.62), with #9056 and #9057, this PR fixes the agc_driver_sample_order_grid_reference device loss from #9507.

  • Without this PR: vkQueueSubmit ... -4, 3/3.
  • With it: passes 3/3, bit-exact against the device's 2x2 grid, with graphics pipeline libraries on and a fresh driver pipeline cache each run.
  • All four agc_driver_sample_order* tests pass 3/3 on the iGPU.
  • RTX 5070 Ti: three pass and _grid_reference skips, as on main.

Details in #9507.

AI-assisted: yes (Claude Code); results above were run on this machine.

@JJenkx

JJenkx commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

@MarcZX10 Thanks. Here is the validation run. Setup: Radeon RX 6700 XT, AMD driver 26.10.1, Windows 11 22621, base main a6dcea9. #8310's test-only change was applied to every arm so that MinGW builds the tree.

Each arm ran ctest -V -R sample_order (the four agc_driver_sample_order* tests) with:

  • VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation
  • ANYPS5_NO_SHADER_CACHE=1
  • ANYPS5_REQUIRE_VULKAN=1
  • VK_LOADER_DEBUG=warn, so a missing layer would be reported.

The layer is Vulkan-ValidationLayers vulkan-sdk-1.4.309.0, matching the system loader 1.4.309, built from source with the same WinLibs GCC 15.2 UCRT toolchain. An MSYS2 build of the layer cannot load into these processes, because its libstdc++ uses native TLS and WinLibs' uses emutls. The layer was built with USE_MIMALLOC=OFF and USE_ROBIN_HOOD_HASHING=OFF. A loader-debug run confirmed Insert instance layer "VK_LAYER_KHRONOS_validation", and no log contains was not found but was requested.

arm sample_order grid_reference recipe_depth_locations planning VUIDs
main fail fail (device lost) fail pass 20× vkDestroyDevice-device-05137, 2× VkSubmitInfo-pSignalSemaphores-03242, 2× -03244, 14× VkWriteDescriptorSet-descriptorType-00337, 12× VkImageMemoryBarrier-image-03320
this PR fail fail (now at the depth check) fail pass 18× 00337, 12× 03320
this PR + #9056 + #9057 pass pass pass pass none
#9056 + #9057, without this PR pass fail (device lost, read invalid at 0x200000000) pass pass 20× 05137, 2× 03242, 2× 03244

How to read the table:

Logs of all four arms and the RGD summary: 20261022-sample-order-validation-9503.tar.gz

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The author has now supplied the required focused Vulkan validation comparison in comment 6330588455: same RX 6700 XT/Windows setup, sample-order ctest with VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, and ANYPS5_REQUIRE_VULKAN=1; loader output confirms the layer loaded, and the table compares VUIDs across main, this PR, and the #9056/#9057 combination. The comparison reports no VUIDs in the combined passing arm and no additional VUID category from this reorder. The original gfx1036 reporter also confirms #9503 fixes the device loss with GPL enabled. I reviewed the diff and report; I did not run local tests.

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/src/SampleOrder.cpp
PR 9508 core/libs/prx/libSceAgcDriver/Graphics/src/SampleOrder.cpp
PR 10193 core/libs/prx/libSceAgcDriver/Graphics/src/SampleOrder.cpp
PR 13928 core/libs/prx/libSceAgcDriver/Graphics/src/SampleOrder.cpp
PR 13929 core/libs/prx/libSceAgcDriver/Graphics/src/SampleOrder.cpp

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The one-line reorder remains technically sound, and the RX 6700 XT validation-layer comparison now satisfies the GPU evidence requirement for the reported test arms: the layer load is confirmed, the focused ctest -V runs use all required environment settings, and the author compares VUIDs including the #9056/#9057 combinations. The iGPU reporter also confirms the device-loss fix. I am requesting changes for the newly reported overlap with #9508: its current head and this PR both edit SampleOrder.cpp at the sample-order draw path, but #9503 still says Depends on: none and has no author-agreed order or rebase plan. Please compare the exact hunks with #9508’s author, document which lands first and add Depends on: #N if required, then rerun overlap after rebasing. Also, the validation report and tests are against a6dcea9 while current upstream main is ab347d1; update to current main and repeat the focused validation comparison there before merge. Hosted product jobs are skipped; I did not run local tests.

@JJenkx
JJenkx force-pushed the windows/sample-order-bind-after-pipeline branch from 3192893 to 68b1c30 Compare October 22, 2026 04:38
@JJenkx

JJenkx commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

@MarcZX10, thanks. Two updates:

Overlap with #9508. Both PRs touch only the sampled-pass vkCmdBindDescriptorSets line:

The changes are compatible, and the second to land keeps both: the wrapped call, inside the lambda. I've proposed to Raghav314 on #9508 that this PR goes first, and offered to rebase onto theirs if they'd rather. The Depends on line now records the overlap. I'll set the order there once they answer.

Rebase. This PR is now rebased onto current main: 68b1c30 on 110a18b. It's the same one-line change, with no conflicts. The AGC library builds there (WinLibs GCC 15.2.0 UCRT r7, Release).

Still to do: repeat the focused validation-layer comparison on that base on the RX 6700 XT, with the same four arms as before. That's a GPU run, so it waits for this machine's turn in the launch queue. I'll post it here when it's done.

@fogydes

fogydes commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Reviewed; the move is right. Previously cmdBindDescriptorSets ran once before the pipeline bind of the first draw; binding the pipeline inside the draw lambda and the sample-order descriptor set immediately after it makes the ordering within the command buffer match the validation the RGD fault exposed (s_load_dwordx8 reading a null descriptor address), and each of the stencil-bit draws now re-binds the same set rather than relying on a bind that preceded its pipeline. Pipelines and render pass are created before cmdBeginRenderPass, and the existing grid-reference regression is the coverage for this — no new test needed. The PR body's GPU evidence (RX 6700 XT, RGD capture with the null descriptor address) is the right kind of citation for an AGC driver-behavior change.

One nit: each of the up-to-8 stencil-bit draws re-binds an identical descriptor set where one bind after the first pipeline would also satisfy ordering; negligible next to the draws themselves. Not worth changing if the per-draw bind keeps the code simpler.

@github-actions github-actions Bot added the agc libSceAgc* label Oct 22, 2026
@JJenkx

JJenkx commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @fogydes. I'll keep the bind next to each pipeline bind in the draw lambda. One bind after the first pipeline would order correctly too, but then each draw would depend on an earlier draw having run. As you say, the extra bind costs nothing next to the draw.

@JJenkx
JJenkx force-pushed the windows/sample-order-bind-after-pipeline branch 2 times, most recently from 68b1c30 to ba1a4d0 Compare October 23, 2026 07:13
@JJenkx

JJenkx commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

@MarcZX10 here is the current-main rebase and the repeated four-arm validation comparison you asked for.

Head: ba1a4d0cd6, this PR's one commit rebased onto main 0db47b263d with no conflicts. git diff --check and tools/check_conventions.py --base origin/main --head HEAD pass. main has since moved to ef0d8ae3b5; the numbers below are for the pushed head and its base.

Arms, each a fresh Release build of agc_driver_sample_order_tests and agc_driver_graphics_tests:

Arm Commit
main 0db47b263d
this PR ba1a4d0cd6
this PR + #9056 (0fd624d93b) + #9057 (78254bef6a) a31d445f6f
#9056 + #9057, without this PR 7b5b954602

Setup:

  • Radeon RX 6700 XT, AMD driver 26.10.1, Windows 11 22621, WinLibs GCC 15.2.0 UCRT.
  • ctest -V -R '^agc_driver_sample_order' (the four agc_driver_sample_order* entries), three runs per arm.
  • VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (Vulkan-ValidationLayers 1.4.309), ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1, VK_LOADER_DEBUG=warn. The layer loaded in every run.

Results: identical in all three runs of each arm.

Arm sample_order grid_reference recipe_depth_locations planning VUID- messages per run
main fail fail fail pass 20× vkDestroyDevice-device-05137, 14× VkWriteDescriptorSet-descriptorType-00337, 12× VkImageMemoryBarrier-image-03320, 2× VkSubmitInfo-pSignalSemaphores-03242, 2× -03244
this PR fail fail fail pass 18× 00337, 12× 03320
this PR + #9056 + #9057 pass pass pass pass none
#9056 + #9057 only pass fail (read invalid at 0x200000000) pass pass 20× 05137, 2× 03242, 2× 03244

This is the same picture as my earlier run on a6dcea927:

The overlap order with #9508 that we agreed is unchanged: this PR first, then #9508 wraps inside the draw lambda after the pipeline.

@adriadam10 adriadam10 self-assigned this Oct 23, 2026
@adriadam10
adriadam10 dismissed MarcZX10’s stale review October 24, 2026 10:21

Dismissing a stale review: the requested changes were addressed after it (new head and/or updated description with the asked-for runs) and the merge queue blocks on it. Please request changes again if anything is still open.

@brummilab

Copy link
Copy Markdown

Tested on an AMD Radeon RX 6600 XT (Navi 23, 0x73ff), AMD driver 32.0.21045.16010, Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, main 60465af with each PR merged on top (#9056 head 53949c077, this head ba1a4d0cd). 3 runs per variant, ctest -R agc_driver_sample_order:

sample_order _grid_reference _recipe_depth_locations _planning
main fails fails (GPU fault, read invalid at 0x200000000, vkQueueSubmit recorder: Vulkan result -4) fails passes
#9056 only passes fails passes passes
this PR only fails fails fails passes
#9056 + this PR passes passes passes passes

Same result in every run. On this device this PR clears _grid_reference only together with #9056; on its own all three still fail. The device logs no 2x2 sample location grid ... (the device lacks shaderStorageImageMultisample) although vkGetPhysicalDeviceMultisamplePropertiesEXT reports 2x2 for every count. Not run with the validation layer.

AI-assisted: yes

@EagleBearerYS

Copy link
Copy Markdown
Contributor

@JJenkx thanks for this. I wrote the vkCmdBindDescriptorSets this moves, in #6683's SampleOrders::Depth. Binding the set after each pipeline bind is right, and wachi35676's and brummilab's AMD runs show that the old order is what lost the device in agc_driver_sample_order_grid_reference on AMD's Windows driver.

@tablefrogpillow

Copy link
Copy Markdown
Contributor

Linux/RADV cross-check (the runs above are all Windows). AMD RX 7900 GRE, RADV / Mesa 25.2.8, kernel 6.8, Ubuntu 24.04.

main (b930da9) vs this PR merged into main (9c3bac7, head ba1a4d0), same GPU, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ctest -V -R sample_order. Validation layer confirmed loaded (VK_LOADER_DEBUG=all: Loading layer library libVkLayer_khronos_validation.so).

All four agc_driver_sample_order* pass on both arms. VUID lines identical on both (diff empty): VUID-VkDeviceCreateInfo-pNext-pNext x3 (pre-existing) and VUID-VkWriteDescriptorSet-descriptorType-00337 x16 (the depth-view-as-SAMPLED_IMAGE issue #9056 addresses, on main too). No new VUIDs from this PR.

_grid_reference runs (doesn't skip) and the 0x200000000 fault doesn't reproduce on RADV -- main passes -- so here it's a no-regression check, not a repro.

AI-assisted: yes.

@JJenkx

JJenkx commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Fresh Linux current-main comparison (2026-10-24)

Head 24f5d3aaab5274bb9510c7b0721508b5569ec8f0 merges main b930da950d5d076c19d8e6a025805f3799cadbc5 into the original branch. The only main/change production difference is the descriptor-bind reorder. Both full focused targets rebuilt on the same Ryzen 9 7950X / Radeon RX 6650 XT (RADV NAVI23), Mesa 26.2.4, Linux 7.2.9, GCC 16.2.1 Release.

agc_driver_sample_order, _grid_reference, _recipe_depth_locations, and _planning pass 4/4 on main and 4/4 on the change, without skips. Each ran separately with ctest -V, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 MESA_SHADER_CACHE_DISABLE=true VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, explicit layer path/RADV ICD and loader diagnostics. All six physical test logs confirm actual Khronos insertion. Planning is a mock test and does not supply physical validation coverage.

This is not validation-clean: both arms log VUID-VkWriteDescriptorSet-descriptorType-00337 (sampled image view lacks sampled usage). The VUID identifier appears 6 / 14 / 12 times respectively in the sample-order / grid-reference / recipe-depth logs on each build; planning has zero. These are log occurrences, not a count of distinct error messages. No new VUID type or increased occurrence count, missing-layer warning, device loss or timeout appears. No #9056/#9057 changes are folded in. This is Linux unit evidence; it does not reproduce the AMD Windows device loss, replace the older Windows reports or claim title/FPS improvement. Windows remains user-paused.

Fresh build/test logs, JUnit, exact patch and comparison runner, SHA256 8bbc77d4a48811cd5dcb042aad1b9fc53af89a63a74d21a1b7768c0074734337.

@JJenkx

JJenkx commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

Refresh on current main: this one-line change still fixes agc_driver_sample_order_grid_reference on the RX 6700 XT, and it is still needed.

  • main without this PR (1d13b559c2, then 8356b8bbea): agc_driver_sample_order_grid_reference fails in 4 of 4 runs. It is the only failure in a full GPU sweep of 1573 agc_* tests. There is no device fault any more; instead, every odd-row sample stays at pixel (0,0)'s locations (the exact path: ... 0 of 2048 on odd rows). Details are in agc_driver_sample_order_grid_reference: exact 2x sample-order path leaves odd rows at pixel (0,0)'s locations on RX 6700 XT (Windows) #18229.
  • This head (ddffce8428), merged onto main b1f8766e5f (merge aed3df0807), through the shared Windows GPU FIFO with ANYPS5_REQUIRE_VULKAN=1: agc_driver_sample_order, _grid_reference, _planning and _recipe_depth_locations all pass in 3 of 3 runs, 12 of 12 outcomes. The binaries matched the hashes recorded at preparation, and the receipt shows app_count=0 after cleanup.

Setup: Windows 11 Enterprise 22621, RX 6700 XT, AMD 26.10.1, MinGW-w64 GCC 15.2 UCRT, Release.

AI-assisted: yes.

@github-actions github-actions Bot added the fix error Closes an issue (Fixes #N) label Nov 10, 2026
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 14, 2026
…bind-after-pipeline

# Conflicts:
#	core/libs/prx/libSceAgcDriver/Graphics/src/SampleOrder.cpp
@JJenkx

JJenkx commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

Refreshed onto main fdb1e69611. The new head aee9406abd is a merge of main into ddffce8428.

Conflict: in Graphics/src/SampleOrder.cpp with #16752, which moved the depth path's pipeline bind into recording.BindPipeline(context, pipeline, slots). I re-applied the same one-line change on top of that version:

  • What moved: the vkCmdBindDescriptorSets call that precedes the draw loop.
  • Where it goes: inside the loop, straight after recording.BindPipeline(...).
  • Diff against main: again only that line.

Still needed after #16752. ctest -R '^agc_driver_sample_order' on the same build tree and the same main, each arm in its own lease of the shared Windows GPU FIFO.

  • Setup: AMD RX 6700 XT, driver 26.10.1, ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_LAYER_KHRONOS_validation 1.4.363, --repeat until-fail:3.
Test main (SampleOrder.cpp as on main) This head
agc_driver_sample_order pass pass x3
agc_driver_sample_order_planning pass pass x3
agc_driver_sample_order_grid_reference fails: 2x checkerboard at 64x32: the exact path differs from the reference in 379 color and 2048 depth samples pass x3
agc_driver_sample_order_recipe_depth_locations pass pass x3

Neither arm had any VUID-, UNASSIGNED- or sync-hazard ID, and neither skipped anything. The conventions check passes.

AI-assisted: yes.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 14, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

Nothing blocks this change; the points below are optional.

What I ran

Reviewed head aee9406abdfed628f16db8851e08c1db97465c83. Read the PR description, commit summary, manifest, diff, and the changed function in SampleOrder.cpp. No commands or tests were run; repo_read.py was not available through the review tools.

Results

Check Result Note
Change and context review passed Reviewed the sole changed line and its draw callback.
Tests not run No tests run for this review.

Findings

Blocking

None.

Non-blocking

None.

Not verified

SampleOrder.cpp was the only changed file and was read around the modified draw callback. No excluded changed files were listed in the manifest. The repository reader and files not included in the review bundle were not inspected. The hardware test reports in the PR description were author-supplied and were not independently reproduced.

To get this to a good state

Nothing is required.

@Superseabas Superseabas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows re-check of the refreshed head aee9406abd on the Ryzen 7 7700X's integrated Radeon (1002:164e), the GPU from my earlier report. Merged onto main 0f4538fa02 (b730e8566b, clean merge; the only change is the one line in SampleOrder.cpp).

Setup: Windows 11 Home 10.0.26200, WinLibs GCC 16.2.0 (x86_64-ucrt-posix-seh, r3), Release, run from PowerShell with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and the Khronos validation layer. GPUs: AMD Radeon integrated (Adrenalin 26.10.2) and NVIDIA GeForce RTX 5070 Ti (621.01).

ctest -R '^agc_driver_sample_order' (4 tests: sample_order, sample_order_planning, sample_order_grid_reference, sample_order_recipe_depth_locations), 3 runs, then agc_driver_sample_order_grid_reference alone 10 more times:

main 0f4538fa02 this PR merged
Radeon, the set 3 of 4 pass, in 3 of 3 runs 4 of 4 pass, in 3 of 3 runs
Radeon, grid_reference × 10 0 of 10 10 of 10
RTX 5070 Ti, the set 4 of 4 pass (grid_reference skips), in 3 of 3 runs the same
  • On main the Radeon still fails as before, with "the exact path differs from the reference in 379 color and 2048 depth samples". With this PR it reports 0 color and 0 depth samples, and "the exact path renders Village's 2x checkerboard like the device's 2x2 sample location grid, bit for bit".
  • The RTX 5070 Ti skips grid_reference on both sides, because the device doesn't keep depth drawn at custom sample locations. So it gives no comparison here.
  • No validation messages on either GPU, on either side.

So the merge resolution around #16752's recording.BindPipeline(context, pipeline, slots), which binds the descriptor set after each pipeline bind inside the draw lambda, still fixes this GPU.

Not run: the full ^agc set on this head.

AI-assisted: yes (Claude Code)

@oneandonlydean
oneandonlydean merged commit e706ab8 into boykopovar:main Nov 15, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* fix error Closes an issue (Fixes #N)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

agc_driver_sample_order_grid_reference: exact 2x sample-order path leaves odd rows at pixel (0,0)'s locations on RX 6700 XT (Windows)