Skip to content

fix(shader): store through a cube face for 32_SINT, 16_16_FLOAT and 16_16_16_16_FLOAT images - #20982

Closed
brumskysb wants to merge 1 commit into
boykopovar:mainfrom
brumskysb:fix/shader-cube-face-conversion-store
Closed

brumskysb wants to merge 1 commit into
boykopovar:mainfrom
brumskysb:fix/shader-cube-face-conversion-store

Conversation

@brumskysb

Copy link
Copy Markdown
Contributor

What

A DIM 2D image_store through a cube T# is refused for images whose format is written through a conversion: 32_SINT (21), 16_16_FLOAT (29) and 16_16_16_16_FLOAT (71). ResourceMaterializer::RuntimeImageModes offers the cube face mode only when conversion == IrBufferFormat::Invalid, and the decode sets conversionFormat for those three storage formats, so the store aborts with image descriptor is incompatible with the static runtime image interface.

The measured rule (RDNA2 gfx1036, driver 31.0.22044.1, #16491, merged as dbf9b78; evidence https://gist.github.com/brumskysb/0f2d44c209a50bfbfd23f2a1ac451e86): image_store v4, v[5:6], s[8:15] dmask:0x1 dim:SQ_RSRC_IMG_2D through a cube T# (type 11, DEPTH 11, BASE_ARRAY 0 and 6) writes the 64 texels of the 8x8 face selected by BASE_ARRAY and no other byte of the 64 KiB backing, for 8_8_8_8_UNORM, 8_8_8_8_SNORM, 32_SINT, 16_16_FLOAT, 16_16_16_16_FLOAT and 32_FLOAT. I recounted the dumps twice: with the script that generated the test's tables, and with a second script that parses the literal tables back out of the test source and compares them with the raw 16,384-dword backing (10 format x BASE_ARRAY combinations: 64 dwords moved, 128 for the 8-byte format, 0 outside the face, 0 face dwords untouched, 0 word mismatches; its controls fire). The per-texel words follow the rules the test pins: components outside dmask:0x1 are written as zero, and the 32_SINT store writes the register dword unconverted. The store words the test dispatches (0xf0200108 0x0001141e) disassemble to the measured instruction.

The change is one predicate: the cube face mode is also offered when conversion is Format32SInt, Format16_16Float or Format16_16_16_16Float. The written-not-read, no-atomic, no-dynamic-mips condition (cubeFaceStorage) is unchanged, and the emitter needs no change. Every other conversion format (8_8_8_8_SINT, 16_16_SINT, 16_16_16_16_SINT, 16_FLOAT, the 10_11_11 and 11_11_10 families, 5_6_5 and the other packed formats), atomics, images the program also reads, and mip stores stay refused: they are not measured. The sample decision of the entry does not apply (this is a store).

Tests: ImageStoreFaceOnCube.cpp (existing ctest agc_driver_image_store_face_on_cube) keeps its 32_UINT and 32_FLOAT rows and adds 8_8_8_8_UNORM, 8_8_8_8_SNORM, 32_SINT, 16_16_FLOAT and 16_16_16_16_FLOAT at BASE_ARRAY 0 and 6 with the measured words, the face-landing and nothing-else-changed check, an identical store through a plain 2D T# for each new format, and refusal rows for 8_8_8_8_SINT and 16_FLOAT through a cube T#. ShaderMemory.cpp gets verifyCubeFaceConversionStoreMode (mode selection for the three formats, modes.size() < ImageTableAbi::MaxModes, refusal of three other conversion formats and of an atomic 32_SINT).

Debt: the fragment docs/dev/debt/changes/fix-shader-cube-face-conversion-store.md replaces only the item formats written through a conversion such as 32_SINT in the final sentence of the entry [2D accesses through a cube T#]. The entry was already over the 1,000-character guideline (3,274 characters, 3,384 after); tools/check_conventions.py reports that one debt-length warning and no errors. No measured condition was trimmed.

CHANGE SUMMARY (the only span that differs between the entry on main and the fragment, computed from both texts):

  • before: formats written through a conversion such as 32_SINT
  • after: a format written through a conversion other than the 32_SINT, 16_16_FLOAT and 16_16_16_16_FLOAT dmask:0x1 stores above (every other such format is not measured)

Tested

Linux 7.0.0-43-generic (Ubuntu 26.04.1), lavapipe (llvmpipe (LLVM 21.1.8, 256 bits), Mesa 26.0.8), Khronos validation layer inserted by the loader in every Vulkan run, no was not found but was requested. The rule itself was not run on hardware here. Every log, the scripts and the recount: https://gist.github.com/brumskysb/4a58f73a74293731846c9e7e4111c6bf

  • Head 8d61bef655 rebased on 7085a08145: agc_driver_image_store_face_on_cube (21 rows), agc_driver_image_store_volume_through_array, agc_driver_image_store_array_through_volume, agc_driver_image_store_line_through_plane, agc_driver_image_store_line_through_plane_array and agc_shader_memory all pass, 0 VUID- lines in every log. Main before the change (545e7b64a1): the same tests pass, 0 VUID-.
  • The same head with only ResourceMaterializer.cpp set back to main: agc_driver_image_store_face_on_cube fails on exactly the six cube rows for 32_SINT, 16_16_FLOAT and 16_16_16_16_FLOAT (BASE_ARRAY 0 and 6) with image descriptor is incompatible with the static runtime image interface: descriptor format 21 decodes to {class 2, dim 5, conversion 21, packed 0, cube 1, ...} (29 and 71 likewise); the 32_UINT, 32_FLOAT, 8_8_8_8_UNORM and 8_8_8_8_SNORM cube rows, all five plane control rows and both refusal rows pass. agc_shader_memory fails with the same message. After restoring the source both pass.
  • Mutations of the predicate (run before the rebase, on 545e7b64a1; the rebase changed none of these lines; each restored and proven identical with git diff + cmp): dropping Format32SInt fails only the two 32_SINT rows; dropping Format16_16Float only the two 16_16_FLOAT rows; dropping Format16_16_16_16Float only the two 16_16_16_16_FLOAT rows; removing the conversion condition fails both refusal rows; adding Format16Float fails only the 16_FLOAT refusal row; adding Format8_8_8_8SInt fails only the 8_8_8_8_SINT refusal row. Each of the six also fails agc_shader_memory.
  • tools/debt_fold.py --check exit 0; tools/check_conventions.py --base origin/main: 1 finding (debt-length), 0 errors.
  • Overlap: tools/pr_overlap.py --branch on the commit before the rebase probed 1,593 open PRs, 85 share files with the branch, no line conflict and no same-export row; it exits 2 because 29 old PRs conflict with main itself and their shared files could not be compared. A first run had shown line conflicts with feat(agc): sample unsigned scaled textures through UNORM views #16260 and fix(shader): accept 3D image stores on 2D T#s #20792 in ShaderMemory.cpp; moving the new test function resolved them. By hand, on a fresh scan with positive and negative controls (in the gist), 48 open PRs touch ResourceMaterializer.cpp or ImageStoreFaceOnCube.cpp and none changes the cube-face predicate; five touch the test file (feat(agc): look up table images at run time through a device image table on the GPU heap (APS5_GPU_PATH) #7642, feat(agc): GPU descriptor heap on VK_EXT_descriptor_heap (APS5_GPU_HEAP) #9508, feat(agc): serve lane-keyed, pointer and runtime image-table columns #10193, feat(agc): resolve table samplers through device image keys #13928, feat(agc): resolve runtime sampler addresses through device image keys #13929: large image-table and descriptor-heap PRs that conflict with main). fix(shader): store image channels by RDNA2's DST_SEL rule for the format #19096 (store DST_SEL channel selection) touches the store emitter, not these files; the rows here use the identity DST_SEL with dmask:0x1.
  • Not tested on the PS5 or on gfx1036; the rule itself was measured on gfx1036.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: lavapipe (llvmpipe (LLVM 21.1.8, 256 bits), Mesa 26.0.8), Linux 7.0.0-43-generic, Ubuntu 26.04.1; the rule itself was measured on gfx1036 (driver 31.0.22044.1) in docs(shader): record the measured cube-T# store formats #16491 and these tests were not run on that hardware
  • AI-assisted: yes

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

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.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 22534 core/libs/prx/libSceAgcDriver/tests/execution/ImageStoreFaceOnCube.cpp L76, L79-81, L93-94, L112, L114, L162-167
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp L2370

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.

Pull request Shared files not compared
PR 5371 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 6235 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6280 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 6412 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 6488 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 7395 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 7642 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/libs/prx/libSceAgcDriver/tests/execution/ImageStoreFaceOnCube.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 7684 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 7689 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 8939 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 9356 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 9387 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 9508 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/libs/prx/libSceAgcDriver/tests/execution/ImageStoreFaceOnCube.cpp
PR 9633 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 9749 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 9790 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 9897 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 9969 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 10193 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/libs/prx/libSceAgcDriver/tests/execution/ImageStoreFaceOnCube.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 10359 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 11483 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 11551 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 12324 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 12828 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 13928 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/libs/prx/libSceAgcDriver/tests/execution/ImageStoreFaceOnCube.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 13929 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/libs/prx/libSceAgcDriver/tests/execution/ImageStoreFaceOnCube.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 14032 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 14561 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 14853 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 14871 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 14944 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 15548 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 15555 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 16260 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 16472 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 16631 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 16812 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 16814 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 17611 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 18106 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 18107 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 20030 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 20111 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 20130 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 20153 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 20187 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 20248 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 20519 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 22071 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 22251 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 22328 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 22424 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 22439 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 22647 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 23242 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 23243 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 23244 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 23344 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 23409 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 23553 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 23811 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 23818 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp

@domx4q

domx4q commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Linux NVIDIA run with the Khronos validation layer, since the description lists only lavapipe.

Setup: Arch Linux, kernel 7.3.4, GCC 16.2.1 Release, NVIDIA GeForce RTX 4090 (10de:2684), driver 620.70.06, Vulkan 1.4.357, Khronos validation layer 1.4.363.1. Head 8d61bef655 merged with --no-ff onto main e4caa07950 (e61bebf4ab, clean merge).

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer ctest --test-dir build -R '^(agc_driver_image_store_face_on_cube|agc_shader_memory)$' -V
main e4caa07950 this PR
ctest 2/2 passed 2/2 passed
Insert instance layer "VK_LAYER_KHRONOS_validation" 1 1
was not found but was requested by env var VK_INSTANCE_LAYERS 0 0
VUID- 0 0

On main both tests run without the rows this PR adds (the new formats in agc_driver_image_store_face_on_cube, verifyCubeFaceConversionStoreMode in agc_shader_memory). The layer line comes from agc_driver_image_store_face_on_cube; agc_shader_memory creates no Vulkan instance. The log shows Selected GPU name=NVIDIA GeForce RTX 4090.

No new VUID- errors; all focused tests pass on Ada, including the new 32_SINT, 16_16_FLOAT and 16_16_16_16_FLOAT cube-face rows.

AI-assisted: yes (Claude Code)

@github-actions github-actions Bot added shader core/shader docs agc libSceAgc* labels Nov 16, 2026
@maskym

maskym commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Windows + NVIDIA result for head 8d61bef655, merged alone into main e069a7562f (the PR's Tested section names no Windows run).

Host: Windows 11 26300, Intel i7-12700K, NVIDIA GeForce RTX 2070 SUPER, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, BUILD_TESTING=ON, Ninja. main itself fails to compile one test on Windows at this commit (UploadCacheReadOnlyFlush.cpp:177, setenv; #19899 fixes it), so both trees were built with ninja -k 0.

Validation-layer protocol on main and on this PR (ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation 1.4.366, VK_LOADER_DEBUG=error,warn,layer, ctest -R '^(agc|guest_video_out|video_out|pad_sdl)' --parallel 4 -V):

Tree Passed Layer inserted was not found but was requested VUID- set
main 2050/2054 1856 0 none
this PR 2051/2054 1856 0 identical

agc_driver_upload_cache_read_only_flush is Not Run on both trees because of the main build break above. No new validation errors and no new failures. The failures on this PR's tree (agc_driver_stencil_plane_memory, agc_driver_msaa_dcc_unwatch) also fail on main here; rerun alone on this PR's tree they pass 0 of 3 times. agc_driver_store_over_untracked failed in the main run but passed in this PR's run.

The tests this PR adds or changes (agc_driver_image_store_face_on_cube, agc_shader_bindless, agc_shader_descriptor_phis, agc_shader_empty_table_resolution, agc_shader_entry_lane_proof_budget, agc_shader_frontend_pair, agc_shader_frontend_pair_off, agc_shader_image_limits_mixed, agc_shader_image_limits_refusals, agc_shader_image_limits_table, agc_shader_layer_specialization_release, agc_shader_layout_pair, agc_shader_layout_pair_off, agc_shader_memory, agc_shader_memory_coherent_atomic_loads, agc_shader_nested_snapshot_retry, agc_shader_quad_mask_no_demote, agc_shader_region_merge, agc_shader_registered_view_churn, agc_shader_result_memo_budget, agc_shader_result_memo_budget_masked, agc_shader_result_memo_budget_threads, agc_shader_sampler_limits, agc_shader_selected_records_direct_image_limit, agc_shader_selected_records_direct_pair_limit, agc_shader_selected_records_image_limit, agc_shader_selected_records_pair_limit, agc_shader_shared_table_resolution, agc_shader_specialized_bda_abi_none, agc_shader_srt_read_patching, agc_shader_table_binding_growth, agc_shader_table_keep, agc_shader_table_resolution_growth, agc_shader_table_snapshot_reuse, agc_shader_table_snapshot_reuse_unmasked, agc_shader_type_zero_image_materialization) pass in the full validation-layer run. Not run on a PS5.

AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine.

@rafaconvaitis

Copy link
Copy Markdown
Contributor

Windows + AMD run; I found no AMD run in the description or in the comments. Head 8d61bef655 merged alone onto main 3c07e1d05e with git merge --no-ff (clean merge).

Setup: Windows 11 25H2 (build 26200), AMD Radeon 760M integrated graphics (1002:15bf, Vulkan device name Radeon 5), AMD Software 26.11.2 (driver 32.0.32029.2010, Vulkan 1.4.359), selected with ANYPS5_GPU=Radeon, WinLibs GCC 15.2.0 r7 UCRT, Release, BUILD_TESTING=ON, Khronos validation layer 1.4.363 (LunarG SDK 1.4.363.1). Only the focused test targets were built; the other execution tests were left out with ANYPS5_AGC_EXECUTION_TESTS.

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer, ctest -R '^(agc_driver_image_store_face_on_cube)$' -V -j 1, 3 runs per side.

test main this PR this PR's tests on main's sources (1 run)
agc_driver_image_store_face_on_cube passes 3/3 passes 3/3 fails
  • Negative control: with the tests of this PR built on main's sources (without the 1 production file this PR changes), agc_driver_image_store_face_on_cube does not pass, so on this driver the test detects the change. The failing run logs a ShaderRecompiler::Recompile error, image descriptor is incompatible with the static runtime image interface.
  • VUID- lines: 0 in the main and PR logs. Every run logs Selected GPU name=Radeon 5 vendor=0x1002 device=0x15bf and Insert instance layer "VK_LAYER_KHRONOS_validation", and none logs was not found but was requested.

AI-assisted: yes (build and runs scripted with an AI assistant, on the hardware above).

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

Nothing blocks this change; the implementation and included test coverage support the measured cube-face store cases.

What I ran

Reviewed head 8d61bef655fd6a55c8cb312be1eac6b71a667a11. Read the prepared description, commit summary, manifest, diff, and changed source context through repo_read.py. I ran no commands or tests.

Results

Check Result Note
Source review passed All changed files reviewed
Tests not run Relied on author-reported results

Findings

Blocking

None.

Non-blocking

None.

Not verified

I did not run the test suite or independently verify the hardware measurements and author-reported test results. The changed files read were core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp, core/libs/prx/libSceAgcDriver/tests/execution/ImageStoreFaceOnCube.cpp, core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp, and docs/dev/debt/changes/fix-shader-cube-face-conversion-store.md. All files listed as reviewed in files.json were read; none was excluded by rule.

To get this to a good state

Nothing is required.

@ge9x0

ge9x0 commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

AMD RADV Linux run with the Khronos validation layer (I don't see an RADV run in the thread yet).

Setup: Fedora 44, kernel 7.3.4, GCC 16.2.1, Release. AMD Radeon RX 7700 XT (RADV NAVI32, RDNA3), Mesa 26.2.7, Vulkan 1.4.354, Khronos validation layer 1.4.341. Head 8d61bef655 merged with --no-ff onto main e481b13555 (clean); the baseline is e481b13555 itself, same build directory and machine.

Command (both arms): ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer ctest --test-dir build -R '<pattern>' -j6 -V, with one pattern covering the tests this PR and nine other shader PRs touch, run on main and on each merge.

tests passed Insert instance layer "VK_LAYER_KHRONOS_validation" was not found but was requested VUID-
main 14 14 11 0 0
this PR 14 14 11 0 0

agc_driver_image_store_face_on_cube ran on the RADV device with the layer inserted and passed. The CPU-side tests this PR touches also pass: agc_shader_memory, agc_shader_memory_coherent_atomic_loads and shader_memory_decoder_tolerance. No new validation errors.

AI-assisted: yes

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 21, 2026
@brumskysb

Copy link
Copy Markdown
Contributor Author

Closing this as superseded by #22534 (milescoviello, merged 2026-11-21 as 8fe06b5).

This PR let three converted formats (32_SINT, 16_16_FLOAT, 16_16_16_16_FLOAT) take the cube-face store mode in ResourceMaterializer::RuntimeImageModes. #22534 changed the same condition to conversion == IrBufferFormat::Invalid || (storage && cubeFaceStorage). That accepts every converted store to an image the program only stores to, which includes these three. The debt entry on main now says so. This PR's fragment says the other conversions still throw, which no longer matches the code. A rebase would only undo part of #22534.

Thanks to @MarcZX10 for the review and to @domx4q, @maskym, @rafaconvaitis and @ge9x0 for the NVIDIA, AMD and RADV runs. The behaviour they validated is the behaviour main now ships.

@brumskysb brumskysb closed this Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* docs needs rebase Conflicts with main, rebase needed shader core/shader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants