Skip to content

fix(shader): answer image_get_resinfo on any T# dimension - #7550

Merged
adriadam10 merged 2 commits into
boykopovar:mainfrom
gjonn:fix/shader-resinfo-any-descriptor-dimension
Oct 24, 2026
Merged

adriadam10 merged 2 commits into
boykopovar:mainfrom
gjonn:fix/shader-resinfo-any-descriptor-dimension

Conversation

@gjonn

@gjonn gjonn commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

What

image_get_resinfo with DIM 1D on a T# that is a cube, 3D or 2D array is refused on main:

ShaderRecompiler::Recompile: image address has too few coordinate components

The tracker turns the size query into a 1D image, and ResourceMaterializer finds no 1D mode that matches such a T#. But the size, layer count and level count that image_get_resinfo returns come from the T#. DIM only sets how many address registers the instruction reads. main already treats size queries on flat volumes this way.

PPSA01317 does this in a pixel shader: it asks the size of a 64x64 cube T# (6 faces, 7 levels) with DIM 1D.

Change:

  • ImageResource gets dimensionQueryOnly. The tracker clears it when the image is used by any operation other than ImageQueryDimensions.
  • A 1D image that only dimension queries use decodes the T#'s own dimension. RuntimeImageModes adds 2D, 1D array, 2D array, 3D and cube views for it, so the query reads the real view.
  • Any other use of a 1D image is unchanged. A 1D load or sample on a cube T# is still refused with the same message.
  • The flag is stored in the shader disk cache, so FormatVersion goes 37 -> 38, as earlier field additions did (for example flatVolumeLineCompatible).

Possible conflicts:

Tested

Windows 11, MinGW-w64 GCC, NVIDIA GeForce RTX 5090 Laptop GPU (driver 616.92). Tested on main at 5bf2e13. After that the branch was rebased cleanly onto 385ed71 (an unrelated LDS atomics merge) and not rebuilt.

  • New agc_driver_image_resinfo_dimension (tests/execution/ImageResinfoDimension.cpp). It runs image_get_resinfo in a compute shader on cube, 3D and 2D-array T#s, once with DIM 1D and once with the T#'s own DIM, and requires both answers to match:
    • With the non-test files at main: fails with ShaderRecompiler::Recompile: image address has too few coordinate components.
    • With this change: passes (image resinfo dimension tests passed).
  • agc_shader_disk_cache (the image round-trip now sets dimensionQueryOnly = false), agc_shader_disk_cache_large_file, agc_shader_memory and agc_driver_graphics pass.
  • python tools/check_conventions.py --base origin/main and python tools/check_test_registration.py pass.

Not tested: AMD, Intel, Linux, macOS. The title was not run on this exact branch.

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
  • 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: PPSA01317 Gran Turismo 7 (PPSA01317) #4697
  • GPUs tested: NVIDIA GeForce RTX 5090 Laptop GPU, driver 616.92, Windows 11
  • AI-assisted: yes

@MarcZX10

Copy link
Copy Markdown
Contributor

The query-only path still appears to reject both multisample T# types. descriptorDimension decodes Color2DMsaa/Color2DMsaaArray as Dim2DMsaa/Dim2DMsaaArray, but the new 1D query-only RuntimeImageModes branch only adds 2D, 1D-array, 2D-array, 3D, and cube modes. Since TryRuntimeImageMode requires an exact dimension match, a DIM 1D image_get_resinfo on either MSAA descriptor still falls through to the incompatible-interface error. The RDNA ISA documents GET_RESINFO with dim Any and includes both MSAA descriptor dimensions (https://docs.amd.com/api/khub/documents/uQpkEvk3pv~kfAb2x~j4uw/content). Could you add the MSAA query modes and a regression for at least 2D MSAA, plus array MSAA if supported by this backend, or narrow the PR claim if these are intentionally excluded?

@github-actions github-actions Bot added shader core/shader agc libSceAgc* labels Oct 18, 2026
@github-actions

github-actions Bot commented Oct 18, 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 7085 core/shader/recompiler/Optimization/src/ResourceTracker.cpp L1949
PR 9633 core/shader/recompiler/ShaderDiskCache.hpp L16
PR 9749 core/shader/recompiler/ShaderDiskCache.hpp L16
PR 9852 core/shader/recompiler/ShaderDiskCache.cpp L143-144
PR 10000 core/shader/recompiler/ShaderDiskCache.hpp L16
PR 10049 core/shader/recompiler/ShaderDiskCache.hpp L16
PR 10489 core/shader/recompiler/ShaderDiskCache.hpp L16

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 907 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 5021 core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 5371 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 5609 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 5925 core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 6235 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
docs/dev/debt/shader.md
PR 6280 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 6412 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 6488 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 6539 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.cpp
PR 6612 docs/dev/debt/shader.md
PR 6858 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 6924 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 7223 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 7410 docs/dev/debt/shader.md
PR 7484 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
docs/dev/debt/shader.md
PR 7642 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 7684 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
docs/dev/debt/shader.md
PR 7689 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 8004 docs/dev/debt/shader.md
PR 8077 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
docs/dev/debt/shader.md
PR 8998 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 9193 docs/dev/debt/shader.md
PR 9356 core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 9387 core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 9889 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 9897 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
PR 9969 core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
docs/dev/debt/shader.md
PR 10193 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
core/shader/recompiler/ShaderDiskCache.cpp
core/shader/recompiler/ShaderDiskCache.hpp
core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
PR 10233 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
docs/dev/debt/shader.md

@gjonn

gjonn commented Oct 18, 2026

Copy link
Copy Markdown
Contributor Author

I checked the overlap list. This PR doesn't depend on any of them and doesn't duplicate any of them:

AI-assisted: yes

@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.

The current head still omits both multisample T# shapes from the query-only 1D mode set. descriptorDimension decodes Color2DMsaa as Dim2DMsaa and Color2DMsaaArray as Dim2DMsaaArray, but the dimensionQueryOnly branch adds only Dim2D, Dim1DArray, Dim2DArray, and Dim3D (plus cube). decodeTableEntry therefore has no matching candidate for a DIM 1D image_get_resinfo on either MSAA descriptor. The new ImageResinfoDimension test covers cube, 3D, and 2D array descriptors, but not MSAA. Please include the 2D MSAA query mode and an array-MSAA mode/test if supported, or narrow the “any T# dimension” claim.

@jotitadev

Copy link
Copy Markdown
Contributor

Apple GPU / MoltenVK run of agc_driver_image_resinfo_dimension, since macOS was not tested.

Machine: Apple M2 Max, macOS 27.2, x86-64 build under Rosetta. Head de6d94d. Method: macos-port @ b7eb6b6 + ImportWatched + PR diff, not main. ResourceMaterializer.cpp and the new test applied cleanly. The other five files conflicted only because the port lacks fields added on main since then (flatVolumeLineCompatible, the field-count asserts, the newer FormatVersion). I kept the port's side and added only this PR's dimensionQueryOnly lines, with FormatVersion raised by one. Drivers: MoltenVK 1.4.2 (SDK) and MoltenVK main + SPIRV-Cross #2704.

Tree MoltenVK 1.4.2 MoltenVK main + #2704
new test only, recompiler unchanged Failed: ShaderRecompiler::Recompile: image address has too few coordinate components not run
full PR Passed Passed

With a local print added to the test, Apple returns the same answer for DIM 1D and for each T#'s own DIM: cube 8x8x6 levels 1, 3D 8x8x4 levels 1, 2D array 8x8x3 levels 1. So the cube, 3D and 2D-array views that RuntimeImageModes now adds for a query-only 1D image also work through MoltenVK's size and level queries.

