feat(agc): draw PS4 color targets in the PRT tile modes #22514
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/22514"
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 puridanish284 on 2026-11-17T18:25:32Z.
What
A PS4 (GCN) color target in GB_TILE_MODE 11, 12, 16 or 17 (the display and thin PRT modes, 1D and 2D) threw
PS4 color target tile mode index N is not implemented, although textures in the same modes already decode.DecodeGcnColorBuffernow accepts them as four newColorTileModevalues that map to the existingkGcnDisplayPrt,kGcnDisplay2DPrt,kGcnThinPrtandkGcnThin2DPrttexture modes, soColorTargetLayoutand the resident image useGcnTiling's PRT geometry. Slices are one whole surface apart and, as for PRT texture layers (layerBankStep0), take no per-slice bank rotation.macroTilednow comes fromIsGcnMacroTiled, so the existing refusal of multisampled later slices covers the PRT modes too. GB_TILE_MODE 15 and 18 to 30 still throw. A debt fragment adds aPS4 (GCN) PRT color targetsentry (not checked on a console; partly resident PRT surfaces are not modeled).Tests:
GcnPrtColorTarget(agc_driver_gcn_prt_color_target): fills three-slice 128x128 RGBA8 arrays in each of the four modes through the texture path's placement, draws a triangle into slices 0 and 2 and checks every texel is either its background or the drawn color at the place the texture path gives it. Mutation check: mappingGcnThinPrttokGcnThin2DPrtfails it (ThinPrt slice 0: the texel the texture path places at (16, 27) holds 08 1b 10 ff, neither its background nor the color drawn for it).GcnColorTarget.cppPrtTargetsDecode: each mode decodes as its PRT tile mode over one 128x128 macro tile, slice 1 lands one macro tile further on without a bank XOR, a target half a macro tile tall is refused, and mode 15 still throws.Tested
WSL2 Ubuntu on Windows 11, Release build with GCC, lavapipe (Mesa 25.2.8). Same 20 focused tests (
ctest -R '^(agc_driver_gcn_|agc_gcn_|agc_driver_graphics$|agc_driver_[a-z0-9_]*color_target$)',agc_gcn_vop3_compare_truenot built) withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,VK_LOADER_DEBUG=layer:main5adb7d22ab: 20/20 passed, 17Insert instance layer "VK_LAYER_KHRONOS_validation"lines, nowas not foundline, 51VUID-VkDeviceCreateInfo-pNext-pNext.agc_driver_gcn_prt_color_target), 18 insert lines, nowas not foundline, 54VUID-VkDeviceCreateInfo-pNext-pNext.The only validation ID on both is the device-creation one from Ubuntu's older 1.3.275 layer (#17693), three per test; the change adds no new
VUID-. No title was run.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)tools/pr_overlap.pyfailed closed. #18177 and #22140 conflict only whereGcnColorTarget.cpp'smain()lists its test calls. #22140 materializes partial CMASK fast clears ofGcnThin2DandGcnDisplay2Dtargets only, so a fast-cleared 2D PRT target keeps its current path whichever merges first. The other PRs it could not compare (#1395, #6188, #6235, #6804, #7256, #9895, #10249, #11825, #20845) do not touch the GCN color tile-mode switch orColorTextureTileMode.🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T08:38:04Z.
Review: COMMENTED
Reviewed — no blocking findings
The changed code and all added lines support the stated PRT color target behavior; I could not run the reported checks in this review environment.
What I ran
Reviewed head
0122daa352b8cc2975f03a0490aec9967e99d752. I inspected the prepared diff and traced the changed layout and decode logic with the pinnedrepo_read.pyreader. No test or build commands were run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
I did not run the build or tests, so the reported test results are author-provided. Physical console behavior and partly resident PRT surfaces were not verified. The six changed files listed in
review/manifest.jsonwere read, including all added lines;files.jsonlists no excluded changed files.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T22:09:47Z.
Review: COMMENTED
Trial merging onto
maina1b75b0947conflicts inGcnColorTarget.cpp. The new modes reuse the texture path's PRT geometry, so the nonzero slice case matters as much as the register decode. Please preserve the tests for whole-surface slice spacing and no per-slice bank rotation while retaining the refusal of multisampled later macro-tiled slices. The paired Vulkan run is pending the merge resolution.AI-assisted: yes.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.