feat(agc): run the pixel program per sample for PS_ITER_SAMPLE #5673
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5673"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by ps54all on 2026-10-14T05:52:50Z.
What
PA_SC_MODE_CNTL_1bit 16 (PS_ITER_SAMPLE) was refused together with the other scan-control bits ("sample iteration, primitive discard or out-of-order rasterization"). Metal Gear Solid 4 programs0x293 = 0x06030000, so every draw failed on it.State::perSampleShading, which setssampleShadingEnablewithminSampleShading = 1.0in the pipeline's multisample state. The draw throws when the device lackssampleRateShading.PS_ITER_SAMPLEbits 16-16, next toMULTI_SHADER_ENGINE_PRIM_DISCARD_ENABLEat 17). The debt entry indocs/dev/debt/libSceAgcDriver.mdrecords that per-sample execution on the console is taken from the register name and Vulkan's definition, not measured.Tested
Windows 11, RTX 3080 (driver 610.74), WinLibs GCC 15.2.0 r7, Release.
agc_driver_graphics: the old assertion that0x06030000is refused becomes: a single-sample target accepts it and decodes without sample shading; a 2x target with0x293 = 0x10000is accepted by the precheck and decodes withperSampleShading; without the bit it does not. With the mask change reverted the test fails ("per-sample iteration of a single-sample target was rejected"); with it the test passes.agcctest tests pass (rebased on mainf74ec639c; one skipped before the rebase,agc_driver_stencil_ref_export, missing device feature).python tools/check_conventions.py --base origin/mainandtools/check_test_registration.pypass.Checklist
main; no other open PR implements the same functions (searched PR titles/bodies and the tree for PS_ITER_SAMPLE, PA_SC_MODE_CNTL_1, sampleShading on 2026-10-14).mdfiles or images added to the repository🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by tibzejoker on 2026-10-14T08:29:58Z.
Runs for this PR at head
f2c548638. Windows 11, MinGW-w64 GCC 15.2.0 Release, two GPUs in one machine: Intel UHD Graphics 770 (driver 32.0.101.6129, picked withANYPS5_GPU=Intel) and RTX 4090 (NVIDIA 616.92).agc_compute_descriptor_layout_flags,agc_descriptor_pool_reset_failure,agc_driver_address_space_teardown,agc_driver_covered_centroid_state,agc_driver_graphics,agc_sparse_buffer_holes) pass on both GPUs.ctest -R "agc_driver|agc_masked|agc_shader" -j4: no failures on either GPU. Intel: 396 tests, 28 skipped. NVIDIA: 396 tests, 1 skipped (agc_driver_stencil_ref_export). The skips are the same as onmainwith each GPU. On the UHD 770 they are features it doesn't support: f64, 64-bit and float atomics, mesh shaders, fp16 interpolation and dot, shader clock.No difference between the two GPUs.
AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-14T08:59:35Z.
AMD and NVIDIA runs for this PR at head
f2c548638. Windows 11 Pro 26200, WinLibs GCC 15.2.0 (MinGW-w64), Release, one machine with two GPUs, each picked withANYPS5_GPU:1002:13c0, RDNA 2), driver 32.0.21036.18ctest -R "agc|shader|video_out" -j 8(515 tests, including the ones this PR adds or changes):agc_driver_lds_mixed_width_atomics,agc_driver_pixel_interlockandagc_driver_layered_volume_vertex_no_gpl. These three fail the same way on currentmain(872f52320) on this GPU and pass there on the RTX 5070; they are the three of #5271, so not caused by this PR.No title run. AI-assisted: yes (Claude Code ran the builds and tests).
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-14T13:15:41Z.
Rebased onto main (adjacency conflict in
State.hppwithditheredAlphaToCoverage, no logic change). Checked:perSampleShadingis in both pipeline library keys, the full pipeline key andsameDecode; the throw withoutsampleRateShading; the decode tests (they no longer compile without the change); build +agcctest green (agc_driver_tessellationsegfaults the same on main without this PR); the debt entry states that per-sample execution is not measured. Merging once CI is green.Imported from boykopovar/AnyPS5. Originally posted by ps54all on 2026-10-14T13:35:53Z.
Thanks @adriadam10 for the rebase onto main. It matches the one I made locally: the only conflict was
State.hpp, where #4451'sditheredAlphaToCoveragelanded next toperSampleShading, both kept. The same patch on main344afad05passes all 518agctests here (Windows 11, RTX 3080, 610.74). And thanks @tibzejoker and @simonbronk for the Intel, NVIDIA and AMD runs.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-14T13:48:46Z.
Re-checked the author's rebase on current main: same patch as the previous head, only context lines differ.
perSampleShadingis in both pipeline library keys, the full pipeline key andsameDecode; it throws withoutsampleRateShading. Build +agcctest green here (agc_driver_tessellationsegfaults the same on main); without the changeagc_driver_graphicsno longer compiles. Per-sample execution on the console is not measured, as the debt entry states. Merging once CI is green.