agc_shader_disk_cache, agc_shader_memory and agc_driver_graphics pass. Full ^agc suite with the PR (SDK driver, -j1 --timeout 30, flip/display/lds_atomics64 excluded): 14 failures out of 434. These are the 13 known port-baseline failures plus agc_driver_cross_workgroup_flag, which also fails on the unchanged port on this machine today. No new failures.

GPUs tested: Apple M2 Max (MoltenVK 1.4.2 and MoltenVK main + SPIRV-Cross #2704)

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

@MarcZX10

Copy link
Copy Markdown
Contributor

Thanks for the MoltenVK run and for documenting the existing baseline failures. The cube, 3D and 2D-array dimension-query results add useful coverage across both MoltenVK versions. My review still asks for the separate 2D MSAA and array-MSAA cases, since those descriptors decode to distinct runtime image modes.

@thuanquang

Copy link
Copy Markdown
Contributor

Hardware data for the DIM question, since the PR has no AMD run yet. image_get_resinfo (mip 0) on an RX 6700 XT (gfx1031, RDNA 2). The MIMG words are this PR's test encoding, 0xf0380f00 | dim << 3, run through HIP on the real GPU. I ran every T# type against every DIM:

T# DIM 1D, 2D, 2D_MSAA DIM 3D, CUBE, 1D_ARRAY, 2D_ARRAY, 2D_MSAA_ARRAY
CUBE 8x8 (8, 8, 0, 1) (8, 8, 6, 1)
CUBE 64x64, 7 levels (the PPSA01317 shape) (64, 64, 0, 7) (64, 64, 6, 7)
2D_ARRAY 8x8x3 (8, 8, 0, 1) (8, 8, 3, 1)
2D_MSAA 8x8 (8, 8, 0, 1) (8, 8, 1, 1)
2D_MSAA_ARRAY 8x8x3 (8, 8, 0, 1) (8, 8, 3, 1)
3D 8x8x4 (8, 8, 4, 1) (8, 8, 4, 1)

So on RDNA 2:

  • width, height and the level count come from the T# for every DIM, as the PR says;
  • the third component does not. For a non-3D T#, a DIM without layers (1D, 2D, 2D_MSAA) returns 0 layers. A 3D T# returns its depth for every DIM.

agc_driver_image_resinfo_dimension requires DIM 1D to give the same answer as the T#'s own DIM. On this GPU that holds for the 3D T#, but not for the cube or the 2D array: the hardware gives 0 layers where the test expects 6 and 3. The MSAA descriptors @MarcZX10 asked about also answer DIM 1D without error here: (8, 8, 0, 1) for both.

This is PC RDNA 2, not a PS5. I don't know which components PPSA01317's shader reads. If it only reads the size, this doesn't change what the title sees.

@DavidAmsellem

Copy link
Copy Markdown
Contributor

Tested on AMD on Linux, which this PR had not covered.

  • GPU: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), radv, Mesa 25.2.8-0ubuntu0.24.04.4
  • OS: Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3
  • Built de6d94daf merged into main 0bc3003f8, Release, BUILD_TESTING=ON

agc_driver_image_resinfo_dimension passes.

Full ctest with ANYPS5_REQUIRE_VULKAN=1: 1479 of 1481. Both failures also happen on main
without this PR and are unrelated to it:

@frankea

frankea commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

RTX 4090 data point on PPSA01317, continuing today's chain on D4697 and #6815 (same box, same stack): with this PR the image address has too few coordinate components refusal on shader 0x126f962f00 is gone, 4 of 4 runs, and nothing else throws for a long time. The title then sits on a black screen, busy on about three cores, for three to five minutes; the one run that got out of that phase within the cap (188 s) stopped on the blend that #7243 leaves refused, blending into an 11_11_10 float color target is unsupported.

