fix(agc): read a one-fragment multisampled T# as a 2D image #18660
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18660"
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 DealPotato on 2026-11-12T00:18:30Z.
What
A 2D MSAA T# holds log2 of its fragment count in LAST_LEVEL (RDNA2 ISA, image resource descriptor: "for MSAA, set to log2(num_samples)"), so LAST_LEVEL 0 describes one fragment, a single-sample surface. Both the recompiler's descriptor check and the driver's decoder required 2 to 16 fragments. WWE 2K26 (PPSA34299) reads such a T# (
148e2800 c1400000 010dc1df e1800204 00000000 00700000 00000000 00000000, 32-bit UINT, 1920 wide) with a 2D instruction in a compute shader and stopped withruntime image descriptor is invalid.A one-fragment 2D MSAA T# (base level 0, LAST_LEVEL 0, MAX_MIP 0) now decodes as the single-sample 2D image it describes: in the driver's
DecodeTextureResource, and in the recompiler for 2D and 2D-array reads. A multisample instruction on such a T# is still refused (poisoned with the multisampled reason), since its fragment coordinate has no counterpart in a 2D image.Tested
Windows 11 Pro (build 26300), NVIDIA GeForce RTX 4070, driver 610.88, with
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1,ANYPS5_REQUIRE_VULKAN=1andctest -V; the loader inserted the validation layer.agc_driver_graphics: passes onmain(3a0a54bbd8) and on the change. Its GuestTextureResource case that expected the one-fragment T# to be rejected now expects it to decode as a 297x297 single-sample 2D image.agc_shader_memoryandshader_memory_decoder_tolerance: pass on the change (not run onmain). The newverifyOneFragmentMultisampleReadcase takes the title's T#: a 2D read selects the 2D runtime mode, with or without cube-face compatibility, and a multisample read is refused.VUID-message in the logs.mainplus #18654 and the other fixes it needs: without this change it stops at the T# above about 90 s after boot; with it, it runs past that point to the next, unrelated stop (a native multisample stencil plane import).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
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T09:22:32Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the one-fragment descriptor is treated as 2D for 2D reads and multisample reads remain rejected.
What I ran
Reviewed head
dfeb58b23e54163ebc8179ed08b65e402ff16224using the prepared diff andrepo_read.pyfor targeted source ranges. No tests or build commands were run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
Read
description.md,commits.md,manifest.json,diff.patch, and the complete changed filesGuestTextureResource.cppandResourceMaterializer.cpp. Read the changed portions and surrounding test context inShaderMemory.cppandGuestTextureResource.cpp; the full text ofShaderMemory.cppwas excluded from the review folder as too large. Tests, build, and reported Windows/GPU/title behavior were not independently verified.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-15T04:30:36Z.
Review: APPROVED
Reviewed — looks good
The changed code supports the stated one-fragment descriptor behavior, and I found no verified blocking defect; the changed ShaderMemory.cpp test code was read directly at the pinned head.
What I ran
Reviewed head
881d4a6752393c9e86086e242dcbae527a5aa1bdusing the prepared diff andrepo_read.pyto inspect targeted source and test ranges. No test or build commands were run. The author reports Windows 11 and NVIDIA RTX 4070 testing in the PR description; those checks were not run by me.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
Builds, automated tests, Vulkan validation output, and WWE 2K26 behavior were not independently verified.
ShaderMemory.cppwas excluded from the preparedfiles/bundle because of its size; its changed lines were read through the repository reader. The other changed files were included infiles/, and their changed lines were read.To get this to a good state
Nothing is required.