Repository navigation
fix(agc): accept ANCILLARY without PS_ITER_SAMPLE for a one-sample depth target without MSAA_ENABLE - #9988
fix(agc): accept ANCILLARY without PS_ITER_SAMPLE for a one-sample depth target without MSAA_ENABLE#9988frankea wants to merge 5 commits into
Conversation
…pth target without MSAA_ENABLE
|
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.
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed exact head 90d0242 against current main. The code narrows the exception to the one-sample depth path: ANCILLARY is accepted only when PS_ITER_SAMPLE is clear; sample coverage and per-sample ancillary remain rejected. The tests cover the no-depth/color variants and GT7's reported input mask, while retaining negative controls. The debt note marks the inferred sample-0 behavior as unmeasured on console.
The PR explicitly records the same-line integration order with #9721, which is still open; the touched code is separate in purpose and the PR is mergeable. I reran the convention check against current main, the test-script registration check available at this exact head (171 scripts), and git diff --check; all pass. I could not execute the Vulkan/guest test suite locally because this workspace has no configured AnyPS5 build or GPU test runtime. The author reports 62/62 focused tests repeated three times on Windows with validation enabled, and a negative control that fails on the old behavior. Hosted policy checks pass and product build jobs are skipped.
No blocking issue found in the reviewed diff.
|
Windows run on two more GPUs, one of them not NVIDIA. Head ea2b648 was merged into Setup: Windows 11 Pro 10.0.26300, WinLibs GCC 15.2.0 r7, Release. Environment:
AI-assisted: yes (Claude Code) |
|
@frankea Please remove the |
…ary-unsampled # Conflicts: # core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp # core/libs/prx/libSceAgcDriver/tests/Graphics.cpp # docs/dev/debt/libSceAgcDriver.md
…ary-unsampled # Conflicts: # docs/dev/debt/libSceAgcDriver.md
|
@oneandonlydean Done in 36b5996: the The branch also merges AI-assisted: yes (Claude Code) |
What
A one-sample depth target under a multisampled rasterizer with
PA_SC_MODE_CNTL_0.MSAA_ENABLEclear is drawn as a one-sample draw at the pixel center (debt entry "A one-sample target under a multisampled rasterizer without MSAA_ENABLE"). A pixel program that reads theANCILLARYinput threw on this path:a one-sample depth target under a multisampled rasterizer without MSAA_ENABLE is unsupported for points or lines and with alpha-to-coverage, a sample index or coverage input, ....ANCILLARYnow throws on this path only withPA_SC_MODE_CNTL_1.PS_ITER_SAMPLE.SAMPLE_COVERAGEstill throws, and so does everything else the rule refuses. The message now says "a sample index input under PS_ITER_SAMPLE, a coverage input".main, changed itsPS_ITER_SAMPLEhandling; this branch merges it.ANCILLARYthrows with a one-sample depth target only underPS_ITER_SAMPLE, and why the rest is accepted.GPU semantics, with sources:
PS_ITER_SAMPLE, fix(agc): draw a PS_ITER_SAMPLE program once per pixel into a one-sample depth target #7729 draws the program once per pixel on this path, but the console runs one invocation per sample, and each would read its own sample index. That case still throws.Why: Gran Turismo 7 (PPSA01317) draws three draws of its main pass this way while loading the World Map. They have pixel programs 0x12804bd400, 0x1280441a00 and 0x1280393e00,
SPI_PS_INPUT_ENAandSPI_PS_INPUT_ADDR0x2b01 (PERSP_SAMPLE,POS_X_FLOAT,POS_Y_FLOAT,POS_W_FLOAT,ANCILLARY),PA_SC_MODE_CNTL_10,DB_SHADER_CONTROL0x60 andDB_EQAA0x00050000. The one-sample depth target is under a 4xPA_SC_AA_CONFIG.Tested
Refreshed onto
main0db47b2 (head ea2b648; no conflicts), RTX 4090 (NVIDIA 616.92, Windows 11): the 63 ctest entries of the focused set below pass 63/63, each test run three times, and 63/63 under the validation layer (VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1,ctest -V), with noVUID-line; its only messages aremain's threeUndefined-Value-ShaderOutputNotConsumed-DynamicRenderingwarnings fromagc_driver_alpha_to_coverage.main0db47b2 passes the union of the refreshed sets, 115/115, under the same layer settings with noVUID-line.Gran Turismo 7 (PPSA01317), on a local stack of
mainwith the open PRs it needs before this stop (fix(agc): write a replace blend into a packed color target without blending #7243, feat(agc): render layered draws into a depth view of several slices #7256, fix(shader): answer image_get_resinfo on any T# dimension #7550, fix(agc): raise no end-of-pipe event from flips and carry the release's interrupt context #7978, feat(agc): merge partial writes into 4_4_4_4 UNORM color targets #8564, feat(agc): blend into 11_11_10 float color targets in the pixel shader #9020, feat(agc): draw alpha-tested packed-target merges that write depth as a depth pass and an EQUAL merge pass #9335, fix(shader): link table callees that together exceed s_call_b64 range #9068, feat(agc): draw EQAA color targets at their coverage sample count #9700, fix(agc): accept DB_EQAA INTERPOLATE_COMP_Z for a one-sample depth target without MSAA_ENABLE #9721, fix(shader): read other control points' off-chip outputs in hull programs #9743, fix(shader): evaluate a control point masked out of the packed hull register #9806) and local diagnostics. One of them acceptsANCILLARYon this path whateverPS_ITER_SAMPLEis, and logs the draws it accepts.Without it, 2 of 5 runs stopped on this refusal before GT7 created any tessellation pipeline.
With it (run un-3), the three draws above are accepted, all with
PS_ITER_SAMPLEclear, so this rule accepts them too. The run went on to the next stop on the other route, the texture sampled with unnormalized coordinates.Windows 11 (build 26200), NVIDIA GeForce RTX 4090 (driver 616.92), MinGW GCC Release build with
BUILD_TESTING=ON, all on one machine.agc_driver_graphics, with and without a one-sample color target. A one-sample depth draw whose running pixel program readsANCILLARYwithoutPS_ITER_SAMPLEdecodes as a one-sample draw, and the draw precheck accepts it. So does GT7's input set, 0x2b01.SAMPLE_COVERAGEstill throws, andANCILLARYwithPS_ITER_SAMPLEstill throws (an existing case).agc_driver_graphics_testsand the MSAA, CMASK, FMASK and journal tests: alpha_to_coverage, cached_image_multisample_guard, cmask_fast_clear, color565_target, fmask_image_reads, image_msaa_address_on_plane, msaa_enable_single_sample, multisample_fill_host_only, multisample_readback, multisample_retirement, multisampled_pass_order, native_multisample_depth, pipeline_journal, pixel_sample_coverage, sample_mask_multisample, sample_multisample_target, staged_clear_sampled_read.main2e0c925): 62/62 passed, each test run three times (ctest --repeat until-fail:3).maincontrol:main2e0c925 with only this PR'stests/Graphics.cpp.agc_driver_graphicsfails on the new case withmain's refusal.VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation(Vulkan SDK 1.4.363.0),ANYPS5_NO_SHADER_CACHE=1andANYPS5_REQUIRE_VULKAN=1withctest -V, onmain2e0c925 (62/62) and on this PR (62/62). Neither log haswas not found but was requested by env var VK_INSTANCE_LAYERS, and neither has aVUID-line. Both have the same threeUndefined-Value-ShaderOutputNotConsumed-DynamicRenderingwarnings, frommain'sagc_driver_alpha_to_coverage.tools/check_conventions.py --base origin/mainreports no errors; its one warning is the length of the existing debt entry this PR edits.agc_driver_graphicsno longer checks that unimplemented one-sample depth states throw: thedepthRefusedmessage and itsexpectFailurecalls are gone (SAMPLE_COVERAGE,ANCILLARYunderPS_ITER_SAMPLE, a sample-mask export, alpha-to-coverage, points and lines, and fourDB_EQAAsettings). The positiveANCILLARYand 0x2b01 decode checks, thePS_ITER_SAMPLEandINTERPOLATE_COMP_Zchecks and the sample-count mismatch check stay.main379b1dc (fc29c5a, fix(agc): accept DB_EQAA INTERPOLATE_COMP_Z for a one-sample depth target without MSAA_ENABLE #9721's conflicting line kept with this PR's) and thenmain9c85790 (head 5c19aa5; fix(agc): draw a PS_ITER_SAMPLE program once per pixel into a one-sample color target #8121 changed the same debt sentence, and both changes are kept), RTX 4090: the 65 ctest entries of the focused set's 18 targets pass 65/65 on both heads, three times each, and 65/65 under the validation layer with noVUID-line; the only messages aremain's threeUndefined-Value-ShaderOutputNotConsumed-DynamicRenderingwarnings fromagc_driver_alpha_to_coverage.main9c85790 passes the union of the sets tested tonight, 109/109, under the same layer settings with noVUID-line.Checklist
main; no other open PR implements the same functions. fix(agc): accept DB_EQAA INTERPOLATE_COMP_Z for a one-sample depth target without MSAA_ENABLE #9721 and fix(agc): draw a PS_ITER_SAMPLE program once per pixel into a one-sample color target #8121, both now inmain, changed the sameRequire(itsDB_EQAAmask and message) and the one-sample color rule next to it.NotImplemented_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)main; this branch keeps both changes)