AGC: a draw whose image slot holds a sampler/buffer descriptor, or a cube T# read with dim 2D, is refused (High on Life PPSA15388) #4139

Closed
opened 2026-10-11 23:53:22 +00:00 by Tamalero · 9 comments
Tamalero commented 2026-10-11 23:53:22 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-11T23:53:22Z.


High on Life (PPSA15388 v01.120.000, Unreal Engine 4) loads its first level and then stops on draws whose static image slots hold descriptors the shader's interface does not accept. The console runs these draws, so they look like slots the hardware tolerates and AnyPS5 refuses up front. I see two shapes:

  1. A non-image descriptor in an image slot. Pixel shader 0x211da90000 gets runtime image descriptor is invalid for its second image: the 8 words in that slot are an S# followed by a V#. Its image_sample_b … s[8:15] sits behind s_cbranch_scc0 on a constant-buffer value, so the title probably leaves the slot stale when that branch is not taken. Pixel shader 0x20c51f0000 has the same S#+V# pair in s[8:15], but samples it unconditionally.
  2. A cube T# read through a 2D access. In the same shader 0x20c51f0000, image_sample … s[0:7] … dim:SQ_RSRC_IMG_2D is given a 32x32 cube T# (type 0xb, format 71). That fails TryRuntimeImageMode because every prepared mode is dimension 2D. It looks like an engine placeholder cube bound to a 2D slot.

As a local experiment I bound such slots as a null image (all-zero descriptor, which nullImageDescriptor already accepts). The title then gets past both stops into the level: its audio, a cutscene, and an in-engine scene with shadows. I haven't checked the picture against a console. In one run 128+ draws hit shape 1, all with the same S#+V# pair.

What I don't know, and why this is an issue and not a PR:

  • what RDNA2/gfx1013 returns for an image_sample whose T# has type 0 (I expect zeros, but have not measured it);
  • what a cube T# returns through a dim-2D sample (face 0 as a 2D image?).

Both look measurable with tools/hw-oracle, the way #2023 and #2237 settled the 3D-on-2D and 2D-on-1D cases. With the answers, shape 1 could bind a null image (or poison the slot, so it only faults if the shader samples it), and shape 2 could get a mode like those two fixes added.

Related: @xXPBSXx's Teardown (PPSA15246) stop on #3701 is the same family on a compute copy kernel: it picks a buffer or an image at run time, so the slot it does not use holds the other kind of descriptor.

Details and logs

Setup: CachyOS (Linux 7.2), RTX 4090 (NVIDIA 615.78, 32-lane subgroups), GCC, Release. main f5c0fe00 plus local integration patches and ports of #423/#1077, #425, #454, #2904, #3202, #3546, #3279 and AlxcBTW/AnyPS5#39, #1732/#1825/#2261 and #3738.

Shape 1, with the shader and its user data added to the message (local diagnostic):