Setup. Gran Turismo 7 PPSA01317 01.000.001 (base package), Windows 11 (26200), RTX 4090 (NVIDIA 616.92), AMD Ryzen 7 5800X, MinGW-w64 GCC 15.2.0 r7 (UCRT), Release libs target only (no tests built). app.exe is the relink from main 31cbb55 (--windows --registry --module-dir .); only libs/ is swapped between runs. Tree: main 48d61f5 (2026-10-18; it already carries #7137, #7207, #7175, #7238, #7240, #7271 and #7626) + #7256 (which brings #7254) + #7243 + #5958 + #6815 d513fb9 + this PR's head de6d94d (merge 1f1ecc1b7). The merge is textually clean, but #5958 and this PR each add one ImageResource field and each raise the fieldCount<ImageResource>() assertion to 39, so the build stops at ShaderDiskCache.cpp:143; with the count set to 40 (5d50a64b9) it builds, and both new fields are already in the encoder and decoder. FormatVersion stays at 38, which the tree already had; the shader-source version changed anyway, so run 1 recompiled everything (1,571 misses). Three local environment-gated lines on top, none of which changes a result: a bypass that makes sceHmd2Initialize answer 0x81110016 again (current main aborts 5 to 12 s in on sceHmd2ReprojectionQueryBufferSizeAlign not implemented, the #7323 regression), a print of sceSslConnect's return, and a display-buffer print that was off here. No controller, no input, one-shot interactive task per run, 300 s cap, box otherwise idle.

Result. The control (the same tree without this PR, on #6815) aborts on shader 0x126f962f00 stage 5: image address has too few coordinate components at 43 s and 247 s. With this PR that query goes through: no refusal of that wording in any run, no image_get_resinfo complaint of any other wording, and the 774 shader registrations are the same as before.

run shader cache exit after stop
control (#6815, 2 runs) warm 43 / 247 s shader 0x126f962f00 stage 5: image address has too few coordinate components
1 cold (1,571 misses) 300 s cap, killed none
2 warm 300 s cap, killed none
3 warm 300 s cap, killed none
4 (sampled) warm 188 s AGC graphics: blending into an 11_11_10 float color target is unsupported

What the title does in that time, the same in all four runs: the "Sony Interactive Entertainment presents" splash (title-bar counter 18 FPS at 560 frames, +15 s), then a black window; by +55 s the counter is at about 1,320 frames and 12 FPS, and from there it advances by a handful of frames over the next minutes (run 2: 1,319 at +55 s, 1,322 at +245 s; run 3: 1,329 at +245 s; run 4: 1,331 at +170 s). It is not idle. A 15 s sampler on run 4 (Get-Process plus netstat) shows the process using 41 to 44 CPU-seconds per 15 s, that is close to three cores, with 170 to 177 threads and a working set growing from 5.2 to 9.3 GB, while the last stderr activity is a trickle of texture creations (2 to 27 lines per 10 s); nothing is waiting on a socket, the only TCP entries are repeated SYN_SENT to two :443 peers that never establish, plus two UDP ports. What is busy is host pipeline compilation: the pipeline-journal the runtime loads at start grew from 0 to 321, 519 and 673 pipelines over runs 1 to 4 (and to 757 in three later runs on the same tree, which then reach the draw below in about 50 s every time), so the 3 to 5 minutes are the NVIDIA driver compiling this title's pipelines, amortised across runs by the journal, not a guest loop. Run 4 got out of it at 179 s ([pm4 ring] ... t=178896.1 ms just before the abort) and the next draw blends into an 11_11_10 float target with something other than the replace equation #7243 decodes, which DecodeState still refuses by design ("Every other blend into a packed target is still refused", #7243). I do not have that draw's CB_BLEND_CONTROL value; nothing logs it.

sceSslConnect (main's #7626) returns SSL_ERROR_WANT_POLLIN two to four times and then SSL_ERROR_UNKNOWN_CA on each of the title's seven connections in all runs; the title goes on.

Chain on this box for a main-built runtime, as of tonight: sceHmd2ReprojectionQueryBufferSizeAlign (#7323 regression, no PR) -> #7243 -> #7254 / #7256 -> #5958 -> #6815 -> this PR -> a source-over alpha blend into an 11_11_10 float target (CB_BLEND0_CONTROL 0x65040504, measured in three later runs; no PR), behind a pipeline-compilation phase that shrinks as the pipeline journal fills.

sampler on run 4 (15 s period; cpu is the process total, d15 the increase over the period)
SAMPLE_START 17:53:26
T 17:53:42 cpu=29.3s d15=0s threads=162 ws=5185MB estab=0 syn=0 other=0
T 17:53:57 cpu=68.8s d15=39.5s threads=166 ws=5947MB estab=0 syn=2 other=2
T 17:54:12 cpu=144.1s d15=75.3s threads=177 ws=8904MB estab=0 syn=2 other=2
T 17:54:27 cpu=214.7s d15=70.6s threads=177 ws=8914MB estab=0 syn=2 other=2
T 17:54:42 cpu=283.4s d15=68.7s threads=173 ws=8970MB estab=0 syn=1 other=2
T 17:54:57 cpu=328.9s d15=45.5s threads=173 ws=9006MB estab=0 syn=0 other=2
T 17:55:12 cpu=370.8s d15=41.9s threads=173 ws=9219MB estab=0 syn=0 other=2
T 17:55:27 cpu=413s d15=42.2s threads=173 ws=9098MB estab=0 syn=0 other=2
T 17:55:42 cpu=456.8s d15=43.8s threads=171 ws=9246MB estab=0 syn=0 other=2
T 17:55:57 cpu=498.7s d15=41.9s threads=170 ws=9347MB estab=0 syn=0 other=2
T 17:56:12 cpu=540.5s d15=41.8s threads=171 ws=9272MB estab=0 syn=0 other=2
T 17:56:27 cpu=581.8s d15=41.3s threads=171 ws=8540MB estab=0 syn=0 other=2
SAMPLE_END 17:58:57
stderr of run 4 (warm, box idle) from the save-data mount to the abort, the per-shader ShaderRegistry lines, the sceKernelOpen misses and the cache and texture bookkeeping removed, the [shadow] lines collapsed, the [log] lines shortened
[SAVEDATA:native] mount3 user=268435456 dir=DRFILEIV mode=0x1 blocks=673 -> 0x809f0008 point= status=0
[SAVEDATA:native] getMemory2 user=268435456 slot=0 -> 0x00000000
[ssl] sceSslConnect(3) -> 0x8095f013
[ssl] sceSslConnect(3) -> 0x8095f013
[ssl] sceSslConnect(3) -> 0x8095f00c
[ssl] sceSslConnect(6) -> 0x8095f013
[ssl] sceSslConnect(7) -> 0x8095f013
[ssl] sceSslConnect(6) -> 0x8095f013
[ssl] sceSslConnect(7) -> 0x8095f013
[ssl] sceSslConnect(6) -> 0x8095f013
[ssl] sceSslConnect(7) -> 0x8095f013
[ssl] sceSslConnect(6) -> 0x8095f00c
[ssl] sceSslConnect(7) -> 0x8095f00c
[ssl] sceSslConnect(10) -> 0x8095f013
[ssl] sceSslConnect(11) -> 0x8095f013
[ssl] sceSslConnect(10) -> 0x8095f013
[ssl] sceSslConnect(10) -> 0x8095f013
[ssl] sceSslConnect(11) -> 0x8095f013
[ssl] sceSslConnect(10) -> 0x8095f00c
[ssl] sceSslConnect(11) -> 0x8095f00c
[ssl] sceSslConnect(14) -> 0x8095f013
[ssl] sceSslConnect(14) -> 0x8095f013
[ssl] sceSslConnect(14) -> 0x8095f013
[ssl] sceSslConnect(14) -> 0x8095f00c
[SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed
[ssl] sceSslConnect(17) -> 0x8095f013
[ssl] sceSslConnect(17) -> 0x8095f013
[ssl] sceSslConnect(17) -> 0x8095f013
[ssl] sceSslConnect(17) -> 0x8095f00c
[SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed
[SOFT-NET] sceNetResolverStartNtoa -> host DNS lookup failed
[gpu] texture 0x123fe90000 (format 22) has mixed DCC keys at 0x1240610000; its texels are read as stored
[gpu] texture 0x1210c10000 (format 22) has mixed DCC keys at 0x1213460000; its texels are read as stored
[... [shadow] seed lines ...]
[log] 10.0 s: 897 lines (505 stdout, 392 stderr) ...
[... [shadow] seed lines ...]
[gpu] texture 0x1238d00000 (format 22) has mixed DCC keys at 0x1238da0000; its texels are read as stored
[... [shadow] seed lines ...]
[log] 10.3 s: 5827 lines (5827 stdout, 0 stderr) ...
[log] 10.1 s: 10 lines (10 stdout, 0 stderr) ...
[... [shadow] seed lines ...]
[gpu] texture 0x123f6b0000 (format 22) has mixed DCC keys at 0x123f770000; its texels are read as stored
[log] 10.2 s: 27 lines (27 stdout, 0 stderr) ...
[log] 10.5 s: 13 lines (13 stdout, 0 stderr) ...
[log] 10.2 s: 12 lines (12 stdout, 0 stderr) ...
[... [shadow] seed lines ...]
[gpu] texture 0x123f710000 (format 22) has mixed DCC keys at 0x123f7d0000; its texels are read as stored
[gpu] driver failure: AGC graphics: blending into an 11_11_10 float color target is unsupported
[videoout] presentation failed: AGC graphics: blending into an 11_11_10 float color target is unsupported
terminate called after throwing an instance of 'std::runtime_error'
  what():  AGC graphics: blending into an 11_11_10 float color target is unsupported
FATAL: abort() (SIGABRT) on thread 11588

AI-assisted: yes (Claude Code)

@fdfawef324

Copy link
Copy Markdown
Contributor

I compared #7550 at de6d94daff2b with the rebased #6280 candidate 0e1f2ab53b59. The scopes remain separate: dimension-query eligibility here, and physical/guest mip counts plus out-of-count results in #6280.

For composition, preserve dimensionQueryOnly, main's convertedSamples, and #6280's levelUses in tracking, runtime modes, encoder/decoder, minimum record sizes and the nonzero cache fixture. #6280 now has image field count40 and cache format41 on its pinned base676d; adding your field to that exact layout gives41 fields. Recount on the landing base and choose its next available cache version. Keep the safe physical query LOD, outside-count extent mask, guest count, and single-unrepresented-base admission control.

I propose #6280 first, then rebase #7550 with both changes preserved; that is a proposal, not an agreed merge order. The separate DIM/layer-component and MSAA reviewer questions remain open, including thuanquang's desktop RDNA2 evidence; this composition note does not settle them or claim a combined execution result.

AI-assisted: yes (Codex)

@blawesom

Copy link
Copy Markdown
Contributor

Rebase handoff — rebased onto current main (authorship unchanged). One serializer conflict: main's FormatVersion 40 kept (your branch's 38 predates main's bumps).

Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON, AMD RX 9070 XT / RADV): builds; conventions pass; full suite green apart from the four known main regressions (#5444 Mesa, #7584 BDA, #7766, #7784), none from this PR.

To pick it up:

git fetch https://github.com/blawesom/AnyPS5 rebase/7550
git checkout <your branch>
git merge --ff-only FETCH_HEAD

Head is 32ab83655.

@blawesom

Copy link
Copy Markdown
Contributor

Correction: the first push didn't build (the PR's ImageResource field-count pin was stale against the merged struct — 39→40, your PR's new field plus main's). Head is now 227481d76: builds, the image-resinfo test passes, conventions pass, full suite green apart from the four known main regressions.

@thuanquang

Copy link
Copy Markdown
Contributor

@blawesom @gjonn one thing in the handoff 227481d: the info encoder and decoder now write and read dimensionQueryOnly, but ShaderDiskCache.hpp is unchanged, so FormatVersion stays at main's 40. A cache written by main (format 40, without the field) would then be read with the new layout. It needs 41.

Heads-up on merge order: #7381 makes the same two edits, fieldCount<ImageResource>() == 40 and FormatVersion 41. Git merges identical edits without a conflict, so whichever of the two lands second builds against a struct with 41 fields and fails the static_assert. That's how #7381's earlier head broke against #5958 this morning. The second one needs 41 and 42.

@adriadam10 adriadam10 self-assigned this Oct 19, 2026

@adriadam10 adriadam10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for this. A few things need fixing before it can merge:

  • Layer count must follow the instruction's DIM. thuanquang measured image_get_resinfo on RDNA 2 (comment above): width, height and levels come from the T#, but for a non-3D T# a DIM without layers (1D, 2D, 2D_MSAA) returns 0 in the third component (cube 8x8 → 8, 8, 0, 1; 2D array 8x8x3 → 8, 8, 0, 1); a 3D T# returns its depth for every DIM. The new view modes return the real layer count, and ImageResinfoDimension.cpp:88 (Check) requires DIM 1D to equal the T#'s own DIM, so the test pins the wrong value for cube and 2D array. Make the third component 0 when the instruction's DIM has no layers (except 3D T#), and change the test to expect that.
  • MSAA descriptors. ResourceMaterializer.cpp:1523-1534 adds no 2D MSAA / 2D MSAA array view, so DIM 1D on those T# still hits the incompatible-interface error (MarcZX10's review). HW answers them too (8, 8, 0, 1). Add the modes and a test row for each.
  • Rebase. The PR conflicts with main. FormatVersion (ShaderDiskCache.hpp:16, 38) and fieldCount<ImageResource>() (ShaderDiskCache.cpp:143, 39) are stale: main is at 40 and #7381 also takes 41. Use the next free values after rebasing, and re-run agc_shader_disk_cache and the new test.

gjonn and others added 2 commits October 24, 2026 04:07
image_get_resinfo with DIM 1D on a cube, 3D or 2D-array T# was refused
with "image address has too few coordinate components": the tracker made
a 1D image that only the query uses, and no 1D mode matches such a T#.
The returned size, layer count and levels come from the T#; DIM only sets
the number of address registers. A 1D image used only by dimension
queries now decodes the T#'s own dimension and accepts 2D, 1D array,
2D array, 3D and cube views.
The flag is stored in the shader disk cache, so FormatVersion moves to 38.

PPSA01317 queries a 64x64 cube with DIM 1D in a pixel shader.

AI-assisted: yes
image_get_resinfo returns 0 in its third component when the instruction's
DIM has no layers (1D, 2D, 2D MSAA) and the T# is not 3D, as measured on
RDNA 2 in boykopovar#7550. Keep 1D-array T#s on their first layer and MSAA T#s
refused, and record the unmeasured forms in the shader debt file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adriadam10
adriadam10 force-pushed the fix/shader-resinfo-any-descriptor-dimension branch from de6d94d to 7b4b9d9 Compare October 24, 2026 02:30
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 24, 2026
@adriadam10
adriadam10 dismissed MarcZX10’s stale review October 24, 2026 10:19

Dismissing a stale review: the requested changes were addressed after it and the merge queue blocks on it. Please request changes again if anything is still open.

@adriadam10
adriadam10 merged commit 522e32e into boykopovar:main Oct 24, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* shader core/shader unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants