Repository navigation
feat(agc): draw PS4 color targets in the PRT tile modes - #22514
puridanish284 wants to merge 1 commit into
Conversation
A GCN color target in GB_TILE_MODE 11, 12, 16 or 17 threw. It now uses the tiling the texture path gives the same mode, with slices one whole surface apart and no per-slice bank rotation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Real-AMD coverage — the PRT tile-mode color targets land correctly across GCN5, RDNA2 and RDNA3.
On all four: "triangles drawn into slices 0 and 2 of three-slice arrays in GB_TILE_MODE 11, 12, 16 and 17 land where the texture path places those layers (13234 DisplayPrt / Display2DPrt / ThinPrt / Thin2DPrt texels each), and every other texel keeps its background." GCN5 is the native arch GB_TILE_MODE comes from, so good to have the PRT tiling confirmed on real GCN hardware alongside RDNA, beyond the lavapipe run. AI-assisted: yes |
|
Ran the Tested section's pattern with the Khronos validation layer on NVIDIA's proprietary driver and a real display, since the PR was tested on lavapipe only. Setup: Arch Linux (kernel 7.3.4), GCC 16.2.1, Release, NVIDIA GeForce RTX 4090 (vendor
New on the PR side and absent on main: No new AI-assisted: yes (Claude Code) |
|
Some 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.
|
|
Windows run, since the runs so far are on Linux (lavapipe, RADV and NVIDIA). Head Setup: Windows 11 Pro 10.0.26200, WinLibs GCC 15.2.0 r7 UCRT, Ninja, Release,
AI-assisted: yes |
MarcZX10
left a comment
There was a problem hiding this comment.
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 pinned repo_read.py reader. No test or build commands were run.
Results
| Check | Result | Note |
|---|---|---|
| Diff and changed lines | passed | All six changed files inspected |
| Build and tests | not run | Author reports 21 focused tests passed |
| Console behavior | not run | Author states this was not checked |
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.json were read, including all added lines; files.json lists no excluded changed files.
To get this to a good state
Nothing is required.
ligmaSec
left a comment
There was a problem hiding this comment.
Trial merging onto main a1b75b0947 conflicts in GcnColorTarget.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.
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:main5adb7d2: 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