fix(recompiler): run a pixel shader the guest does not iterate once per pixel #6470
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6470"
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 EagleBearerYS on 2026-10-15T16:32:46Z.
What
A pixel shader that reads the ancillary input's sample number ran once per sample on every multisampled draw, even when the console runs it once per pixel.
The cause: the recompiler gave that field (bits 11:8) the
SampleIdbuiltin, and Vulkan enables sample shading for any fragment shader that usesSampleId(spec). That happened whateverPA_SC_MODE_CNTL_1.PS_ITER_SAMPLEsaid. So these shaders did N× the fragment work, andFragCoord, and with it POS_X_FLOAT and POS_Y_FLOAT, moved from the pixel centre to the sample.SPI_BARYC_CNTLputs POS_X/Y_FLOAT (POS_FLOAT_LOCATION,POS_FLOAT_ULC);InterpolateAtOffsetby the guest's offset fromPA_SC_AA_SAMPLE_LOCS;SPI_BARYC_CNTLsays.SampleId;sampleRateShading(InterpolationFunction) and the fragment-shader barycentric path. Devices without them keep the host's default positions.maintook 31 with #5884 and 32 with #5405, and #6683 takes 33). The shader disk cache goes toFormatVersion39, which no open PR uses:mainis 38 since #7296, #6683 takes 40 and #7395 41.DB_EQAA.PS_ITER_SAMPLES(still not read). SAMPLE_COVERAGE stays untranslated, as before.With #5907 (merged):
FragCoord. This PR drops that refusal (3e802e45b8), as simonbronk raised here (comment) and we agreed (reply): a draw #5907 collapses reaches the pixel stage as not iterated, so it reads sample number 0 and noSampleId. PPSA01556's 0x2301 pass then draws once per pixel at the pixel centre. PPSA07411's 0x2001 pass (PERSP_SAMPLE and ANCILLARY), which #5907 already accepts, now gets sample 0's barycentrics and sample number explicitly.Effect on open PRs:
Tested
Resident Evil Village (PPSA01556), Windows 11, RTX 3070 Laptop GPU (driver 617.42):
6ea62f9b40with #6366 and #5703 (since merged), plus #5907 with fdfawef324's proposed rule, since pushed to #5907 as 7ad8cb8de. Resident Evil Village stops before its title at a 2x depth-only pass, with PS_ITER_SAMPLE clear, whose pixel program reads PERSP_SAMPLE, POS_X/Y_FLOAT and ANCILLARY (SPI_PS_INPUT_ENA0x2301):[gpu] driver failure: AGC graphics: the depth target's sample count differs from the rasterizer'sIt's the rule refusing ANCILLARY with POS_X/Y that stops this draw.
merge check: PPSA01556 0x2301 decodes to samples=1, request sample 0 locations 04 04 0c 0c.ctest -R '^(agc|shader|recompiler)'passes, 608/608.44df216321with other open PRs and local changes, not pushed), with the two local experiments we had carried for these passes removed, #5907 as published (409f8b612 + 7ad8cb8de) without the ANCILLARY + POS_X/Y rule and its two refusal checks, and this PR (a61c30bff6). Resident Evil Village reaches its lit title menu on a cold shader cache: the 0x2301 pass and the 0x2001 pass before it draw, and the log has no driver failure and no sample-count refusal. The details are in #5907 (comment), including one fault inside NVIDIA's driver during teardown, after the last frame.Linux, lavapipe (CI configuration):
agc_driver_pixel_sample_iteration:SampleIdonce per pixel; sample 0's offset; the guest location table when iterated, standard and per-pixel custom; no offsets withoutsampleRateShading.pixel_ancillary(iterated and not),agc_driver_sample_mask_multisample(its per-sample pass setsperSampleShading, as a guest would),request_serializer(version 31 and its upgrades),agc_shader_memory(the request version) andagc_driver_graphics(theSPI_BARYC_CNTLdecode, and #5907's three ANCILLARY with POS_X/Y cases, which now rasterize sample 0 alone instead of throwing).ctest -R '^(agc|shader|recompiler)'passes, 607 tests (608 with the new test). The one exception,agc_driver_preparation_scope_settle, is a load flake that also fails on main; it passed when rerun alone.--repeat until-fail:10.Windows (GitHub's runner, MinGW, no Vulkan device), at this head (run):
request_serializer,pixel_ancillary,agc_shader_memory,agc_driver_graphicsand the other 19agctests run with them pass 3 of 3; 4 device draws skip without Vulkan. Only these tests' targets were built: onmain0029e62f97a whole-tree MinGW build stops attests/execution/GpuIndirectArgumentsMisalignedWriterAhead.cpp(alignas(65536), from #5747), which this change does not touch. The libc and libkernel suites pass apart fromguest_kqueue, which fails onmainon that runner.Merged with
mainb260d8d792(bd09c49374), on GitHub's runners (run):request_serializer,agc_shader_memory,agc_driver_graphics,pixel_ancillary,agc_driver_pixel_sample_iteration,agc_driver_sample_mask_multisampleand #5907's state tests pass 3 of 3 on Linux and Windows. The run shows as failed because the Windows libkernel suite'sguest_kqueueand the Linux timing testprecise_waitfail on those runners with and without this PR (nomaincomparison was run).3e802e45b8), on GitHub's runners (run): with the merge alone,agc_driver_graphicsfails on Linux and Windows on the three cases; with the commit, it,pixel_ancillaryandagc_driver_pixel_sample_iterationpass 3 of 3 on both.Windows 11, RTX 3070 Laptop GPU (driver 617.42), native fragment-shader barycentrics:
agc_driver_pixel_sample_iterationpasses 5 of 5 (21 draws). Withmain's code generation (the fix commit's non-test files atd5cbfd1e12) it fails with "2x: a pixel shader the guest runs once per pixel reads SampleId". lavapipe runs the same draws through the emulated barycentrics.Checklist
main0029e62f97, merged withmainb260d8d792; no other open PR implements the same functions. Overlaps (git merge-tree):FormatVersionline inShaderDiskCache.hpp: #6243, #6280, #6412 and #6454 change it, and #6296 and #6032 add lines next to it. Keep both sides; the version takes the next free number.docs/dev/debt/shader.md; keep both.NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file (none added).mdfiles or images added to the repository (attach them to this PR)3e802e45b8), as agreed with simonbronk in #5907 (comment) and here.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T16:44:39Z.
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.
main)core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppL3905, L4023, L4171-4172, L4177-4178, L4183-4184, L4189-4190core/shader/recompiler/ControlFlow/src/RequestSerializer.cppL781, L815core/shader/recompiler/tests/RequestSerializerTests.cppL209, L248, L273, L397, L410, L429, L431core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppL3905, L4023, L4171-4172, L4177-4178, L4183-4184, L4189-4190core/shader/recompiler/ControlFlow/src/RequestSerializer.cppL781, L815core/shader/recompiler/tests/RequestSerializerTests.cppL209, L248, L273, L397, L410, L429, L431core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawRegisterKey.cppL264-265core/libs/prx/libSceAgcDriver/tests/Graphics.cppL3173-3174core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/StageIO.hppL51docs/dev/debt/libSceAgcDriver.mdL133-134core/libs/prx/libSceAgcDriver/Graphics/src/State.cppL905core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppL3905, L4023core/shader/recompiler/ControlFlow/src/RequestSerializer.cppL781, L815core/shader/recompiler/tests/RequestSerializerTests.cppL209, L248, L273, L397, L410, L429, L431core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppL3905, L4023core/shader/recompiler/ControlFlow/src/RequestSerializer.cppL781, L815core/shader/recompiler/tests/RequestSerializerTests.cppL209, L248, L273, L396-399, L410, L429, L431core/libs/prx/libSceAgcDriver/Graphics/src/ShaderInputState.cppL146-147, L174core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppL3905, L4023, L4169, L4172, L4178, L4184, L4190core/shader/recompiler/ControlFlow/src/RequestSerializer.cppL345, L407, L781, L815core/shader/recompiler/tests/RequestSerializerTests.cppL49, L209, L248, L273, L397, L410, L429, L431core/libs/prx/libSceAgcDriver/Graphics/src/State.cppL905core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppL3905, L4023core/shader/recompiler/ControlFlow/src/RequestSerializer.cppL781, L815core/shader/recompiler/tests/RequestSerializerTests.cppL209, L248, L273, L397, L410, L429, L431core/shader/recompiler/ShaderDiskCache.hppL16core/shader/recompiler/ShaderDiskCache.hppL16core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppL3905, L4023core/shader/recompiler/ControlFlow/src/RequestSerializer.cppL781, L815core/shader/recompiler/tests/RequestSerializerTests.cppL209, L248, L273, L397, L410, L429, L431Some 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.
core/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/libSceAgcDriver.mdcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Translation/include/Translation/InstructionTranslator.hppcore/shader/recompiler/Translation/src/InstructionTranslator.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/shader/recompiler/Optimization/src/ConstantFolder.cppcore/shader/recompiler/Recompiler.cppdocs/dev/debt/shader.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppdocs/dev/debt/shader.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawRegisterKey.cppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/tests/PixelAncillary.cppcore/shader/recompiler/ControlFlow/src/RequestSerializer.cppcore/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/StageIO.hppcore/shader/recompiler/Optimization/src/ConstantFolder.cppcore/shader/recompiler/Optimization/src/ShaderInfoCollector.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cppdocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawLookup.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawRegisterKey.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/ShaderDiskCache.hppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/shader.mddocs/dev/debt/shader.mdcore/libs/tests/PixelAncillary.cppcore/libs/prx/libSceAgcDriver/Execution/src/ShaderDeviceProfile.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/CacheKey.hppcore/shader/recompiler/ControlFlow/src/RequestSerializer.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/tests/RequestSerializerTests.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawLookup.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/shader/recompiler/Recompiler.hppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawLookup.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawRegisterKey.cppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/CacheKey.hppcore/shader/recompiler/ControlFlow/src/RequestSerializer.cppcore/shader/recompiler/Optimization/include/Optimization/ShaderStageInputInfo.hppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cppcore/shader/recompiler/Translation/src/ShaderInputInfoBuilder.cppcore/shader/recompiler/tests/RequestSerializerTests.cppdocs/dev/debt/shader.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/shader/recompiler/ShaderDiskCache.hppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/shader.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/ShaderDiskCache.hppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/ShaderDiskCache.hppdocs/dev/debt/shader.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawLookup.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawRegisterKey.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawLookup.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawRegisterKey.cppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/CacheKey.hppcore/shader/recompiler/ControlFlow/src/RequestSerializer.cppcore/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ProgramMetadata.hppcore/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/StageIO.hppcore/shader/recompiler/Optimization/include/Optimization/ShaderStageInputInfo.hppcore/shader/recompiler/Optimization/src/ShaderInfoCollector.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cppcore/shader/recompiler/Translation/src/InstructionTranslator.cppcore/shader/recompiler/Translation/src/ShaderInputInfoBuilder.cppcore/shader/recompiler/tests/RequestSerializerTests.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/shader.mddocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/shader/recompiler/CacheKey.hppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/CacheKey.hppcore/shader/recompiler/ControlFlow/src/RequestSerializer.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/ShaderDiskCache.hppcore/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cppcore/shader/recompiler/tests/RequestSerializerTests.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawLookup.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderInputState.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawLookup.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderInputState.cppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/CacheKey.hppcore/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ProgramMetadata.hppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/ShaderDiskCache.hppcore/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/shader/recompiler/Recompiler.hppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawRegisterKey.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Translation/include/Translation/InstructionTranslator.hppcore/shader/recompiler/Translation/src/InstructionTranslator.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/shader.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/shader/recompiler/CacheKey.hppcore/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ProgramMetadata.hppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/ShaderDiskCache.hppdocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cppcore/libs/prx/libSceAgcDriver/Execution/src/ShaderDeviceProfile.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/execution/SampleMaskMultisample.cppcore/shader/recompiler/CacheKey.hppcore/shader/recompiler/ControlFlow/src/RequestSerializer.cppcore/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/ProgramMetadata.hppcore/shader/recompiler/Optimization/src/HostInterpolationChecker.cppcore/shader/recompiler/Optimization/src/ShaderInfoCollector.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cppcore/shader/recompiler/tests/RequestSerializerTests.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppdocs/dev/debt/shader.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/ShaderDiskCache.hppcore/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/shader.mddocs/dev/debt/shader.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdImported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-16T12:17:28Z.
@EagleBearerYS an overlap note with #5907 (sample-zero rasterization of a multisampled scan into one-sample targets), which adriadam10 plans to merge once
mainbuilds. The bot doesn't list it, but both touchState.cppand the same debt entries, and they meet on the same draws:state.samples = 1,perSampleShading = false, andsampleLocationskeeps only sample 0's location in each pixel of the 2x2 grid. This PR'sPixelSampleLocationsreads the state after that, so a collapsed draw is treated as not iterated, with sample 0's offsets. That matches what #5907 assumes for these draws, so I don't see a conflict in behaviour.SampleId, so the host shades per sample andFragCoordmoves to sample 0's location. With this PR a non-iterated shader reads sample number 0 and noSampleId, so that refusal would no longer be needed. Whichever lands second can drop it. I can do that in a follow-up to #5907 if this one lands first.The textual conflict is small: the debt lines in
docs/dev/debt/libSceAgcDriver.md. Onimusha (PPSA27836) goes through #5907's path in its first scene load, so I can test this PR on the title once both are onmain.AI-assisted (Claude Code); I checked both diffs on
maineb901bcf4.Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-16T12:24:02Z.
Thanks, @simonbronk, that matches what I see.
PixelSampleLocationsas not iterated, with sample 0's offsets, which is what this PR assumes for it.mainafter #5907, and recheck the PERSP_CENTER/LINEAR_CENTER sentence against its offsets at the same time.git merge-treeof the two heads (2c1b825ae5anda61c30bff6) comes out clean, so only the debt text needs reading together.An Onimusha (PPSA27836) run once both are on
mainwould be very welcome.Imported from boykopovar/AnyPS5. Originally posted by klosixgaming-arch on 2026-10-19T00:52:37Z.
Tested on Windows 11, MinGW-w64 GCC 15.2.0, NVIDIA GeForce RTX 5090 (driver 617.42), Ryzen 9 9950X3D. Head
d13a90d01(10 commits) merged onto currentmain(a373e85e5); the merge is clean and builds.pixel_ancillary,agc_driver_pixel_sample_iteration,agc_driver_sample_mask_multisample,agc_driver_graphics,agc_shader_memory,agc_shader_bindlessandrequest_serializerpass with the change (theagc_shader_*tests that I did not build were not run).Not done: I did not run the new tests against
mainwithout the fix, did not run a title, and did not review the 32-file change (SPIR-VInterpolateAtOffsetuse, the new request fields and the sample-location handling). Because it changes the recompile request andShaderDiskCacheidentity, a second reviewer who knows those paths would be useful. This is a test report only, not an approval.AI-assisted: yes. Written with AI assistance and reviewed by me.