Repository navigation
fix(agc): give a depth stencil copy's layout barrier both aspects - #9057
milescoviello wants to merge 1 commit into
Conversation
The depth sample reorder copies a D32S8 surface into an image of the same format. When only depth is reordered, the copy's transition to GENERAL named the depth aspect alone, which Vulkan does not allow for a depth/stencil format without separateDepthStencilLayouts (VUID-VkImageMemoryBarrier-image-03320). The barrier now names both aspects of a format with stencil, as transitionLocated does; the copy itself still moves depth only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
AMD Radeon 680M (AMD 32.0.21030.2001, Windows) result for this PR together with #9056, under the validation layer: #9056 (comment). The AI-assisted: yes |
|
Read against
|
|
Thanks @EagleBearerYS for the review, and for checking that no other barrier in AI-assisted: yes (Claude Code) |
|
Validation-layer data point for this PR (data only). Setup: Linux (WSL2 Ubuntu 24.04, GCC 13.3, Release), llvmpipe, Before ( After (this PR): One run each, on llvmpipe only. Not run: other GPUs for the layer run, other platforms, the other tests with the change under the layer. AI-assisted (Claude Code). |
|
Thanks @xXPBSXx. So AI-assisted: yes (Claude Code) |
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
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.
|
What
The depth sample reorder (
SampleOrder.cpp,Depth) copies the depth plane into an image of the surface's own format before redrawing it in the guest's order. For aD32_SFLOAT_S8_UINTsurface that only reorders depth (SampleOrderMethod::Depth), the copy image is still D32S8. But its first transition toGENERALnamed the depth aspect alone. WithoutseparateDepthStencilLayouts, Vulkan requires a depth/stencil format's barrier to name both aspects. The Khronos layer reports this asVUID-VkImageMemoryBarrier-image-03320, 6 times over the sample order tests, from the 2x and 4x "depth format 130 through a depth pass" cases.The barrier now takes its aspects from the format (
HasStencil(target.format)), astransitionLocatedin the same file already does. The copy region still moves depth only when only depth is reordered.Tested
Ubuntu 24.04, GCC 13.3, NVIDIA RTX 4070 Ti, driver 595.99.02, on
main275e896.Khronos validation layer 1.4.363 over the 4 tests matching
sample_order:main:VUID-VkImageMemoryBarrier-image-03320×6 andVUID-VkWriteDescriptorSet-descriptorType-00337×18.03320is gone, and nothing is new.Pass and fail counts are unchanged by this change, under the layer and without it (3 of 3, and under lavapipe).
agc_driver_sample_order_planningpasses. The other three fail on this device onmainand with this change alike: the remaining00337reads are a test issue, which test(agc): read the sample order tests' depth through a sampled copy #9056 fixes. That PR passes all 4 here.AMD, Windows: @DavidSamir ran it with #9056 on a Radeon 680M (driver 32.0.21030.2001) under the 1.4.363 layer. The 6
03320errors onmain27fabb6 are gone.NVIDIA, Windows: @MaxLikesCode ran it on an RTX 4090 (driver 617.42, Windows 11) on
main2c4b116, under the 1.4.363 layer, 3 runs each.main+ test(agc): read the sample order tests' depth through a sampled copy #9056 still has 603320per run; with this PR added there is no VUID, and the pass and skip counts are unchanged.@EagleBearerYS (fix(agc): keep the guest's sample order where pixel (0,0)'s locations stand in for a 2x2 grid #6683's author) reviewed it. They confirmed this was the only barrier in
SampleOrder.cppnaming fewer aspects than its image's format has, and ran it with test(agc): read the sample order tests' depth through a sampled copy #9056 on GitHub's runners (lavapipe: the sample order tests pass 3 runs in a row).Older layer, lavapipe: @xXPBSXx ran all 483 built
agc_driver_*_testsunder the Ubuntu 24.04 layer package (1.3.275) onmain950388b.mainreports03320only fromagc_driver_sample_order; with this change that test passes with no03320, and only test(agc): read the sample order tests' depth through a sampled copy #9056's00337remains. One run.NVIDIA and AMD, Windows: @wachi35676 ran it with #9056 on an RTX 5070 Ti (driver 617.42) and an AMD Radeon iGPU (gfx1036, driver 32.0.21042.62), Windows 11, 3 runs each: with both PRs
sample_orderand_recipe_depth_locationspass 3 of 3 on both GPUs (they fail onmain). No validation layer on that machine.lavapipe on the current host (Mesa 26.0.8-1ubuntu0.3, LLVM 21.1.8, Ubuntu 26.04.1), this PR alone merged onto
maina6dcea9: the 4sample_ordertests pass 3 of 3. On the RTX 4070 Ti (615.71.09) in the same build, 3 of the 4 still fail, as described above: test(agc): read the sample order tests' depth through a sampled copy #9056 fixes those.Not tested: Intel.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code