feat(agc): rasterize a multisampled draw into one-sample targets at sample 0's locations #5907
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5907"
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 simonbronk on 2026-10-14T15:23:07Z.
What
With #5861 (merged), Onimusha: Way of the Sword (PPSA27836) gets past its checkerboard sample pattern, then stops at the next part of the same technique. It rasterizes with two samples into one-sample targets:
PA_SC_AA_CONFIGSPI_PS_INPUT_ENA/ADDRPA_SC_MODE_CNTL_00x00108001(2 samples)CB_COLOR_ATTRIB0(1 sample)0x302(PERSP_CENTER, POS_X, POS_Y)0x3DB_DEPTH_CONTROL0x002002f1)0x3020x3The sample locations are the checkerboard pattern from #5861: (+4, 0)/16 and (-4, 0)/16, swapped on odd rows.
DecodeStatethrew "a color target's sample count differs from the rasterizer's" and then "the depth target's sample count differs from the rasterizer's". Resident Evil Village (PPSA01556, #5169) uses the same two-sample rasterization into one-sample depth and color targets; its tester approximated it locally.A one-sample target can only keep the coverage of one sample. Vulkan defines this case through
VK_AMD_mixed_attachment_samples: color sample i is covered when raster sample i is covered, and the other raster samples are dropped. That extension exposes how AMD hardware treats a target with fewer samples than the rasterizer. The PS5 GPU is AMD, but this is not measured on PS5 hardware.When nothing else reads the other samples, that is the same as rasterizing one sample at sample 0's location. With the checkerboard grid, that location is (+4, 0)/16 on even rows and (-4, 0)/16 on odd rows. So:
rasterizesSampleZeroOnlyadmits a multisampled rasterizer when every target has one sample,MSAA_ENABLEis set, and there is no alpha-to-coverage and no sample-coverage pixel input:PS_ITER_SAMPLE, centroid inputs still throw. PERSP_SAMPLE, LINEAR_SAMPLE and ANCILLARY stay: a pixel shaded once is taken to get sample 0's barycentrics and sample index 0 (inferred, not measured). This rule follows fdfawef324's proposal for PPSA07411 below.PS_ITER_SAMPLE(#5673), only sample 0's invocation reaches the targets, so sample and centroid inputs are taken at sample 0 and the draw is shaded once (perSampleShadingis cleared). PPSA27836 needs this: during its first scene load it draws withPA_SC_MODE_CNTL_10x06030000andSPI_PS_INPUT_ENA0x2,0xb01(PERSP_SAMPLE, POS_X, POS_Y, POS_W), and without iteration0xf01.0x1b3/0x1b4reads stay behind the early conditions, as one-sample color draws may lack them.rasterizeSampleZerokeeps sample 0's location in each pixel of the grid, sets one sample, and marks the pattern custom or grid as it decodes. A one-sample depth target or the first one-sample color target triggers it. Any other mix still throws the same messages.VK_SAMPLE_COUNT_1_BIT).vkGetPhysicalDeviceMultisamplePropertiesEXTreports a 2x2 grid for one sample on both GPUs here, as for two.ValidateSampleLocationsonly enables sample locations for a one-sample draw when it has custom locations, so other one-sample pipelines are unchanged.SampleLocationsCompatibleDepthnow also answers for one sample. One-sample depth images are created withSAMPLE_LOCATIONS_COMPATIBLE_DEPTHwhere the device allows it, as multisampled ones already were. Vulkan requires that for a depth attachment drawn with custom locations.Tested
main0dab493f5:ctest -R "agc|shader|video_out"passes 622 of 623 on the RTX 5070 and 619 of 623 on the AMD iGPU. The common failure,agc_driver_store_over_untracked, fails the same way on plainmain(#6347); the other three on AMD are #5271's.main0afa6a607plus #5884, #5915 and #5815: the three sample-count refusals of the first scene load are gone, and the load goes on to #6374.mainf3434892bwith #5861:ctest -j 8on the RTX 5070: 1191 of 1192 pass;check_main_syncfails on a Windows code page and is unrelated;ctest -R "agc|shader|video_out"on the AMD iGPU: 555 of 558 pass; the three failures are the tests of #5271, which fail the same way onmainthere.agc_driver_graphics, new cases:ValidateSampleLocationsrefuses them without one-sample sample locations, or without a one-sample grid, and accepts them with both;PS_ITER_SAMPLE, ANCILLARY with POS_X or POS_Y, a two-sample color target beside a one-sample stencil target, andMSAA_ENABLEoff still throw. PERSP_SAMPLE, LINEAR_SAMPLE and ANCILLARY decode as one sample, also with a one-sample depth target.PS_ITER_SAMPLEalone, with sample and position inputs, and with centroid inputs, decodes as one sample without per-sample shading.AK::EventManager, as #5169 reports, intermittent). The next run went past both draws. It then stopped at an unrelated texture-dimension mismatch (a 3D T# where the program declares a 2D-array image) that no open PR covers yet.python tools/check_conventions.py --base upstream/main: passes.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 — not applicable.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-14T18:12:17Z.
Rebased onto
mained835aa76now that #5861 is merged; only this PR's commit is left (2ce4e57a5). It applied without changes.Tested again on Windows 11 Pro 26200, Release:
ctest -R "agc|shader|video_out"570 of 570 pass.main.python tools/check_conventions.py --base upstream/main: passes.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-14T18:20:51Z.
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/Graphics/src/State.cppL416-417, L1037, L1051docs/dev/debt/libSceAgcDriver.mdL121core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cppL122-123docs/dev/debt/libSceAgcDriver.mdL121core/libs/prx/libSceAgcDriver/Graphics/src/State.cppL1051, L1116-1117docs/dev/debt/libSceAgcDriver.mdL120-121Some 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/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/libSceAgcDriver.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/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.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/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.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/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.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/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdImported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-15T11:26:39Z.
With #5907, PPSA07411 (Resident Evil 4) gets past its color-target draws. It now stops on a depth-only draw of the same checkerboard kind, with "the depth target's sample count differs from the rasterizer's". The draw's registers:
PA_SC_AA_CONFIG0x00108001 (2x, MAX_SAMPLE_DIST 4, 2 exposed samples),PA_SC_MODE_CNTL_00x3 (MSAA_ENABLE),PA_SC_MODE_CNTL_10 (no PS_ITER_SAMPLE),DB_EQAA0,PA_SC_AA_MASKall ones.PA_SC_AA_SAMPLE_LOCSX0Y0 and X1Y0 0x0000040c, X0Y1 and X1Y1 0x00000c04. This is your PPSA27836 pattern with the rows swapped: sample 0 is at (-4, 0)/16 in the first row and at (+4, 0)/16 in the second.DB_Z_INFO0x20000183 (Z_32_FLOAT, one sample),DB_STENCIL_INFO0x20000181,DB_DEPTH_SIZE_XY0x077706a3 (1700x1912),DB_DEPTH_CONTROL0x007007e7 (GEQUAL test and write, stencil ALWAYS),DB_RENDER_CONTROL0.CB_COLOR0..7_INFO0,CB_TARGET_MASK0xffffffff,CB_SHADER_MASK0xf.SPI_PS_INPUT_ENA=SPI_PS_INPUT_ADDR= 0x00002001 (PERSP_SAMPLE and ANCILLARY, no center pair),DB_SHADER_CONTROL0x60 (KILL_ENABLE, Z_ORDER 2),SPI_SHADER_Z_FORMAT0.depthKeepsSampleZeroalready accepts a one-sample depth target with no color target, so depth-only is not the problem. The secondRequirethrows because 0x2001 hitsSampleDependentInputs.I think PERSP_SAMPLE, LINEAR_SAMPLE and ANCILLARY can stay on this path:
DB_EQAA.PS_ITER_SAMPLES0, a pixel is shaded once. I take its sample barycentrics and its ANCILLARY sample index to be those of sample 0. This is inferred, not measured. The registers above point the same way: a half-width target whose program reads only sample barycentrics, with sample 0 moved left or right a quarter pixel by row, only makes sense if those barycentrics are sample 0's.Sample-decorated ones.ValidateSampleLocationsalready requires that bit for custom locations, so the recompiler's barycentrics land on sample 0's location.SampleIdis 0 in a one-sample pipeline.The early return keeps the
0x1b3/0x1b4reads behind the same conditions as before. Reading them unconditionally makesagc_driver_graphicsfail with "missing register in context bank at DWORD 0x1b3" on one-sample color draws.I tested it in
multisampleTests(agc_driver_covered_centroid_state):queueand requires: one sample, a one-sample 1700x1912 depth target, no color target, sample 0 at (0.25, 0.5) in the first row and (0.75, 0.5) in the second, and an emptyDrawRejection.Without the change, the new block fails with exactly the game's message. With it, all eight tests backed by
agc_driver_graphics_testspass. I can paste the block if useful.Title run with this on top of your PR (Windows Server 2025, RTX 3060, driver 591.86, on a local stack of
main8cd937e29+ #6126 + #5884 + two local recompiler fixes): Resident Evil 4 no longer stops on this draw. It ran for the whole 1,485 s run window without a fatal error, and its frame dumps show the brightness calibration screen with both reference images. Before this, every dump of the title was black.Debt wording I used in place of "no sample, centroid, ancillary or coverage pixel inputs": "no centroid or coverage pixel inputs ... Such a draw keeps PERSP_SAMPLE, LINEAR_SAMPLE and ANCILLARY inputs: a pixel shaded once is taken to get sample 0's barycentrics and sample index 0, which is inferred, not measured. ... ANCILLARY with POS_X_FLOAT or POS_Y_FLOAT throws, since reading the sample index makes the host shade per sample, which moves FragCoord from the pixel center to sample 0's location."
A side point, which I recorded in the debt entry but did not change: by the same Vulkan rule, the PERSP_CENTER and LINEAR_CENTER inputs this path already accepts (for example
SPI_PS_INPUT_ENA2 in the PPSA27836 test) are also interpolated at sample 0's location on the host. The console uses the pixel center for them, so for these patterns they are a quarter pixel off horizontally.None of the other open sample-count PRs cover this draw. #5882, #6014 and #6196 handle MSAA_ENABLE clear, and #5915 handles a one-sample scan into a multisampled depth target; this draw has MSAA_ENABLE set, a 2x raster and a one-sample depth target.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-15T14:11:40Z.
@fdfawef324 thanks, this is great. I pushed it as a second commit, 7ad8cb8de, rebased on
main0dab493f5. It takes your rule as written:0x1b3/0x1b4reads stay behind the early return.The debt wording follows yours, including the PERSP_CENTER/LINEAR_CENTER note.
Onimusha needed one more case, and I hit it in the same load:
PS_ITER_SAMPLE. During its first scene load, PPSA27836 draws withPA_SC_MODE_CNTL_10x06030000into a one-sample depth target, withSPI_PS_INPUT_ENA0x2and then0xb01(PERSP_SAMPLE, POS_X, POS_Y, POS_W). A third draw has no iteration and0xf01, which your rule already covers. With iteration, only sample 0's invocation reaches one-sample targets. So the commit:PS_ITER_SAMPLEon this path;perSampleShadingwith the single sample.Coverage, and ANCILLARY with POS_X/POS_Y, still throw. This is inferred, not measured, and the debt entry says so.
Tests, in
agc_driver_graphics/covered_centroid_state:ctest -R "agc|shader|video_out"passes on the RTX 5070 and on the AMD iGPU, exceptagc_driver_store_over_untracked, which fails the same way on plainmain(#6347), and #5271's three tests on AMD.If you'd rather paste your test block too, I'll add it. Could you re-run RE4 on 7ad8cb8de to confirm it still reaches the brightness screen?
Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-15T14:13:34Z.
Thanks for taking it in. No need to add my test block; your RE4-style case covers that draw.
RE4 before 7ad8cb8de: a longer run of the same build as in my comment (
main8cd937e29+ #6126 + #5884 + 2ce4e57a5 with the change I proposed + #6405 + the read-lane variant discussed in #6277; Windows Server 2025, RTX 3060, driver 591.86) ran 2,096 s. It went on from the brightness calibration screen to the "About the Settings for Sending Play Data" screen. Neither this run nor the 1,485 s one logged a driver failure or a sample-count refusal. Both ended on the harness's timed dump, not on a stop:The RE4 draw that was refused has
PA_SC_MODE_CNTL_10, and these runs logged no other refusal, so thePS_ITER_SAMPLEpart should not change what RE4 does here. I'll still re-run it on 7ad8cb8de with the same stack and post the result.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-15T17:58:45Z.
A different one-sample-target case from a GL homebrew. It's data only, in case it matters for this rule.
OliSe Player (PPSA01153, catalog 02.001.000) draws through a radeonsi-based GL driver (
ps5-galliumin its log). With its MilkDrop preset "Rovastar - Dark Ritual (Star Of Destiny Mix)" it issues this draw (a throwaway print at the sample-count check):PA_SC_AA_CONFIG0x0020c002(4 samples, 4 exposed)VK_FORMAT_R8G8B8A8_UNORM; no depth targetPA_SC_MODE_CNTL_0/_10x23(MSAA_ENABLE) /0x0DB_EQAA0x02130000(OVERRASTERIZATION_AMOUNT 2, HIGH_QUALITY_INTERSECTIONS, INCOHERENT_EQAA_READS, STATIC_ANCHOR_ASSOCIATIONS)SPI_PS_INPUT_ENA/ADDR0x4002/0x4002(PERSP_CENTER, SAMPLE_COVERAGE)This matches radeonsi's polygon and line smoothing. With a one-sample framebuffer,
si_emit_msaa_configrasterizes withSI_NUM_SMOOTH_AA_SAMPLES= 4 coverage samples and setsOVERRASTERIZATION_AMOUNT(log2 4).si_shader.cthen enables SAMPLE_COVERAGE_ENA fornir_lower_poly_line_smooth, which scales alpha by the number of covered samples. So for this draw the pixel is shaded when any of the four samples is covered, and the shader needs the four-bit mask. Rasterizing sample 0 alone would drop edge pixels and give a one-bit mask, so refusing a sample-coverage input here, as this PR does, looks right to me.On
main(0029e62f9) this draw stops earlier, at the pixel input decode:unsupported SPI_PS_INPUT_ENA/ADDR bit combination (ena 0x4002 addr 0x4002), 2 of 2 runs with only that preset installed. I have a local branch that loads SAMPLE_COVERAGE fromgl_SampleMaskIn. With it, the same draw stops ata color target's sample count differs from the rasterizer's.Not checked: whether
VK_NV_framebuffer_mixed_sampleswithVK_NV_coverage_reduction_mode's merge mode (both reported on this RTX 4070 Ti) reproduces the overrasterized case. That would be a separate change, and I'm not asking for it here.AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-15T18:57:30Z.
Follow-up to my note above: #6530 now handles the overrasterized draw. It takes only draws whose
DB_EQAA.OVERRASTERIZATION_AMOUNTmatches the raster samples (radeonsi smoothing) and renders them throughVK_NV_framebuffer_mixed_sampleswith merged coverage. Your sample-0 rule is untouched, and the two sets of draws don't overlap. Whichever of us lands second has a small rebase at the sample-count check.AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-15T19:35:03Z.
Resident Evil Village (PPSA01556) data point for the ANCILLARY + POS_X/Y rule in 7ad8cb8de.
The setup: #5907 with fdfawef324's rule (as pushed in 7ad8cb8de), on
main6ea62f9b40with #6366 and #5703. RTX 3070 Laptop GPU.What happens: Resident Evil Village gets past the 0x2001 pass. It then stops at its next 2x depth-only pass, whose pixel program reads PERSP_SAMPLE, POS_X/Y_FLOAT and ANCILLARY (
SPI_PS_INPUT_ENA0x2301, PS_ITER_SAMPLE clear):That's the rule refusing ANCILLARY with POS_X/Y.
Where the rule comes from: what it guards against, the ancillary's sample field forcing sample shading and moving
FragCoord, comes from the recompiler giving that fieldSampleIdin every pixel shader. #6470 changes that. A pixel shader the guest doesn't iterate reads sample number 0, runs once per pixel, and keeps POS_X/Y whereSPI_BARYC_CNTLputs them (the pixel centre here).The combination: with #6470 merged into 7ad8cb8de, and the ANCILLARY + POS rule and its two refusal checks dropped:
04 04 0c 0c);ctest -R '^(agc|shader|recompiler)'passes 608/608 on that merge (lavapipe).Either merge order works. A Resident Evil Village boot with the combination follows.
Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-15T20:01:53Z.
Here is the RE4 (PPSA07411) re-run on 7ad8cb8de I promised. The machine and stack are the same as in my runs above, with 2ce4e57a5 and my proposed change replaced by your two commits (409f8b612 and 7ad8cb8de, cherry-picked unchanged). The stack still has the local diagnostic that adds the decoded sample state to any sample-count refusal message.
an address-based build copies 452 MiB of 1 registered ranges ...). Every frame dump from that run is black, so it may not have reached the 2x draws.Apart from that abort, neither run logged a sample-count refusal or any other driver failure. On RE4, 7ad8cb8de behaves the same as the change I proposed.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-15T21:11:32Z.
@fdfawef324 thanks for the two re-runs. Good to know 7ad8cb8de still gets RE4 to the brightness and play-data screens, and that the cold-cache stop is #5870's.
@EagleBearerYS agreed. The ANCILLARY + POS_X/Y refusal is there only because the recompiler gives the ancillary sample field
SampleIdin every pixel shader, and #6470 removes that. Whichever lands second drops the rule and its two refusal checks: if #6470 merges first I'll remove them here, otherwise it belongs in #6470's rebase. Onimusha's draws on this path don't read ANCILLARY, so it isn't affected either way. I'll wait for your Village boot with the combination before changing anything.Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-16T04:52:11Z.
@simonbronk here is the combined boot. Resident Evil Village (PPSA01556), Windows 11, RTX 3070 Laptop GPU (driver 617.42):
It reaches the lit title menu with no driver failure.
SPI_PS_INPUT_ENA0x2301) now draws, as does the 0x2001 pass before it.The tree (local, not pushed):
a61c30bff6).One note from after the run: when the window closed, the presenter thread faulted inside NVIDIA's driver (
nvoglv64.dll) during teardown. It's the first such fault in six clean closes today, and it came after the last frame. I'll report it separately if it happens again.Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-16T07:04:40Z.
Rebased onto
main5d9dcc42d(no textual conflict) and added2c1b825ae.#5882 (merged last night) lets a multisampled scan without MSAA_ENABLE through the earlier
DecodeStatecheck when there is no depth target. One of this PR's cases, a one-sample color target under a 2x scan with MSAA_ENABLE clear (singleScaninmultisampleTests), is therefore no longer refused with "without MSAA_ENABLE" but at the color sample-count check. The draw is still refused, as before:rasterizesSampleZeroOnlyrequires MSAA_ENABLE. The commit only changes the expected message. Without it,agc_driver_graphicsandagc_driver_covered_centroid_statefail onmain+ this PR.ctest -R "agc|shader|video_out" -j 8on Windows 11 26200: RTX 5070 (617.42) all pass; AMD gfx1036 iGPU fails only #5271's three tests. On both,agc_driver_gpu_indirect_arguments_misaligned_writer_aheaddoes not build with WinLibs GCC (#6452).@EagleBearerYS thanks for the Village boot with #6470 and the rule dropped. Reaching the lit title menu with no refusal is what I wanted to see before touching it. I'll drop the ANCILLARY + POS_X/Y rule and its two checks here as soon as #6470 is merged.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-16T11:34:59Z.
Re-checked against current main: the diff is unchanged from the version I reviewed (build and
libSceAgcDriverctest passed on the PR merged onto main,agc_driver_graphicsfails with the source changes reverted), and the title runs by @fdfawef324 (PPSA07411) and @EagleBearerYS (PPSA01556) are consistent with it. Current main does not build on Linux independently of this PR (PipelineJournal.cppsize asserts); merging once the full build is green.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-16T11:54:07Z.
Re-checked against current main: the diff is unchanged from the version I reviewed (build and
libSceAgcDriverctest passed on the PR merged onto main,agc_driver_graphicsfails with the source changes reverted), and the title runs by @fdfawef324 (PPSA07411) and @EagleBearerYS (PPSA01556) are consistent with it. Current main does not build on Linux independently of this PR (PipelineJournal.cppsize asserts, fix in #6784); merging once the full build is green.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-16T18:16:28Z.
Re-checked against current main: build and
libSceAgcDriverctest pass on the PR merged onto it (onlyagc_driver_tessellationsegfaults, as on main), andagc_driver_graphicsfails with the source changes reverted. The title runs by @fdfawef324 (PPSA07411) and @EagleBearerYS (PPSA01556) are consistent with it. Merging once the full build is green.