shader 0x211da90000 stage 5 firstUserSgpr 0: runtime image descriptor is invalid (image 1 of 2, r128=0, type=0,
  T#=000001b6 00fff000 06500000 00000000 4ce4df18 00100020 00000002 0004dfac)
user data: 210d9a00 c3800000 021bc3bf 91b00f2e 00000000 00700000 006b0000 0020d9de   <- image 0, a valid 2D T#
           000001b6 00fff000 06500000 00000000                                       <- S#
           4ce4df18 00100020 00000002 0004dfac                                       <- V#, stride 16
           00000200 00fff000 06f00000 00000000  00000200 00fff000 06500000 00000000   <- S#, S#
           c140b000 00100014 00000169 0004dfac  d1ea1dc8 00000020                    <- V#, pointer

Shader: image_sample_b v1, [v9, v0, v6], s[0:7], s[16:19] (unconditional), then s_cbranch_scc0 55 at 0x1cc over image_sample_b v1, v[9:11], s[8:15], s[20:23] at 0x22c.

Shape 2:

shader 0x20c51f0000 stage 5: image descriptor is incompatible with the static runtime image interface:
  descriptor format 71 decodes to {class 1, dim 5, ..., cube 1, ...}; modes: {class 1, dim 3, ...} ... (9 modes, all dim 3, cube 0)
  T# 210cdf00 c4700000 001fc01f b1b70fac 00000005 00700070 00000000 00000000

Shader: image_sample v1, v[13:14], s[0:7], s[24:27] dim:SQ_RSRC_IMG_2D and image_sample_b v2, v[13:15], s[8:15], s[52:55] dim:SQ_RSRC_IMG_2D, both before the shader's only branch. Slot s[8:15] again holds 00000092 00fff000 0a500000 00000000 6a2bce60 00100020 00000001 0004dfac (S#+V#).

Tested and written by Claude (AI assistant) on a contributor's machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5806401652 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/4139). Originally posted by [Tamalero](https://github.com/Tamalero) on 2026-10-11T23:53:22Z. --- High on Life (PPSA15388 v01.120.000, Unreal Engine 4) loads its first level and then stops on draws whose static image slots hold descriptors the shader's interface does not accept. The console runs these draws, so they look like slots the hardware tolerates and AnyPS5 refuses up front. I see two shapes: 1. **A non-image descriptor in an image slot.** Pixel shader `0x211da90000` gets `runtime image descriptor is invalid` for its second image: the 8 words in that slot are an S# followed by a V#. Its `image_sample_b … s[8:15]` sits behind `s_cbranch_scc0` on a constant-buffer value, so the title probably leaves the slot stale when that branch is not taken. Pixel shader `0x20c51f0000` has the same S#+V# pair in `s[8:15]`, but samples it **unconditionally**. 2. **A cube T# read through a 2D access.** In the same shader `0x20c51f0000`, `image_sample … s[0:7] … dim:SQ_RSRC_IMG_2D` is given a 32x32 cube T# (type `0xb`, format 71). That fails `TryRuntimeImageMode` because every prepared mode is dimension 2D. It looks like an engine placeholder cube bound to a 2D slot. As a local experiment I bound such slots as a null image (all-zero descriptor, which `nullImageDescriptor` already accepts). The title then gets past both stops into the level: its audio, a cutscene, and an in-engine scene with shadows. I haven't checked the picture against a console. In one run 128+ draws hit shape 1, all with the same S#+V# pair. What I don't know, and why this is an issue and not a PR: - what RDNA2/gfx1013 returns for an `image_sample` whose T# has type 0 (I expect zeros, but have not measured it); - what a cube T# returns through a dim-2D sample (face 0 as a 2D image?). Both look measurable with `tools/hw-oracle`, the way #2023 and #2237 settled the 3D-on-2D and 2D-on-1D cases. With the answers, shape 1 could bind a null image (or poison the slot, so it only faults if the shader samples it), and shape 2 could get a mode like those two fixes added. Related: @xXPBSXx's Teardown (PPSA15246) stop on #3701 is the same family on a compute copy kernel: it picks a buffer or an image at run time, so the slot it does not use holds the other kind of descriptor. <details><summary>Details and logs</summary> **Setup:** CachyOS (Linux 7.2), RTX 4090 (NVIDIA 615.78, 32-lane subgroups), GCC, Release. `main` `f5c0fe00` plus local integration patches and ports of #423/#1077, #425, #454, #2904, #3202, #3546, #3279 and AlxcBTW/AnyPS5#39, #1732/#1825/#2261 and #3738. **Shape 1**, with the shader and its user data added to the message (local diagnostic): ``` shader 0x211da90000 stage 5 firstUserSgpr 0: runtime image descriptor is invalid (image 1 of 2, r128=0, type=0, T#=000001b6 00fff000 06500000 00000000 4ce4df18 00100020 00000002 0004dfac) user data: 210d9a00 c3800000 021bc3bf 91b00f2e 00000000 00700000 006b0000 0020d9de <- image 0, a valid 2D T# 000001b6 00fff000 06500000 00000000 <- S# 4ce4df18 00100020 00000002 0004dfac <- V#, stride 16 00000200 00fff000 06f00000 00000000 00000200 00fff000 06500000 00000000 <- S#, S# c140b000 00100014 00000169 0004dfac d1ea1dc8 00000020 <- V#, pointer ``` Shader: `image_sample_b v1, [v9, v0, v6], s[0:7], s[16:19]` (unconditional), then `s_cbranch_scc0 55` at `0x1cc` over `image_sample_b v1, v[9:11], s[8:15], s[20:23]` at `0x22c`. **Shape 2:** ``` shader 0x20c51f0000 stage 5: image descriptor is incompatible with the static runtime image interface: descriptor format 71 decodes to {class 1, dim 5, ..., cube 1, ...}; modes: {class 1, dim 3, ...} ... (9 modes, all dim 3, cube 0) T# 210cdf00 c4700000 001fc01f b1b70fac 00000005 00700070 00000000 00000000 ``` Shader: `image_sample v1, v[13:14], s[0:7], s[24:27] dim:SQ_RSRC_IMG_2D` and `image_sample_b v2, v[13:15], s[8:15], s[52:55] dim:SQ_RSRC_IMG_2D`, both before the shader's only branch. Slot `s[8:15]` again holds `00000092 00fff000 0a500000 00000000 6a2bce60 00100020 00000001 0004dfac` (S#+V#). </details> *Tested and written by Claude (AI assistant) on a contributor's machine.*
Tamalero commented 2026-10-12 00:54:08 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-12T00:54:08Z.


Progress: with both shapes bound as a null image (the local experiment above), High on Life now reaches gameplay. The player has control: the idle banter plays when you stand still, the gun fires with muzzle flash and sound, the forward-arrow HUD shows, the pause menu works, and a checkpoint reload works. In the gameplay runs, shape 1 was bound null 128+ times in one run and not at all in another, so whether the title reaches these slots depends on the scene. Rendering is incomplete: UI, particles and emissive surfaces draw, but every lit 3D surface is black. I'm investigating that separately.

Tested and written by Claude (AI assistant) on a contributor's machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6115832233 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/4139#issuecomment-6115832233). Originally posted by [Tamalero](https://github.com/Tamalero) on 2026-10-12T00:54:08Z. --- Progress: with both shapes bound as a null image (the local experiment above), High on Life now reaches **gameplay**. The player has control: the idle banter plays when you stand still, the gun fires with muzzle flash and sound, the forward-arrow HUD shows, the pause menu works, and a checkpoint reload works. In the gameplay runs, shape 1 was bound null 128+ times in one run and not at all in another, so whether the title reaches these slots depends on the scene. Rendering is incomplete: UI, particles and emissive surfaces draw, but every lit 3D surface is black. I'm investigating that separately. *Tested and written by Claude (AI assistant) on a contributor's machine.*
Tamalero commented 2026-10-12 01:07:34 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-12T01:07:34Z.


Some files as reference:

Image Image

Video: https://www.youtube.com/watch?v=MspEIJKgAUo

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6115952260 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/4139#issuecomment-6115952260). Originally posted by [Tamalero](https://github.com/Tamalero) on 2026-10-12T01:07:34Z. --- Some files as reference: <img width="2411" height="1408" alt="Image" src="https://github.com/user-attachments/assets/f8af36d2-1168-4495-ac1e-3eef503d09a0" /> <img width="2401" height="1397" alt="Image" src="https://github.com/user-attachments/assets/443d341c-3e83-4178-a111-53d894464543" /> Video: https://www.youtube.com/watch?v=MspEIJKgAUo
simonbbby commented 2026-10-12 13:11:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by simonbbby on 2026-10-12T13:11:58Z.


Both questions have an answer on gfx1036 (RDNA2, gfx10.3). The PS5's gfx1013 is not measured.

  1. A T# with TYPE 0 is a null descriptor. image_sample_lz, image_sample, image_sample_b and image_load return 0, 0, 0, 0, W included, and image_get_resinfo returns 0, 0, 0, 0. DST_SEL is ignored. Your two S#+V# word sets with their own unmapped bases don't fault.
  2. A dim-2D access through a cube T# is a cube access on face 0, which is slice BASE_ARRAY. The coordinates are in AMD's [1, 2] face range, so u, v ≤ 1 collapse to the first texel. It does not return zero, and the face does not come from the VGPR after the address.

Measured with tools/hw-oracle at main 3d8ffeb2: gfx1036 (RDNA2 iGPU of a Ryzen 9 9950X), Linux 7.0 (Ubuntu 24.04), ROCm HSA runtime 5.7.1, LLVM 18.1.3. Float controls: ieee 0, dx10_clamp 1, denorm32 3, denorm16 3, round32 0, round16 0, fp16_overflow 0. Wave32 and wave64 give the same texels, in two runs each.

Each kernel builds the T# in s[8:15] and the S# in s[16:19]. Dword0 and dword1[7:0] point at texels passed as extra, and each texel encodes its own offset. S#s: point clamp-last 00000092 00fff000 00000000 80000000, point wrap 00000000 00fff000 00000000 80000000, and the two from 0x211da90000's s[16:19] and s[20:23], 00000200 00fff000 06f00000 00000000 and 00000200 00fff000 06500000 00000000.

TYPE 0. All five instructions with dim 2D, with all four S#s:

T# result
control: 8×8 RGBA8 linear 2D, words 1-7 c3800000 0001c001 90000fac 00000000 00700000 00000000 00000000 the expected texels, e.g. (3, 5) at +1292 and (7, 7) at +1820; load at x = 8 or y = 8 gives 0; resinfo 8, 8, 0, 1
the same with only TYPE = 0 (dword3 00000fac) 0, 0, 0, 0 in every row
TYPE 0 with DST_SEL 1, 1, 1, 1 (dword3 00000249) 0, 0, 0, 0 in every row
control: TYPE 9 with DST_SEL 1, 1, 1, 1 (dword3 90000249) 1.0 in all four channels in every sample and load row, out-of-bounds loads included; resinfo 8, 8, 0, 1
your two S#+V# word sets, base rebased onto the texels 0, 0, 0, 0 in every row
all-zero T# 0, 0, 0, 0 in every row
your two S#+V# word sets verbatim (bases 0x1b600 and 0x9200, unmapped) 0, 0, 0, 0 in every row; no fault, no amdgpu line in journalctl -k

As a fault control, the TYPE 9 control T# with base 0x1b600 or 0x9200 faults at once: Memory access fault by GPU node-1 ... on address 0x1b000. Reason: Page not present or supervisor privilege. The kernel logs an amdgpu ... [gfxhub] page fault from client TCP (0x8). The same T# with only TYPE = 0 at those two bases returns 0, 0, 0, 0 in every row and doesn't fault, and so does its DST_SEL 1, 1, 1, 1 copy at 0x1b600 (84 kernels, wave32 and wave64, no amdgpu line). So a TYPE-0 T# does not access its base address.

Cube through dim 2D. A 64×64 R32_UINT linear cube, TYPE 0xb, DEPTH 5, BASE_ARRAY 0 (words 1-7 c1400000 000fc00f b0000fac 00000005 00700000 00000000 00000000):

dim 2D access result
all three sample ops, u = 0, 0.1, 0.5, 0.9, 1.0 or -0.25 slice 0, x = 0
u = 1.1, 1.5, 1.9, 2.0 slice 0, x = 6, 32, 57, 63
u = v = 1.1, 1.5, 1.9, 2.0 (6, 6), (32, 32), (57, 57), (63, 63); v alone maps the same way
point wrap S# the same rows as clamp-last, so no wrap: u = 2.0 still reads x = 63
v6 (the VGPR after the address) = 0, 1, 2.0, 5 or 5.0 changes no row
load (5, 7), (63, 63) slice 0 (5, 7), (63, 63)
load (64, 0), (0, 64), (-1, 0) 0, 0, 0, 0
resinfo 64, 64, 0, 1
the same cube with BASE_ARRAY 6, DEPTH 11 (image_sample_lz with point clamp-last, and image_load) the same rows, on slice 6

So a sample reads x = floor((u − 1) × 64), clamped to the face. Controls on the same memory: dim CUBE face f reads slice f with the same [1, 2] mapping, or slice 6 + f with BASE_ARRAY 6. A TYPE 0xd 2D-array T# and a TYPE 9 2D T# read through dim 2D use [0, 1]: u = 0.5 reads x = 32.

Your cube T# 210cdf00 c4700000 001fc01f b1b70fac 00000005 00700070 00000000 00000000, rebased onto a 64 KiB-aligned buffer, is 128×128, not 32×32. A dim 2D load at (127, 127) reads a texel, and (128, 0) returns 0. Point-sampled dim 2D at u, v ≤ 1 returns face 0's texel (0, 0). The sample at (1.5, 1.5) and the load at (5, 7) return the same texels as dim CUBE face 0. With image_sample_lz at 9 coordinates around the face corner and all four S#s, dim 2D and dim CUBE face 0 return the same dwords in all 36 rows, in wave32 and in wave64. With the two 0x211da90000 S#s, every u = v ≤ 1 returns 44d9d55d 4207ffe5 3f800000 40000000 in wave32. The issue doesn't give 0x20c51f0000's s[24:27], so the title's own sampler may give a different value. No single texel holds that value, so it looks like the cube corner filter across faces. (In wave64 the buffer starts 512 B later, so the raw value differs, and dim 2D still equals dim CUBE.)

For a fix (line numbers at 3d8ffeb2; these files are unchanged at main 33ae282e):

  • Shape 1: a null binding is what the hardware does, for both shaders. So 0x211da90000 doesn't need #3952's pruning to be correct, and the unconditional sample in 0x20c51f0000 gets zeros too. These T#s have non-zero bases and formats and still read nothing, so TYPE 0 has to count as null, not only base 0. Main tests for a null T# by base alone in several places: nullImageDescriptor (ResourceMaterializer.cpp:62), DescriptorBindingBuilder.cpp:424 and :456, and the driver's ShaderResources.cpp:2271, :2281, :2324, :2333, :3278, :3343 and :3411. With a non-zero base, the driver decodes the T# with DecodeTextureResource, which has no TYPE 0 case: resolveDimension throws unsupported image type (GuestTextureResource.cpp:47). So widening line 62 alone moves the stop into the driver. One shared null check would cover all of these places. W is 0 as well, so a null view that returns (0, 0, 0, 1) would not match.
  • Shape 2: a null binding returns 0 where the hardware returns face 0 data. Your local experiment binds this slot as null. I haven't checked whether this slot feeds the black lit surfaces you reported. A mode that samples layer BASE_ARRAY at (u − 1, v − 1) with clamp-to-edge addressing, whatever the S# clamp mode, and loads face 0 at (x, y) matches the point and interior rows. That is the same [1, 2] convention that CubeAxis (SpirvImageEmitter.cpp:170) already applies to dim CUBE coordinates on main, as #4209 describes. Matching the corner value needs a real cube sample of face 0. I inferred that from the identical dwords; I didn't decode which texels contribute.

Not measured: gfx1013, image stores and atomics, TYPE 1 to 7 and MSAA types, DISABLE_CUBE_WRAP S#s, and cube arrays beyond BASE_ARRAY 6 / DEPTH 11. docs/dev/HW_ORACLE.md lists the MIMG encodings as shared with gfx1013 but says nothing about T# TYPE handling or cube addressing. I didn't decode the SW_MODE 27 layout with addrlib; I identified its faces by matching against the dim CUBE control.

Oracle body
  s_add_u32 s20, s4, ROWS*16          ; extra; rows padded to whole waves
  s_addc_u32 s21, s5, 0
  s_add_u32 s22, s20, 0xff            ; 0xffff for SW_MODE 27
  s_addc_u32 s23, s21, 0
  s_and_b32 s22, s22, 0xffffff00      ; 0xffff0000 for SW_MODE 27
  s_lshr_b64 s[26:27], s[22:23], 8
  s_mov_b32 s8, s26                   ; dword0 = base >> 8
  s_and_b32 s9, s27, 0xff
  s_or_b32 s9, s9, DWORD1 & 0xffffff00
  s_mov_b32 s10, DWORD2               ; ... through s15 = DWORD7
  s_mov_b32 s16, SSHARP0              ; ... through s19 = SSHARP3
  ; one of:
  image_sample_lz v[10:13], v[4:5], s[8:15], s[16:19] dmask:0xf dim:SQ_RSRC_IMG_2D
  image_sample v[10:13], v[4:5], s[8:15], s[16:19] dmask:0xf dim:SQ_RSRC_IMG_2D    ; rows in groups of 4 with equal coordinates
  image_sample_b v[10:13], v[30:32], s[8:15], s[16:19] dmask:0xf dim:SQ_RSRC_IMG_2D ; v30 = bias 0, v[31:32] = u, v
  image_load v[10:13], v[4:5], s[8:15] dmask:0xf dim:SQ_RSRC_IMG_2D unorm
  image_get_resinfo v[10:13], v4, s[8:15] dmask:0xf dim:SQ_RSRC_IMG_2D
  ; the controls use dim:SQ_RSRC_IMG_CUBE or SQ_RSRC_IMG_2D_ARRAY with v[4:6]
  s_waitcnt vmcnt(0)

Rows are (u, v, v6, 0): float bits for samples, integers for loads. The verbatim cases use s_mov_b32 s8, DWORD0 and s_mov_b32 s9, DWORD1 instead of the rebase. Run with sg render -c "python3 -I script.py" and run(body, rows, extra, wave64, ieee=0, dx10_clamp=1, denorm32=3, denorm16=3, round32=0, round16=0, fp16_overflow=0).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6124971783 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/4139#issuecomment-6124971783). Originally posted by [simonbbby](https://github.com/simonbbby) on 2026-10-12T13:11:58Z. --- Both questions have an answer on gfx1036 (RDNA2, gfx10.3). The PS5's gfx1013 is not measured. 1. A T# with TYPE 0 is a null descriptor. `image_sample_lz`, `image_sample`, `image_sample_b` and `image_load` return 0, 0, 0, 0, W included, and `image_get_resinfo` returns 0, 0, 0, 0. DST_SEL is ignored. Your two S#+V# word sets with their own unmapped bases don't fault. 2. A dim-2D access through a cube T# is a cube access on face 0, which is slice BASE_ARRAY. The coordinates are in AMD's [1, 2] face range, so u, v ≤ 1 collapse to the first texel. It does not return zero, and the face does not come from the VGPR after the address. Measured with `tools/hw-oracle` at `main` 3d8ffeb2: gfx1036 (RDNA2 iGPU of a Ryzen 9 9950X), Linux 7.0 (Ubuntu 24.04), ROCm HSA runtime 5.7.1, LLVM 18.1.3. Float controls: `ieee 0`, `dx10_clamp 1`, `denorm32 3`, `denorm16 3`, `round32 0`, `round16 0`, `fp16_overflow 0`. Wave32 and wave64 give the same texels, in two runs each. Each kernel builds the T# in `s[8:15]` and the S# in `s[16:19]`. Dword0 and dword1[7:0] point at texels passed as `extra`, and each texel encodes its own offset. S#s: point clamp-last `00000092 00fff000 00000000 80000000`, point wrap `00000000 00fff000 00000000 80000000`, and the two from `0x211da90000`'s `s[16:19]` and `s[20:23]`, `00000200 00fff000 06f00000 00000000` and `00000200 00fff000 06500000 00000000`. **TYPE 0.** All five instructions with dim 2D, with all four S#s: | T# | result | |---|---| | control: 8×8 RGBA8 linear 2D, words 1-7 `c3800000 0001c001 90000fac 00000000 00700000 00000000 00000000` | the expected texels, e.g. (3, 5) at +1292 and (7, 7) at +1820; load at x = 8 or y = 8 gives 0; resinfo 8, 8, 0, 1 | | the same with only TYPE = 0 (dword3 `00000fac`) | 0, 0, 0, 0 in every row | | TYPE 0 with DST_SEL 1, 1, 1, 1 (dword3 `00000249`) | 0, 0, 0, 0 in every row | | control: TYPE 9 with DST_SEL 1, 1, 1, 1 (dword3 `90000249`) | 1.0 in all four channels in every sample and load row, out-of-bounds loads included; resinfo 8, 8, 0, 1 | | your two S#+V# word sets, base rebased onto the texels | 0, 0, 0, 0 in every row | | all-zero T# | 0, 0, 0, 0 in every row | | your two S#+V# word sets verbatim (bases 0x1b600 and 0x9200, unmapped) | 0, 0, 0, 0 in every row; no fault, no amdgpu line in `journalctl -k` | As a fault control, the TYPE 9 control T# with base 0x1b600 or 0x9200 faults at once: `Memory access fault by GPU node-1 ... on address 0x1b000. Reason: Page not present or supervisor privilege.` The kernel logs an `amdgpu ... [gfxhub] page fault` from client `TCP (0x8)`. The same T# with only TYPE = 0 at those two bases returns 0, 0, 0, 0 in every row and doesn't fault, and so does its DST_SEL 1, 1, 1, 1 copy at 0x1b600 (84 kernels, wave32 and wave64, no amdgpu line). So a TYPE-0 T# does not access its base address. **Cube through dim 2D.** A 64×64 R32_UINT linear cube, TYPE 0xb, DEPTH 5, BASE_ARRAY 0 (words 1-7 `c1400000 000fc00f b0000fac 00000005 00700000 00000000 00000000`): | dim 2D access | result | |---|---| | all three sample ops, u = 0, 0.1, 0.5, 0.9, 1.0 or -0.25 | slice 0, x = 0 | | u = 1.1, 1.5, 1.9, 2.0 | slice 0, x = 6, 32, 57, 63 | | u = v = 1.1, 1.5, 1.9, 2.0 | (6, 6), (32, 32), (57, 57), (63, 63); v alone maps the same way | | point wrap S# | the same rows as clamp-last, so no wrap: u = 2.0 still reads x = 63 | | v6 (the VGPR after the address) = 0, 1, 2.0, 5 or 5.0 | changes no row | | load (5, 7), (63, 63) | slice 0 (5, 7), (63, 63) | | load (64, 0), (0, 64), (-1, 0) | 0, 0, 0, 0 | | resinfo | 64, 64, 0, 1 | | the same cube with BASE_ARRAY 6, DEPTH 11 (`image_sample_lz` with point clamp-last, and `image_load`) | the same rows, on slice 6 | So a sample reads x = floor((u − 1) × 64), clamped to the face. Controls on the same memory: dim CUBE face f reads slice f with the same [1, 2] mapping, or slice 6 + f with BASE_ARRAY 6. A TYPE 0xd 2D-array T# and a TYPE 9 2D T# read through dim 2D use [0, 1]: u = 0.5 reads x = 32. Your cube T# `210cdf00 c4700000 001fc01f b1b70fac 00000005 00700070 00000000 00000000`, rebased onto a 64 KiB-aligned buffer, is 128×128, not 32×32. A dim 2D load at (127, 127) reads a texel, and (128, 0) returns 0. Point-sampled dim 2D at u, v ≤ 1 returns face 0's texel (0, 0). The sample at (1.5, 1.5) and the load at (5, 7) return the same texels as dim CUBE face 0. With `image_sample_lz` at 9 coordinates around the face corner and all four S#s, dim 2D and dim CUBE face 0 return the same dwords in all 36 rows, in wave32 and in wave64. With the two `0x211da90000` S#s, every u = v ≤ 1 returns `44d9d55d 4207ffe5 3f800000 40000000` in wave32. The issue doesn't give `0x20c51f0000`'s `s[24:27]`, so the title's own sampler may give a different value. No single texel holds that value, so it looks like the cube corner filter across faces. (In wave64 the buffer starts 512 B later, so the raw value differs, and dim 2D still equals dim CUBE.) **For a fix** (line numbers at 3d8ffeb2; these files are unchanged at `main` 33ae282e): - Shape 1: a null binding is what the hardware does, for both shaders. So `0x211da90000` doesn't need #3952's pruning to be correct, and the unconditional sample in `0x20c51f0000` gets zeros too. These T#s have non-zero bases and formats and still read nothing, so TYPE 0 has to count as null, not only base 0. Main tests for a null T# by base alone in several places: `nullImageDescriptor` (ResourceMaterializer.cpp:62), DescriptorBindingBuilder.cpp:424 and :456, and the driver's ShaderResources.cpp:2271, :2281, :2324, :2333, :3278, :3343 and :3411. With a non-zero base, the driver decodes the T# with `DecodeTextureResource`, which has no TYPE 0 case: `resolveDimension` throws `unsupported image type` (GuestTextureResource.cpp:47). So widening line 62 alone moves the stop into the driver. One shared null check would cover all of these places. W is 0 as well, so a null view that returns (0, 0, 0, 1) would not match. - Shape 2: a null binding returns 0 where the hardware returns face 0 data. Your local experiment binds this slot as null. I haven't checked whether this slot feeds the black lit surfaces you reported. A mode that samples layer BASE_ARRAY at (u − 1, v − 1) with clamp-to-edge addressing, whatever the S# clamp mode, and loads face 0 at (x, y) matches the point and interior rows. That is the same [1, 2] convention that `CubeAxis` (SpirvImageEmitter.cpp:170) already applies to dim CUBE coordinates on main, as #4209 describes. Matching the corner value needs a real cube sample of face 0. I inferred that from the identical dwords; I didn't decode which texels contribute. Not measured: gfx1013, image stores and atomics, TYPE 1 to 7 and MSAA types, `DISABLE_CUBE_WRAP` S#s, and cube arrays beyond BASE_ARRAY 6 / DEPTH 11. `docs/dev/HW_ORACLE.md` lists the MIMG encodings as shared with gfx1013 but says nothing about T# TYPE handling or cube addressing. I didn't decode the SW_MODE 27 layout with addrlib; I identified its faces by matching against the dim CUBE control. <details><summary>Oracle body</summary> ``` s_add_u32 s20, s4, ROWS*16 ; extra; rows padded to whole waves s_addc_u32 s21, s5, 0 s_add_u32 s22, s20, 0xff ; 0xffff for SW_MODE 27 s_addc_u32 s23, s21, 0 s_and_b32 s22, s22, 0xffffff00 ; 0xffff0000 for SW_MODE 27 s_lshr_b64 s[26:27], s[22:23], 8 s_mov_b32 s8, s26 ; dword0 = base >> 8 s_and_b32 s9, s27, 0xff s_or_b32 s9, s9, DWORD1 & 0xffffff00 s_mov_b32 s10, DWORD2 ; ... through s15 = DWORD7 s_mov_b32 s16, SSHARP0 ; ... through s19 = SSHARP3 ; one of: image_sample_lz v[10:13], v[4:5], s[8:15], s[16:19] dmask:0xf dim:SQ_RSRC_IMG_2D image_sample v[10:13], v[4:5], s[8:15], s[16:19] dmask:0xf dim:SQ_RSRC_IMG_2D ; rows in groups of 4 with equal coordinates image_sample_b v[10:13], v[30:32], s[8:15], s[16:19] dmask:0xf dim:SQ_RSRC_IMG_2D ; v30 = bias 0, v[31:32] = u, v image_load v[10:13], v[4:5], s[8:15] dmask:0xf dim:SQ_RSRC_IMG_2D unorm image_get_resinfo v[10:13], v4, s[8:15] dmask:0xf dim:SQ_RSRC_IMG_2D ; the controls use dim:SQ_RSRC_IMG_CUBE or SQ_RSRC_IMG_2D_ARRAY with v[4:6] s_waitcnt vmcnt(0) ``` Rows are `(u, v, v6, 0)`: float bits for samples, integers for loads. The verbatim cases use `s_mov_b32 s8, DWORD0` and `s_mov_b32 s9, DWORD1` instead of the rebase. Run with `sg render -c "python3 -I script.py"` and `run(body, rows, extra, wave64, ieee=0, dx10_clamp=1, denorm32=3, denorm16=3, round32=0, round16=0, fp16_overflow=0)`. </details>
Tamalero commented 2026-10-12 20:07:35 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-12T20:07:35Z.


@simonbbby Thanks for measuring these. To your question: the black lit surfaces in High on Life don't come from these slots. They come from the sky reflection capture filtering a cube whose packed-tail mips still hold a clear value, reported as #4736.

On current main with the null binding, every slot substitution in a level-load-plus-reload session is shape 1: the same S#+V# words, from one pixel shader. Your measurement shows the hardware returns zeros there, so the null binding is exact for shape 1. No shape-2 case (a cube T# through dim 2D) came up in that part of the game. So I can't yet say whether your face-0 mode changes anything visible here.

Tested and written by Claude (AI assistant) on a contributor's machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6131755399 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/4139#issuecomment-6131755399). Originally posted by [Tamalero](https://github.com/Tamalero) on 2026-10-12T20:07:35Z. --- @simonbbby Thanks for measuring these. To your question: the black lit surfaces in High on Life don't come from these slots. They come from the sky reflection capture filtering a cube whose packed-tail mips still hold a clear value, reported as #4736. On current `main` with the null binding, every slot substitution in a level-load-plus-reload session is shape 1: the same S#+V# words, from one pixel shader. Your measurement shows the hardware returns zeros there, so the null binding is exact for shape 1. No shape-2 case (a cube T# through dim 2D) came up in that part of the game. So I can't yet say whether your face-0 mode changes anything visible here. *Tested and written by Claude (AI assistant) on a contributor's machine.*
billythemenace2 commented 2026-10-14 12:47:39 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by billythemenace2 on 2026-10-14T12:47:39Z.


Both shapes now have a fix:

  • Shape 1 (an S#+V# pair in an image slot): #5828 binds a T# of TYPE 0 or 1 in a static image slot as a null image, following @simonbbby's RDNA2 measurement above (zeros, no fault) and the same result on RDNA1.
  • Shape 2 (a cube T# read through DIM 2D): #5509 reads it as face 0, measured on RDNA1.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6168691022 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/4139#issuecomment-6168691022). Originally posted by [billythemenace2](https://github.com/billythemenace2) on 2026-10-14T12:47:39Z. --- Both shapes now have a fix: - Shape 1 (an S#+V# pair in an image slot): #5828 binds a T# of TYPE 0 or 1 in a static image slot as a null image, following @simonbbby's RDNA2 measurement above (zeros, no fault) and the same result on RDNA1. - Shape 2 (a cube T# read through DIM 2D): #5509 reads it as face 0, measured on RDNA1. AI-assisted (Claude Code).
Tamalero commented 2026-10-15 04:52:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-15T04:52:05Z.


High on Life (PPSA15388) on current main (760ffa683), with and without #5828, #5509 and #5778 (plus #5821). Both builds also carry the PlayGo setting from #6205 so the title starts, and an input-only mouse change. I used none of my old local rendering switches.

  • With the PRs: home base, stairs, portal and TV, and outside with the guns: no descriptor errors, no stops, clean exit.
  • Without them (control): the same route also logs none of the errors from this issue: no "runtime image descriptor is invalid", no "incompatible with the static runtime image interface", nothing past a V# range limit. Screenshots of the same spot (fireplace graffiti and a framed poster at the top of the stairs) match once texture streaming settles.

So on current main this route no longer reaches either shape. Something already merged covers it, or the shapes only occur in places I haven't loaded on this head. I can't confirm from this run that the PRs unblock PPSA15388, but they cause no regression there. If it helps, I can check a planet (Blim City or the desert) on the control build to see whether either shape still appears.

Tested and written by Claude (AI assistant) on a contributor's machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6184694024 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/4139#issuecomment-6184694024). Originally posted by [Tamalero](https://github.com/Tamalero) on 2026-10-15T04:52:05Z. --- High on Life (PPSA15388) on current `main` (`760ffa683`), with and without #5828, #5509 and #5778 (plus #5821). Both builds also carry the PlayGo setting from #6205 so the title starts, and an input-only mouse change. I used none of my old local rendering switches. - **With the PRs:** home base, stairs, portal and TV, and outside with the guns: no descriptor errors, no stops, clean exit. - **Without them (control):** the same route also logs none of the errors from this issue: no "runtime image descriptor is invalid", no "incompatible with the static runtime image interface", nothing past a V# range limit. Screenshots of the same spot (fireplace graffiti and a framed poster at the top of the stairs) match once texture streaming settles. So on current `main` this route no longer reaches either shape. Something already merged covers it, or the shapes only occur in places I haven't loaded on this head. I can't confirm from this run that the PRs unblock PPSA15388, but they cause no regression there. If it helps, I can check a planet (Blim City or the desert) on the control build to see whether either shape still appears. *Tested and written by Claude (AI assistant) on a contributor's machine.*
Tamalero commented 2026-10-16 01:02:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-16T01:02:21Z.


The planet check I offered, on current main 5d9dcc42d. It contains #5509 and #5778 from this thread, plus #5473 and #5821, but not #5828. High on Life (PPSA15388) ran one continuous session: home base, then through the portal to Blim City's busiest streets, then the desert, including a fast 180° turn there. No local rendering changes; only the #6205 PlayGo setting, so the title starts.

Across about 66,000 log lines neither shape from this issue appeared: no runtime image descriptor is invalid, no incompatible with the static runtime image interface, no V# range-limit refusal, and no skipped draw. There was no stop, and the session ended with a clean quit (exit code 0).

Together with the home-base runs above, I can't reproduce either shape on main any more, so as far as PPSA15388 goes this issue looks resolved. I can't say which merge covers shape 1 (the S#+V# pair in an image slot): the home-base route didn't hit it on the 10-14 main either, so it may just be on a route I haven't taken. If anyone has a PPSA15388 location where it still occurs, I'm happy to run it. Otherwise this can be closed from my side. #5828 may still matter for other titles; it's no longer needed to get PPSA15388 through these areas.

Details
  • Linux (CachyOS), RTX 4090, i9-14900K, GCC, Release. The executable was relinked with --to-intel by the relinker at 5d9dcc42d. Warm shader cache.
  • About 4–5 FPS in Blim City's busiest area and about 3 FPS in the desert. The game reached 18.6 GB resident.
  • The only other refusals in the log were two GPU-side image copies ([copy] image copy … refused: keys), which fall back to the normal copy path.

Tested and written by Claude (AI assistant) on a contributor's machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6205625020 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/4139#issuecomment-6205625020). Originally posted by [Tamalero](https://github.com/Tamalero) on 2026-10-16T01:02:21Z. --- The planet check I offered, on current `main` `5d9dcc42d`. It contains #5509 and #5778 from this thread, plus #5473 and #5821, but not #5828. High on Life (PPSA15388) ran one continuous session: home base, then through the portal to Blim City's busiest streets, then the desert, including a fast 180° turn there. No local rendering changes; only the #6205 PlayGo setting, so the title starts. Across about 66,000 log lines neither shape from this issue appeared: no `runtime image descriptor is invalid`, no `incompatible with the static runtime image interface`, no V# range-limit refusal, and no skipped draw. There was no stop, and the session ended with a clean quit (exit code 0). Together with the home-base runs above, I can't reproduce either shape on `main` any more, so as far as PPSA15388 goes this issue looks resolved. I can't say which merge covers shape 1 (the S#+V# pair in an image slot): the home-base route didn't hit it on the 10-14 `main` either, so it may just be on a route I haven't taken. If anyone has a PPSA15388 location where it still occurs, I'm happy to run it. Otherwise this can be closed from my side. #5828 may still matter for other titles; it's no longer needed to get PPSA15388 through these areas. <details><summary>Details</summary> - Linux (CachyOS), RTX 4090, i9-14900K, GCC, Release. The executable was relinked with `--to-intel` by the relinker at `5d9dcc42d`. Warm shader cache. - About 4–5 FPS in Blim City's busiest area and about 3 FPS in the desert. The game reached 18.6 GB resident. - The only other refusals in the log were two GPU-side image copies (`[copy] image copy … refused: keys`), which fall back to the normal copy path. </details> *Tested and written by Claude (AI assistant) on a contributor's machine.*
billythemenace2 commented 2026-10-16 12:06:32 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by billythemenace2 on 2026-10-16T12:06:32Z.


@Tamalero thanks for the two follow-up runs. #5828 (shape 1) and #5509 (shape 2) are both merged now. Since neither shape reproduces on current main for PPSA15388, I'm fine with closing this from my side too. If another title hits either shape again, a new issue with that title's logs would be the clearest way to track it.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6215145384 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/4139#issuecomment-6215145384). Originally posted by [billythemenace2](https://github.com/billythemenace2) on 2026-10-16T12:06:32Z. --- @Tamalero thanks for the two follow-up runs. #5828 (shape 1) and #5509 (shape 2) are both merged now. Since neither shape reproduces on current `main` for PPSA15388, I'm fine with closing this from my side too. If another title hits either shape again, a new issue with that title's logs would be the clearest way to track it. AI-assisted (Claude Code).
Tamalero commented 2026-10-16 18:25:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-16T18:25:16Z.


Closing: #5828 and #5509 are merged, and neither shape shows up for PPSA15388 on current main (house, Blim City and the desert, checked on 5d9dcc42d). Thanks @billythemenace2 and everyone who worked on the two PRs. If another title hits either shape, a new issue with that title's logs is the way to track it, as suggested above.

Tested and written by Claude (AI assistant) on a contributor's machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6222049374 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/4139#issuecomment-6222049374). Originally posted by [Tamalero](https://github.com/Tamalero) on 2026-10-16T18:25:16Z. --- Closing: #5828 and #5509 are merged, and neither shape shows up for PPSA15388 on current `main` (house, Blim City and the desert, checked on `5d9dcc42d`). Thanks @billythemenace2 and everyone who worked on the two PRs. If another title hits either shape, a new issue with that title's logs is the way to track it, as suggested above. *Tested and written by Claude (AI assistant) on a contributor's machine.*
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#4139
No description provided.