Repository navigation
fix(shader): gather the BASE_ARRAY face of a cube T# with DIM 2D - #23519
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Ran the new test and the cube and gather tests with the Khronos validation layer on Linux and an NVIDIA GPU, plus the negative check against main's recompiler sources. Setup: Arch Linux (kernel 7.3.4), GCC 16.2.1, Release, NVIDIA GeForce RTX 4090 (vendor
Negative check: with No new AI-assisted: yes (Claude Code) |
|
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.
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.
|
|
Head No new failures and no new validation messages on either GPU.
Layer runs used AI-assisted: yes |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing in the inspected change blocks merging; the author-reported test results are not independently verified here.
What I ran
Reviewed head b2393574c7c05b0c7f88bd2077a7ae12c8d7a861 from the prepared diff and source reader. No build or tests were run.
Results
| Check | Result | Note |
|---|---|---|
| Diff and changed source | passed | Four changed files inspected |
| Build and tests | not run | Results in the PR description are author-reported |
Findings
Blocking
None.
Non-blocking
None.
Not verified
No tests or build were run. The PR description reports GPU tests and hardware measurements; these were not independently verified. Read all four changed files listed in the manifest: core/libs/prx/libSceAgcDriver/tests/execution/ImageGatherFaceOnCube.cpp, core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp, core/shader/recompiler/Optimization/src/ResourceTracker.cpp, and docs/dev/debt/changes/fix-cube-face-gathers.md. No changed files were excluded by the manifest.
To get this to a good state
Nothing is required.
|
Tested on Intel Arc B390 (Mesa 26.2.7 ANV, Linux 7.2.10), PR head
AI-assisted: yes (Claude Code) |
#23519 added fix-cube-face-gathers.md while fix-shader-cube-face-converted-store.md already changed the same shader entry, so debt_fold --check and the Conventions check fail on main. The merged fragment keeps both changes: gathers and converted stores take the cube-face mode, and the gathers' Functional entry stays.
What
image_gather4andimage_gather4_lzwith DIM 2D through a cube T# threwimage descriptor is incompatible with the static runtime image interface. The cube-face mode (#4139), which samples the T#'sBASE_ARRAYface, was offered only to loads, stores andimage_sample,_lzand_l.ResourceTracker.cpp: a gather with no LOD, bias, offset or comparison (imageSampleFlags0 or LevelZero) keepscubeFaceCompatibleset, so the image is offered the cube-face mode.ResourceMaterializer.cpp:multisamplePlaneReadalso usescubeFaceCompatible. It now requires!image.gathered, so a DIM 2D read of a 2D MSAA T# still refuses gathers as before.2D accesses through a cube T#entry lists the two gathers among the accesses that take the mode, and its throw list now says "other gathers". A new entry records the measurement.No cache format change:
cubeFaceCompatibleis an existing field.Measurement:
tools/hw-oracleon gfx1036 (PC RDNA2), point S#, 32 coordinates in [1, 2] per case. The sources were a 64x64 32_FLOAT and 32_32_32_32_FLOAT cube, and a 12-face cube array atBASE_ARRAY0, 6 and 7.image_gather4/_lzwith DIM 2D vs DIM CUBE face 0DISABLE_CUBE_WRAP1BASE_ARRAY0, 6 and 7DISABLE_CUBE_WRAP0Tested
Windows 11 Pro 10.0.26200, MinGW Release build.
ctest --test-dir build -R <pattern> -VwithANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer, on an NVIDIA GeForce RTX 5080 (610.74) and an AMD Radeon(TM) Graphics iGPU (gfx1036, 32.0.21045.16010). Each log shows the loader inserting the validation layer, none reports it missing, and there are noVUID-messages.agc_driver_image_gather_face_on_cube: 32 threads gather a 16x16 8_8_8_8_UNORM cube array (12 faces,BASE_ARRAY6) with DIM 2D:image_gather4_lzof R and G must return the x and y footprint.image_gather4of B must return face 6 for all four texels.main'sResourceTracker.cppandResourceMaterializer.cpp, the test fails on both GPUs withimage descriptor is incompatible with the static runtime image interface.agc_driver_*cube*,*msaa*,*gather*,*multisample*,agc_driver_image_sample*,agc_shader_memory):mainon this machine:agc_driver_image_sample_lod_clampandagc_driver_image_sample_lod_clamp_shader_lane(known NVIDIA baseline);agc_driver_msaa_dcc_unwatch(fails 3/3 runs both with and without this change).msaa_dcc_compared_importcases skip on both GPUs.tools/pr_overlap.pycannot compareResourceMaterializer.cppagainst the PRs that conflict withmain. Among open PRs on cube-face accesses, #20982 and #22534 change cube-face stores, not gathers. Not tested on a PS5.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