Repository navigation
fix(agc): draw a PS_ITER_SAMPLE program once per pixel into a one-sample depth target - #7729
Conversation
|
@milescoviello yes, the reasoning holds for me. I didn't have a specific case in mind; the refusal was there because I hadn't worked through what per-sample invocations could observe on this path. With Two small suggestions, take them or leave them:
The color-only branch could take the same rule later; I agree it can wait for a title. 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.
|
|
Windows data point for
AI-assisted (Claude Code). |
|
@SandstromPL thanks for working through it, and for both suggestions. I took them in ff312a7. The debt entry now says at the start that @xXPBSXx thanks for the Windows run, including the reverted AI-assisted: yes (Claude Code) |
|
Rebase handoff — rebased onto current Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, To pick it up: Head is |
|
Intel and AMD Windows data: with this PR's test changes, Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, every execution test built,
AI-assisted: yes (Claude Code) |
…ple depth target A one-sample depth target under a multisampled rasterizer without MSAA_ENABLE is drawn as a one-sample draw at the pixel center, but a pixel program that runs with PS_ITER_SAMPLE threw. Ghost of Tsushima (PPSA02225) draws its depth-only pass this way (2x PA_SC_AA_CONFIG, PA_SC_MODE_CNTL_1 0x06030000, KILL_ENABLE, no sample index or coverage input) and stops on it. Every sample is taken to be at the pixel center on this path, so invocations per sample would get the same inputs and give the same depth, kill and color results, and the target keeps sample 0's. Such a program is now drawn once per pixel, without sample shading. ANCILLARY and SAMPLE_COVERAGE inputs still throw. The debt entry notes that only the memory writes of such a program can differ. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry accesses can differ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ff312a7 to
1f63ba3
Compare
|
@blawesom thanks for the rebase and the RADV run. I pushed my own rebase onto @savvaniss thank you for the UHD 770 and RX 9070 XT runs, with the test-only control failing on both. They're in the description now. AI-assisted: yes (Claude Code) |
|
Picking this up for our testing: it addresses the stop we see in PPSA03208 on current main, one of the titles we're bringing up, and we'd like to move it into main. We'll review, test and merge it under the normal process. Your comments and review are still very welcome, @adriadam10. |
|
Thanks @oneandonlydean. It merges cleanly with current AI-assisted: yes (Claude Code) |
What
A one-sample depth target under a multisampled rasterizer without
MSAA_ENABLEis drawn as a one-sample draw at the pixel center (#6196's follow-up, 3dadf77). A pixel program that runs withPS_ITER_SAMPLEthrew there. Ghost of Tsushima (PPSA02225) draws its depth-only, alpha-tested pass this way and stops on it: 2xPA_SC_AA_CONFIG,PA_SC_MODE_CNTL_00x2 (MSAA_ENABLEclear),PA_SC_MODE_CNTL_10x06030000 (PS_ITER_SAMPLE),DB_SHADER_CONTROL0x50 (KILL_ENABLE), no color target, and noANCILLARYorSAMPLE_COVERAGEinput.On this path every sample is taken to be at the pixel center, and the one-sample target keeps sample 0's coverage. So whether the console runs such a program once per pixel or once per sample, each invocation gets the same position, interpolants and derivatives, and gives the same kill decision, depth and color, and only sample 0's reaches the target. The program is now drawn once per pixel, without sample shading (
perSampleShadingwas already off here, since the draw has one sample).ANCILLARY(sample index) andSAMPLE_COVERAGEinputs still throw, as do points, lines, alpha-to-coverage, a sample-mask export andDB_EQAAZ interpolation or overrasterization.PS_ITER_SAMPLE; it isn't needed by any title I know of yet.@SandstromPL, who added this refusal with the one-sample depth path, checked the reasoning: without an
ANCILLARYorSAMPLE_COVERAGEinput an invocation can't tell which sample it runs for. Following their suggestions, ff312a7 rewords the debt entry: it now says up front thatPS_ITER_SAMPLEalone still throws only with one-sample color targets and no depth target, and that atomics and append or consume counters are where a console that runs such a program once per sample would give a different result.Tested
Ubuntu 24.04, GCC 13.3, NVIDIA RTX 4070 Ti (595.99.02), on
mainca13a56.agc_driver_graphics: the case that expected the refusal forPS_ITER_SAMPLEwithKILL_ENABLEnow decodes as one sample, with or without a one-sample color target, with no sample shading, and passes the precheck. Adding anANCILLARYinput to it still throws.mainwith the changed test, it fails on the refusal (a one-sample depth target under a multisampled rasterizer without MSAA_ENABLE is unsupported ...).multisample|msaa|sample|depth|^agc_driver_graphics$pass.main676d423 (MinGW-w64, WinLibs):agc_driver_graphicspasses 3 of 3, and fails 3 of 3 withmain'sState.cppand the changed test.main6b8228b. The 21 tests built fromtests/Graphics.cpppass 3 of 3. With only this PR's test change,agc_driver_graphicsfails on the refusal.mainf72c7aa (head 1f63ba3). @blawesom offered the same rebase, green on an RX 9070 XT with RADV. The debt line is cut to the gap, as CONTRIBUTING.md now asks, with no title named in it. The 621 tests matching^agc_driver_|^agc_shader|recompiler|spirvpass, andagc_driver_graphicspasses 3 of 3.PS_ITER_SAMPLE(PA_SC_MODE_CNTL_10x06030000,DB_SHADER_CONTROL0x50), which threw, and one without it, with a depth export (DB_SHADER_CONTROL0x11). With this PR it draws past both and stops 39 s in at an unrelated check, a compute shader that imports a multisampled depth or stencil surface (native multisample stencil or depth format import is not implemented).VK_LAYER_PATH,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 ctest -V, RTX 4070 Ti, Linux. Neither log reportswas not found but was requested by env var VK_INSTANCE_LAYERS.^agc_driver_graphics$onmainf72c7aa and on this PR's code (c7aa42ebe5, the same code as the current head) gives no validation messages in either log.mainf72c7aa or on this head.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