fix(shader): read explicit-LOD and level-zero 2D-array samples through 1D T#s as measured #5841

Merged
simonbronk merged 1 commit from upstream-pr/5841 into main 2026-10-15 21:00:51 +00:00
simonbronk commented 2026-10-14 13:30:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-14T13:30:01Z.


What

Onimusha: Way of the Sword (PPSA27836) samples a 1D T# (8_8_8_8 UNORM, from a bindless material table) through a 2D-array image_sample_l, and preparation stops:

image descriptor is incompatible with the static runtime image interface: descriptor format 56 decodes to {class 1, dim 1, ...}; modes: {class 1, dim 5, ...} {class 1, dim 3, ...} ...

#5583 (merged) gives 2D explicit-LOD samples through a 1D T# the 1D runtime mode. This extends that mode to 2D-array accesses, for image_sample_l and image_sample_lz only, as measured.

Source: hardware measurement on RDNA2 (gfx1036, Ryzen iGPU), tools/hw-oracle/template.s assembled by the AMD Windows driver's amd_comgr_2.dll and launched through its amdhip64_6.dll (the runner posted in #1281, with the template's newer placeholders filled). Each row samples the same TYPE 1D T# with DIM 2D_ARRAY and with DIM 1D and compares the results bit for bit. 16-texel 8_8_8_8 UNORM T# filled with distinct words; 1 or 5 levels, the 5-level one also with HEIGHT 3 or DEPTH 3; u of 0.03125, 0.33125, 0.96875, 0, 1, -0.2, 1.3 and 0.6; v of 0, 0.5, 1, -0.25 and 3; slices 0, 1, 2.7, -1 and 5; LOD -1, 0, 1, 1.25, 2.75 and 6; point and linear filtering with point and linear mips under clamp, wrap and border addressing.

  • image_sample_l: 24000/24000 rows equal.
  • image_sample_lz: 24000/24000 rows equal.
  • image_load (not enabled here): DIM 2D_ARRAY returns the DIM 1D texel only at slice 0 and zeros at slices 1, 2, 5 and -1, even with DEPTH 3 (600 rows). It keeps throwing, and the debt entry records it.

The plain image_sample and the other 2D-array accesses through a 1D T# also keep throwing. The PS5's gfx1013 is not measured.

Tested

  • Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7, Release, rebased on main 0afa6a607 (#5583 merged; the line-sample condition keeps main's comparison mask for non-array accesses):
    • ctest -R "agc|shader|video_out" on the RTX 5070: 601/601 pass;
    • the same on the AMD iGPU: all pass except the three tests of #5271, which fail the same way on main on this GPU.
  • agc_driver_image_plane_address_on_line gains CheckArray: image_sample_l and image_sample_lz with DIM 2D_ARRAY through the 5-level 1D T#, slices 0, 1, 2.7, -1 and 5, under the five sampler cases, compared bit for bit with image_sample_l DIM 1D. It passes on the RTX 5070 and on the AMD iGPU. Without the change it fails with the title's message.
  • PPSA27836 on Windows (RTX 5070), on a local branch with the fixes in #5769: the program prepares, and the title reaches its first presentation.
  • python tools/check_conventions.py --base upstream/main: passes.

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 — not applicable
  • 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 — not applicable
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: PPSA27836 #5769
  • GPUs tested: NVIDIA GeForce RTX 5070, driver 617.42 (32.0.16.1742); AMD Radeon(TM) Graphics, Ryzen iGPU gfx1036, driver 32.0.21036.18; both Windows 11 Pro 26200
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4858651284 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5841). Originally posted by [simonbronk](https://github.com/simonbronk) on 2026-10-14T13:30:01Z. --- ### What Onimusha: Way of the Sword (PPSA27836) samples a 1D T# (8_8_8_8 UNORM, from a bindless material table) through a 2D-array `image_sample_l`, and preparation stops: ``` image descriptor is incompatible with the static runtime image interface: descriptor format 56 decodes to {class 1, dim 1, ...}; modes: {class 1, dim 5, ...} {class 1, dim 3, ...} ... ``` #5583 (merged) gives 2D explicit-LOD samples through a 1D T# the 1D runtime mode. This extends that mode to 2D-array accesses, for `image_sample_l` and `image_sample_lz` only, as measured. Source: hardware measurement on RDNA2 (gfx1036, Ryzen iGPU), `tools/hw-oracle/template.s` assembled by the AMD Windows driver's `amd_comgr_2.dll` and launched through its `amdhip64_6.dll` (the runner posted in #1281, with the template's newer placeholders filled). Each row samples the same TYPE 1D T# with DIM 2D_ARRAY and with DIM 1D and compares the results bit for bit. 16-texel 8_8_8_8 UNORM T# filled with distinct words; 1 or 5 levels, the 5-level one also with HEIGHT 3 or DEPTH 3; u of 0.03125, 0.33125, 0.96875, 0, 1, -0.2, 1.3 and 0.6; v of 0, 0.5, 1, -0.25 and 3; slices 0, 1, 2.7, -1 and 5; LOD -1, 0, 1, 1.25, 2.75 and 6; point and linear filtering with point and linear mips under clamp, wrap and border addressing. - `image_sample_l`: 24000/24000 rows equal. - `image_sample_lz`: 24000/24000 rows equal. - `image_load` (not enabled here): DIM 2D_ARRAY returns the DIM 1D texel only at slice 0 and zeros at slices 1, 2, 5 and -1, even with DEPTH 3 (600 rows). It keeps throwing, and the debt entry records it. The plain `image_sample` and the other 2D-array accesses through a 1D T# also keep throwing. The PS5's gfx1013 is not measured. ### Tested - Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7, Release, rebased on `main` 0afa6a607 (#5583 merged; the line-sample condition keeps `main`'s comparison mask for non-array accesses): - `ctest -R "agc|shader|video_out"` on the RTX 5070: 601/601 pass; - the same on the AMD iGPU: all pass except the three tests of #5271, which fail the same way on `main` on this GPU. - `agc_driver_image_plane_address_on_line` gains `CheckArray`: `image_sample_l` and `image_sample_lz` with DIM 2D_ARRAY through the 5-level 1D T#, slices 0, 1, 2.7, -1 and 5, under the five sampler cases, compared bit for bit with `image_sample_l` DIM 1D. It passes on the RTX 5070 and on the AMD iGPU. Without the change it fails with the title's message. - PPSA27836 on Windows (RTX 5070), on a local branch with the fixes in #5769: the program prepares, and the title reaches its first presentation. - `python tools/check_conventions.py --base upstream/main`: passes. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's technical debt file — not applicable - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source — not applicable - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: PPSA27836 #5769 - [x] GPUs tested: NVIDIA GeForce RTX 5070, driver 617.42 (32.0.16.1742); AMD Radeon(TM) Graphics, Ryzen iGPU gfx1036, driver 32.0.21036.18; both Windows 11 Pro 26200 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
simonbronk commented 2026-10-14 13:30:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-14T13:30:14Z.


The probe and the raw output of the measurement. The runner is hw_oracle_win.py from #1281 with one change: assemble also fills the template's newer placeholders (@DX10_CLAMP@ 1, @ROUND32@ 0, @ROUND16@ 0, @FP16_OVERFLOW@ 0, @LDS@ 4096). Run as python probe_1d_as_2darray.py image_sample_l (or image_sample_lz, image_load) next to it and template.s.

probe_1d_as_2darray.py
"""image_sample_l with DIM 2D_ARRAY on a TYPE 1D T#, compared with the same sample with DIM 1D.

Each row is (u, v, slice, lod) as f32. The texture is 16 texels wide, format 8_8_8_8 UNORM, linear,
filled with distinct words, so any difference in the texels read shows in the result.
"""
import itertools
import struct
import sys
from pathlib import Path

sys.path.insert(0, str(Path(__file__).resolve().parent))
import hw_oracle_win as oracle

ROWS = 1024
TEXTURE_OFFSET = ROWS * 16
TEXTURE_BYTES = 16384
WIDTH = 16
FORMAT_8888_UNORM = 56
TYPE_1D = 8

U = [0.03125, 0.33125, 0.96875, 0.0, 1.0, -0.2, 1.3, 0.6]
V = [0.0, 0.5, 1.0, -0.25, 3.0]
SLICE = [0.0, 1.0, 2.7, -1.0, 5.0]
LOD = [-1.0, 0.0, 1.0, 1.25, 2.75, 6.0]

SAMPLERS = [
    ("point, point mips, clamp to edge", 2, 0, 1),
    ("point, point mips, wrap", 0, 0, 1),
    ("linear, linear mips, clamp to edge", 2, 1, 2),
    ("linear, linear mips, wrap", 0, 1, 2),
    ("linear, linear mips, clamp to border", 6, 1, 2),
]
TEXTURES = [
    ("1 level", 1, 0, 0),
    ("5 levels", 5, 0, 0),
    ("5 levels, HEIGHT 3", 5, 3, 0),
    ("5 levels, DEPTH 3", 5, 0, 3),
]


def bits(value):
    return struct.unpack("<I", struct.pack("<f", value))[0]


def body(mips, height, depth, clamp, xy_filter, mip_filter, ops):
    dw1 = (FORMAT_8888_UNORM << 20) | (((WIDTH - 1) & 3) << 30)
    dw2 = ((WIDTH - 1) >> 2) | (height << 14)
    dw3 = 0xFAC | ((mips - 1) << 16) | (TYPE_1D << 28)
    dw4 = depth
    dw5 = (mips - 1) << 4
    sdw0 = clamp | (clamp << 3) | (clamp << 6)
    sdw1 = 0xFFF << 12
    sdw2 = (xy_filter << 20) | (xy_filter << 22) | (mip_filter << 26)
    return f"""
  s_add_u32 s8, s4, {TEXTURE_OFFSET:#x}
  s_addc_u32 s9, s5, 0
  s_lshr_b64 s[8:9], s[8:9], 8
  s_mov_b32 s16, s8
  s_and_b32 s17, s9, 0xff
  s_or_b32 s17, s17, {dw1:#x}
  s_mov_b32 s18, {dw2:#x}
  s_mov_b32 s19, {dw3:#x}
  s_mov_b32 s20, {dw4:#x}
  s_mov_b32 s21, {dw5:#x}
  s_mov_b32 s22, 0
  s_mov_b32 s23, 0
  s_mov_b32 s24, {sdw0:#x}
  s_mov_b32 s25, {sdw1:#x}
  s_mov_b32 s26, {sdw2:#x}
  s_mov_b32 s27, 0
  v_mov_b32 v26, v4
  v_mov_b32 v27, v7
  @OPS@
  s_waitcnt vmcnt(0)
""".replace("@OPS@", ops)


OPS = {
    "image_sample_l": ("image_sample_l v[10:13], v[4:7], s[16:23], s[24:27] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY\n  image_sample_l v[14:17], v[26:27], s[16:23], s[24:27] dmask:0xf dim:SQ_RSRC_IMG_1D", True),
    "image_sample_lz": ("image_sample_lz v[10:13], v[4:6], s[16:23], s[24:27] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY\n  image_sample_lz v[14:17], v26, s[16:23], s[24:27] dmask:0xf dim:SQ_RSRC_IMG_1D", True),
    "image_load": ("image_load v[10:13], v[4:6], s[16:23] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm\n  image_load v[14:17], v26, s[16:23] dmask:0xf dim:SQ_RSRC_IMG_1D unorm", False),
}
LOAD_X = [0, 3, 15, 16, 20, 0xFFFFFFFF]
LOAD_Y = [0, 1, 3, 0xFFFFFFFF, 7]
LOAD_SLICE = [0, 1, 2, 5, 0xFFFFFFFF]


def texture():
    return b"".join(struct.pack("<I", (index * 0x9E3779B1 + 0x12345) & 0xFFFFFFFF) for index in range(TEXTURE_BYTES // 4))


def main():
    extra = texture()
    which = sys.argv[1] if len(sys.argv) > 1 else "image_sample_l"
    ops, sampled = OPS[which]
    if sampled:
        grid = [tuple(bits(x) for x in row) for row in itertools.product(U, V, SLICE, LOD)]
        cases = list(itertools.product(TEXTURES, SAMPLERS))
    else:
        grid = [(x, y, z, 0) for x, y, z in itertools.product(LOAD_X, LOAD_Y, LOAD_SLICE)]
        cases = [(texture_case, SAMPLERS[0]) for texture_case in TEXTURES]
    padded = grid + [(0, 0, 0, 0)] * (-len(grid) % ROWS)
    print(f"target {oracle.target()}; {len(grid)} rows per case; {which} DIM 2D_ARRAY vs DIM 1D on a TYPE 1D T#")
    total_rows = 0
    total_mismatch = 0
    for (tname, mips, height, depth), (sname, clamp, xy, mip) in cases:
        results = oracle.run(body(mips, height, depth, clamp, xy, mip, ops), padded, extra, coarse=True)[:len(grid)]
        mismatches = [(grid[i], r) for i, r in enumerate(results) if tuple(r[0:4]) != tuple(r[4:8])]
        untouched = sum(1 for r in results if r[0] == 0xEEEEEEEE or r[4] == 0xEEEEEEEE)
        total_rows += len(grid)
        total_mismatch += len(mismatches)
        distinct = len({tuple(r[4:8]) for r in results if any(r[4:8])})
        print(f"{tname}; {sname}: {len(grid) - len(mismatches)}/{len(grid)} rows equal, {untouched} unwritten, {distinct} distinct non-zero 1D results")
        for row, r in mismatches[:3]:
            values = [struct.unpack('<f', struct.pack('<I', w))[0] for w in row]
            print(f"  u={values[0]} v={values[1]} slice={values[2]} lod={values[3]}: 2d_array {' '.join(f'{w:08x}' for w in r[0:4])} 1d {' '.join(f'{w:08x}' for w in r[4:8])}")
    print(f"total: {total_rows - total_mismatch}/{total_rows} rows equal")


if __name__ == "__main__":
    main()
image_sample_l output
target gfx1036; 1200 rows per case; image_sample_l DIM 2D_ARRAY vs DIM 1D on a TYPE 1D T#
1 level; point, point mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 4 distinct non-zero 1D results
1 level; point, point mips, wrap: 1200/1200 rows equal, 0 unwritten, 6 distinct non-zero 1D results
1 level; linear, linear mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 4 distinct non-zero 1D results
1 level; linear, linear mips, wrap: 1200/1200 rows equal, 0 unwritten, 7 distinct non-zero 1D results
1 level; linear, linear mips, clamp to border: 1200/1200 rows equal, 0 unwritten, 6 distinct non-zero 1D results
5 levels; point, point mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 11 distinct non-zero 1D results
5 levels; point, point mips, wrap: 1200/1200 rows equal, 0 unwritten, 14 distinct non-zero 1D results
5 levels; linear, linear mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 17 distinct non-zero 1D results
5 levels; linear, linear mips, wrap: 1200/1200 rows equal, 0 unwritten, 29 distinct non-zero 1D results
5 levels; linear, linear mips, clamp to border: 1200/1200 rows equal, 0 unwritten, 31 distinct non-zero 1D results
5 levels, HEIGHT 3; point, point mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 11 distinct non-zero 1D results
5 levels, HEIGHT 3; point, point mips, wrap: 1200/1200 rows equal, 0 unwritten, 14 distinct non-zero 1D results
5 levels, HEIGHT 3; linear, linear mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 17 distinct non-zero 1D results
5 levels, HEIGHT 3; linear, linear mips, wrap: 1200/1200 rows equal, 0 unwritten, 29 distinct non-zero 1D results
5 levels, HEIGHT 3; linear, linear mips, clamp to border: 1200/1200 rows equal, 0 unwritten, 31 distinct non-zero 1D results
5 levels, DEPTH 3; point, point mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 11 distinct non-zero 1D results
5 levels, DEPTH 3; point, point mips, wrap: 1200/1200 rows equal, 0 unwritten, 14 distinct non-zero 1D results
5 levels, DEPTH 3; linear, linear mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 17 distinct non-zero 1D results
5 levels, DEPTH 3; linear, linear mips, wrap: 1200/1200 rows equal, 0 unwritten, 29 distinct non-zero 1D results
5 levels, DEPTH 3; linear, linear mips, clamp to border: 1200/1200 rows equal, 0 unwritten, 31 distinct non-zero 1D results
total: 24000/24000 rows equal
image_sample_lz output
target gfx1036; 1200 rows per case; image_sample_lz DIM 2D_ARRAY vs DIM 1D on a TYPE 1D T#
1 level; point, point mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 4 distinct non-zero 1D results
1 level; point, point mips, wrap: 1200/1200 rows equal, 0 unwritten, 6 distinct non-zero 1D results
1 level; linear, linear mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 4 distinct non-zero 1D results
1 level; linear, linear mips, wrap: 1200/1200 rows equal, 0 unwritten, 7 distinct non-zero 1D results
1 level; linear, linear mips, clamp to border: 1200/1200 rows equal, 0 unwritten, 6 distinct non-zero 1D results
5 levels; point, point mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 4 distinct non-zero 1D results
5 levels; point, point mips, wrap: 1200/1200 rows equal, 0 unwritten, 6 distinct non-zero 1D results
5 levels; linear, linear mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 4 distinct non-zero 1D results
5 levels; linear, linear mips, wrap: 1200/1200 rows equal, 0 unwritten, 7 distinct non-zero 1D results
5 levels; linear, linear mips, clamp to border: 1200/1200 rows equal, 0 unwritten, 6 distinct non-zero 1D results
5 levels, HEIGHT 3; point, point mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 4 distinct non-zero 1D results
5 levels, HEIGHT 3; point, point mips, wrap: 1200/1200 rows equal, 0 unwritten, 6 distinct non-zero 1D results
5 levels, HEIGHT 3; linear, linear mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 4 distinct non-zero 1D results
5 levels, HEIGHT 3; linear, linear mips, wrap: 1200/1200 rows equal, 0 unwritten, 7 distinct non-zero 1D results
5 levels, HEIGHT 3; linear, linear mips, clamp to border: 1200/1200 rows equal, 0 unwritten, 6 distinct non-zero 1D results
5 levels, DEPTH 3; point, point mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 4 distinct non-zero 1D results
5 levels, DEPTH 3; point, point mips, wrap: 1200/1200 rows equal, 0 unwritten, 6 distinct non-zero 1D results
5 levels, DEPTH 3; linear, linear mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 4 distinct non-zero 1D results
5 levels, DEPTH 3; linear, linear mips, wrap: 1200/1200 rows equal, 0 unwritten, 7 distinct non-zero 1D results
5 levels, DEPTH 3; linear, linear mips, clamp to border: 1200/1200 rows equal, 0 unwritten, 6 distinct non-zero 1D results
total: 24000/24000 rows equal
image_load output
target gfx1036; 150 rows per case; image_load DIM 2D_ARRAY vs DIM 1D on a TYPE 1D T#
1 level; point, point mips, clamp to edge: 90/150 rows equal, 0 unwritten, 3 distinct non-zero 1D results
  u=0.0 v=0.0 slice=1.401298464324817e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3e8a8a8b 3e0c8c8d 3b808081 00000000
  u=0.0 v=0.0 slice=2.802596928649634e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3e8a8a8b 3e0c8c8d 3b808081 00000000
  u=0.0 v=0.0 slice=7.006492321624085e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3e8a8a8b 3e0c8c8d 3b808081 00000000
5 levels; point, point mips, clamp to edge: 90/150 rows equal, 0 unwritten, 3 distinct non-zero 1D results
  u=0.0 v=0.0 slice=1.401298464324817e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3e8a8a8b 3f54d4d5 3ef4f4f5 3e5cdcdd
  u=0.0 v=0.0 slice=2.802596928649634e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3e8a8a8b 3f54d4d5 3ef4f4f5 3e5cdcdd
  u=0.0 v=0.0 slice=7.006492321624085e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3e8a8a8b 3f54d4d5 3ef4f4f5 3e5cdcdd
5 levels, HEIGHT 3; point, point mips, clamp to edge: 90/150 rows equal, 0 unwritten, 3 distinct non-zero 1D results
  u=0.0 v=0.0 slice=1.401298464324817e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3f058586 3e808081 3eb2b2b3 3f45c5c6
  u=0.0 v=0.0 slice=2.802596928649634e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3f058586 3e808081 3eb2b2b3 3f45c5c6
  u=0.0 v=0.0 slice=7.006492321624085e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3f058586 3e808081 3eb2b2b3 3f45c5c6
5 levels, DEPTH 3; point, point mips, clamp to edge: 90/150 rows equal, 0 unwritten, 3 distinct non-zero 1D results
  u=0.0 v=0.0 slice=1.401298464324817e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3e8a8a8b 3f54d4d5 3ef4f4f5 3e5cdcdd
  u=0.0 v=0.0 slice=2.802596928649634e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3e8a8a8b 3f54d4d5 3ef4f4f5 3e5cdcdd
  u=0.0 v=0.0 slice=7.006492321624085e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3e8a8a8b 3f54d4d5 3ef4f4f5 3e5cdcdd
total: 360/600 rows equal

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6169517867 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5841#issuecomment-6169517867). Originally posted by [simonbronk](https://github.com/simonbronk) on 2026-10-14T13:30:14Z. --- The probe and the raw output of the measurement. The runner is `hw_oracle_win.py` from #1281 with one change: `assemble` also fills the template's newer placeholders (`@DX10_CLAMP@` 1, `@ROUND32@` 0, `@ROUND16@` 0, `@FP16_OVERFLOW@` 0, `@LDS@` 4096). Run as `python probe_1d_as_2darray.py image_sample_l` (or `image_sample_lz`, `image_load`) next to it and `template.s`. <details><summary>probe_1d_as_2darray.py</summary> ```python """image_sample_l with DIM 2D_ARRAY on a TYPE 1D T#, compared with the same sample with DIM 1D. Each row is (u, v, slice, lod) as f32. The texture is 16 texels wide, format 8_8_8_8 UNORM, linear, filled with distinct words, so any difference in the texels read shows in the result. """ import itertools import struct import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent)) import hw_oracle_win as oracle ROWS = 1024 TEXTURE_OFFSET = ROWS * 16 TEXTURE_BYTES = 16384 WIDTH = 16 FORMAT_8888_UNORM = 56 TYPE_1D = 8 U = [0.03125, 0.33125, 0.96875, 0.0, 1.0, -0.2, 1.3, 0.6] V = [0.0, 0.5, 1.0, -0.25, 3.0] SLICE = [0.0, 1.0, 2.7, -1.0, 5.0] LOD = [-1.0, 0.0, 1.0, 1.25, 2.75, 6.0] SAMPLERS = [ ("point, point mips, clamp to edge", 2, 0, 1), ("point, point mips, wrap", 0, 0, 1), ("linear, linear mips, clamp to edge", 2, 1, 2), ("linear, linear mips, wrap", 0, 1, 2), ("linear, linear mips, clamp to border", 6, 1, 2), ] TEXTURES = [ ("1 level", 1, 0, 0), ("5 levels", 5, 0, 0), ("5 levels, HEIGHT 3", 5, 3, 0), ("5 levels, DEPTH 3", 5, 0, 3), ] def bits(value): return struct.unpack("<I", struct.pack("<f", value))[0] def body(mips, height, depth, clamp, xy_filter, mip_filter, ops): dw1 = (FORMAT_8888_UNORM << 20) | (((WIDTH - 1) & 3) << 30) dw2 = ((WIDTH - 1) >> 2) | (height << 14) dw3 = 0xFAC | ((mips - 1) << 16) | (TYPE_1D << 28) dw4 = depth dw5 = (mips - 1) << 4 sdw0 = clamp | (clamp << 3) | (clamp << 6) sdw1 = 0xFFF << 12 sdw2 = (xy_filter << 20) | (xy_filter << 22) | (mip_filter << 26) return f""" s_add_u32 s8, s4, {TEXTURE_OFFSET:#x} s_addc_u32 s9, s5, 0 s_lshr_b64 s[8:9], s[8:9], 8 s_mov_b32 s16, s8 s_and_b32 s17, s9, 0xff s_or_b32 s17, s17, {dw1:#x} s_mov_b32 s18, {dw2:#x} s_mov_b32 s19, {dw3:#x} s_mov_b32 s20, {dw4:#x} s_mov_b32 s21, {dw5:#x} s_mov_b32 s22, 0 s_mov_b32 s23, 0 s_mov_b32 s24, {sdw0:#x} s_mov_b32 s25, {sdw1:#x} s_mov_b32 s26, {sdw2:#x} s_mov_b32 s27, 0 v_mov_b32 v26, v4 v_mov_b32 v27, v7 @OPS@ s_waitcnt vmcnt(0) """.replace("@OPS@", ops) OPS = { "image_sample_l": ("image_sample_l v[10:13], v[4:7], s[16:23], s[24:27] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY\n image_sample_l v[14:17], v[26:27], s[16:23], s[24:27] dmask:0xf dim:SQ_RSRC_IMG_1D", True), "image_sample_lz": ("image_sample_lz v[10:13], v[4:6], s[16:23], s[24:27] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY\n image_sample_lz v[14:17], v26, s[16:23], s[24:27] dmask:0xf dim:SQ_RSRC_IMG_1D", True), "image_load": ("image_load v[10:13], v[4:6], s[16:23] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm\n image_load v[14:17], v26, s[16:23] dmask:0xf dim:SQ_RSRC_IMG_1D unorm", False), } LOAD_X = [0, 3, 15, 16, 20, 0xFFFFFFFF] LOAD_Y = [0, 1, 3, 0xFFFFFFFF, 7] LOAD_SLICE = [0, 1, 2, 5, 0xFFFFFFFF] def texture(): return b"".join(struct.pack("<I", (index * 0x9E3779B1 + 0x12345) & 0xFFFFFFFF) for index in range(TEXTURE_BYTES // 4)) def main(): extra = texture() which = sys.argv[1] if len(sys.argv) > 1 else "image_sample_l" ops, sampled = OPS[which] if sampled: grid = [tuple(bits(x) for x in row) for row in itertools.product(U, V, SLICE, LOD)] cases = list(itertools.product(TEXTURES, SAMPLERS)) else: grid = [(x, y, z, 0) for x, y, z in itertools.product(LOAD_X, LOAD_Y, LOAD_SLICE)] cases = [(texture_case, SAMPLERS[0]) for texture_case in TEXTURES] padded = grid + [(0, 0, 0, 0)] * (-len(grid) % ROWS) print(f"target {oracle.target()}; {len(grid)} rows per case; {which} DIM 2D_ARRAY vs DIM 1D on a TYPE 1D T#") total_rows = 0 total_mismatch = 0 for (tname, mips, height, depth), (sname, clamp, xy, mip) in cases: results = oracle.run(body(mips, height, depth, clamp, xy, mip, ops), padded, extra, coarse=True)[:len(grid)] mismatches = [(grid[i], r) for i, r in enumerate(results) if tuple(r[0:4]) != tuple(r[4:8])] untouched = sum(1 for r in results if r[0] == 0xEEEEEEEE or r[4] == 0xEEEEEEEE) total_rows += len(grid) total_mismatch += len(mismatches) distinct = len({tuple(r[4:8]) for r in results if any(r[4:8])}) print(f"{tname}; {sname}: {len(grid) - len(mismatches)}/{len(grid)} rows equal, {untouched} unwritten, {distinct} distinct non-zero 1D results") for row, r in mismatches[:3]: values = [struct.unpack('<f', struct.pack('<I', w))[0] for w in row] print(f" u={values[0]} v={values[1]} slice={values[2]} lod={values[3]}: 2d_array {' '.join(f'{w:08x}' for w in r[0:4])} 1d {' '.join(f'{w:08x}' for w in r[4:8])}") print(f"total: {total_rows - total_mismatch}/{total_rows} rows equal") if __name__ == "__main__": main() ``` </details> <details><summary>image_sample_l output</summary> ``` target gfx1036; 1200 rows per case; image_sample_l DIM 2D_ARRAY vs DIM 1D on a TYPE 1D T# 1 level; point, point mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 4 distinct non-zero 1D results 1 level; point, point mips, wrap: 1200/1200 rows equal, 0 unwritten, 6 distinct non-zero 1D results 1 level; linear, linear mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 4 distinct non-zero 1D results 1 level; linear, linear mips, wrap: 1200/1200 rows equal, 0 unwritten, 7 distinct non-zero 1D results 1 level; linear, linear mips, clamp to border: 1200/1200 rows equal, 0 unwritten, 6 distinct non-zero 1D results 5 levels; point, point mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 11 distinct non-zero 1D results 5 levels; point, point mips, wrap: 1200/1200 rows equal, 0 unwritten, 14 distinct non-zero 1D results 5 levels; linear, linear mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 17 distinct non-zero 1D results 5 levels; linear, linear mips, wrap: 1200/1200 rows equal, 0 unwritten, 29 distinct non-zero 1D results 5 levels; linear, linear mips, clamp to border: 1200/1200 rows equal, 0 unwritten, 31 distinct non-zero 1D results 5 levels, HEIGHT 3; point, point mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 11 distinct non-zero 1D results 5 levels, HEIGHT 3; point, point mips, wrap: 1200/1200 rows equal, 0 unwritten, 14 distinct non-zero 1D results 5 levels, HEIGHT 3; linear, linear mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 17 distinct non-zero 1D results 5 levels, HEIGHT 3; linear, linear mips, wrap: 1200/1200 rows equal, 0 unwritten, 29 distinct non-zero 1D results 5 levels, HEIGHT 3; linear, linear mips, clamp to border: 1200/1200 rows equal, 0 unwritten, 31 distinct non-zero 1D results 5 levels, DEPTH 3; point, point mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 11 distinct non-zero 1D results 5 levels, DEPTH 3; point, point mips, wrap: 1200/1200 rows equal, 0 unwritten, 14 distinct non-zero 1D results 5 levels, DEPTH 3; linear, linear mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 17 distinct non-zero 1D results 5 levels, DEPTH 3; linear, linear mips, wrap: 1200/1200 rows equal, 0 unwritten, 29 distinct non-zero 1D results 5 levels, DEPTH 3; linear, linear mips, clamp to border: 1200/1200 rows equal, 0 unwritten, 31 distinct non-zero 1D results total: 24000/24000 rows equal ``` </details> <details><summary>image_sample_lz output</summary> ``` target gfx1036; 1200 rows per case; image_sample_lz DIM 2D_ARRAY vs DIM 1D on a TYPE 1D T# 1 level; point, point mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 4 distinct non-zero 1D results 1 level; point, point mips, wrap: 1200/1200 rows equal, 0 unwritten, 6 distinct non-zero 1D results 1 level; linear, linear mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 4 distinct non-zero 1D results 1 level; linear, linear mips, wrap: 1200/1200 rows equal, 0 unwritten, 7 distinct non-zero 1D results 1 level; linear, linear mips, clamp to border: 1200/1200 rows equal, 0 unwritten, 6 distinct non-zero 1D results 5 levels; point, point mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 4 distinct non-zero 1D results 5 levels; point, point mips, wrap: 1200/1200 rows equal, 0 unwritten, 6 distinct non-zero 1D results 5 levels; linear, linear mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 4 distinct non-zero 1D results 5 levels; linear, linear mips, wrap: 1200/1200 rows equal, 0 unwritten, 7 distinct non-zero 1D results 5 levels; linear, linear mips, clamp to border: 1200/1200 rows equal, 0 unwritten, 6 distinct non-zero 1D results 5 levels, HEIGHT 3; point, point mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 4 distinct non-zero 1D results 5 levels, HEIGHT 3; point, point mips, wrap: 1200/1200 rows equal, 0 unwritten, 6 distinct non-zero 1D results 5 levels, HEIGHT 3; linear, linear mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 4 distinct non-zero 1D results 5 levels, HEIGHT 3; linear, linear mips, wrap: 1200/1200 rows equal, 0 unwritten, 7 distinct non-zero 1D results 5 levels, HEIGHT 3; linear, linear mips, clamp to border: 1200/1200 rows equal, 0 unwritten, 6 distinct non-zero 1D results 5 levels, DEPTH 3; point, point mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 4 distinct non-zero 1D results 5 levels, DEPTH 3; point, point mips, wrap: 1200/1200 rows equal, 0 unwritten, 6 distinct non-zero 1D results 5 levels, DEPTH 3; linear, linear mips, clamp to edge: 1200/1200 rows equal, 0 unwritten, 4 distinct non-zero 1D results 5 levels, DEPTH 3; linear, linear mips, wrap: 1200/1200 rows equal, 0 unwritten, 7 distinct non-zero 1D results 5 levels, DEPTH 3; linear, linear mips, clamp to border: 1200/1200 rows equal, 0 unwritten, 6 distinct non-zero 1D results total: 24000/24000 rows equal ``` </details> <details><summary>image_load output</summary> ``` target gfx1036; 150 rows per case; image_load DIM 2D_ARRAY vs DIM 1D on a TYPE 1D T# 1 level; point, point mips, clamp to edge: 90/150 rows equal, 0 unwritten, 3 distinct non-zero 1D results u=0.0 v=0.0 slice=1.401298464324817e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3e8a8a8b 3e0c8c8d 3b808081 00000000 u=0.0 v=0.0 slice=2.802596928649634e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3e8a8a8b 3e0c8c8d 3b808081 00000000 u=0.0 v=0.0 slice=7.006492321624085e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3e8a8a8b 3e0c8c8d 3b808081 00000000 5 levels; point, point mips, clamp to edge: 90/150 rows equal, 0 unwritten, 3 distinct non-zero 1D results u=0.0 v=0.0 slice=1.401298464324817e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3e8a8a8b 3f54d4d5 3ef4f4f5 3e5cdcdd u=0.0 v=0.0 slice=2.802596928649634e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3e8a8a8b 3f54d4d5 3ef4f4f5 3e5cdcdd u=0.0 v=0.0 slice=7.006492321624085e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3e8a8a8b 3f54d4d5 3ef4f4f5 3e5cdcdd 5 levels, HEIGHT 3; point, point mips, clamp to edge: 90/150 rows equal, 0 unwritten, 3 distinct non-zero 1D results u=0.0 v=0.0 slice=1.401298464324817e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3f058586 3e808081 3eb2b2b3 3f45c5c6 u=0.0 v=0.0 slice=2.802596928649634e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3f058586 3e808081 3eb2b2b3 3f45c5c6 u=0.0 v=0.0 slice=7.006492321624085e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3f058586 3e808081 3eb2b2b3 3f45c5c6 5 levels, DEPTH 3; point, point mips, clamp to edge: 90/150 rows equal, 0 unwritten, 3 distinct non-zero 1D results u=0.0 v=0.0 slice=1.401298464324817e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3e8a8a8b 3f54d4d5 3ef4f4f5 3e5cdcdd u=0.0 v=0.0 slice=2.802596928649634e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3e8a8a8b 3f54d4d5 3ef4f4f5 3e5cdcdd u=0.0 v=0.0 slice=7.006492321624085e-45 lod=0.0: 2d_array 00000000 00000000 00000000 00000000 1d 3e8a8a8b 3f54d4d5 3ef4f4f5 3e5cdcdd total: 360/600 rows equal ``` </details> AI-assisted: yes (Claude Code).
jotitadev commented 2026-10-14 17:18:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-14T17:18:37Z.


Run on an Apple GPU, as a third device next to the RTX 5070 and the AMD iGPU.

GPUs tested: Apple M2 Max, MoltenVK 1.4.2 (Vulkan 1.4.357), macOS 27.2, x86-64 under Rosetta

main does not run the GPU tests on macOS yet, so I tested on macos-port at b7eb6b6b (mugurc/AnyPS5) with this PR's diff applied, not on main. Release build, LunarG Vulkan SDK 1.4.363.0. The suite is ctest -R agc -E 'flip|display|lds_atomics64' -j1 --timeout 30. Without the PR, 22 tests fail on this branch, all of them known macOS failures listed in #1. Head afb8151ac, which includes #5583's commit. The diff applies cleanly, except docs/.

  • agc_driver_image_plane_address_on_line passes, including CheckArray through the 5-level 1D T#. With only the test file applied to the unchanged branch, it fails with descriptor format 56 decodes to {class 1, dim 1, ...}, so the new cases do run here. This is relevant on MoltenVK because Metal 1D textures have no mip levels, and MoltenVK normally backs them with 2D textures (texture1DAs2D).
  • Suite: the same 22 failures with and without the PR. None are new and none are fixed.
  • I also ran #5583 alone (head a98b06534): same result, the test fails without the change and passes with it.

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

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6174105846 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5841#issuecomment-6174105846). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-14T17:18:37Z. --- Run on an Apple GPU, as a third device next to the RTX 5070 and the AMD iGPU. GPUs tested: Apple M2 Max, MoltenVK 1.4.2 (Vulkan 1.4.357), macOS 27.2, x86-64 under Rosetta `main` does not run the GPU tests on macOS yet, so I tested on `macos-port` at `b7eb6b6b` (mugurc/AnyPS5) with this PR's diff applied, not on `main`. Release build, LunarG Vulkan SDK 1.4.363.0. The suite is `ctest -R agc -E 'flip|display|lds_atomics64' -j1 --timeout 30`. Without the PR, 22 tests fail on this branch, all of them known macOS failures listed in #1. Head `afb8151ac`, which includes #5583's commit. The diff applies cleanly, except `docs/`. - `agc_driver_image_plane_address_on_line` passes, including `CheckArray` through the 5-level 1D T#. With only the test file applied to the unchanged branch, it fails with `descriptor format 56 decodes to {class 1, dim 1, ...}`, so the new cases do run here. This is relevant on MoltenVK because Metal 1D textures have no mip levels, and MoltenVK normally backs them with 2D textures (`texture1DAs2D`). - Suite: the same 22 failures with and without the PR. None are new and none are fixed. - I also ran #5583 alone (head `a98b06534`): same result, the test fails without the change and passes with it. Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
simonbronk commented 2026-10-14 19:57:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-14T19:57:36Z.


Rebased onto main 411e5e6d9 (d4aeaf4a9). main now has bd09862e5 (3D accesses through 1D T#s), which changed the same lines:

  • ResourceTracker.cpp: flatVolumeLineCompatible from main is kept as it is. This PR's explicit-LOD and 2D-array cases still only widen flatLineCompatible.
  • docs/dev/debt/shader.md: kept the new "3D image accesses bound to a 1D T#" entry beside this PR's updated 2D entry.

Tested again on Windows 11 Pro 26200, Release:

  • RTX 5070: ctest -R "agc|shader|video_out" 576 of 576 pass.
  • AMD iGPU gfx1036: 573 of 576 pass; the three failures are #5271's, as on main.
  • Conventions pass.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6177115209 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5841#issuecomment-6177115209). Originally posted by [simonbronk](https://github.com/simonbronk) on 2026-10-14T19:57:36Z. --- Rebased onto `main` 411e5e6d9 (d4aeaf4a9). `main` now has bd09862e5 (3D accesses through 1D T#s), which changed the same lines: - `ResourceTracker.cpp`: `flatVolumeLineCompatible` from `main` is kept as it is. This PR's explicit-LOD and 2D-array cases still only widen `flatLineCompatible`. - `docs/dev/debt/shader.md`: kept the new "3D image accesses bound to a 1D T#" entry beside this PR's updated 2D entry. Tested again on Windows 11 Pro 26200, Release: - RTX 5070: `ctest -R "agc|shader|video_out"` 576 of 576 pass. - AMD iGPU gfx1036: 573 of 576 pass; the three failures are #5271's, as on `main`. - Conventions pass.
github-actions[bot] commented 2026-10-15 12:10:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:10:15Z.


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
PR 1341 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 1896 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 3891 docs/dev/debt/shader.md
PR 4048 docs/dev/debt/shader.md
PR 4156 docs/dev/debt/shader.md
PR 4396 docs/dev/debt/shader.md
PR 4397 docs/dev/debt/shader.md
PR 4422 docs/dev/debt/shader.md
PR 4423 docs/dev/debt/shader.md
PR 4424 docs/dev/debt/shader.md
PR 4520 docs/dev/debt/shader.md
PR 4521 docs/dev/debt/shader.md
PR 4522 docs/dev/debt/shader.md
PR 4523 docs/dev/debt/shader.md
PR 4566 docs/dev/debt/shader.md
PR 4599 docs/dev/debt/shader.md
PR 4718 docs/dev/debt/shader.md
PR 4740 docs/dev/debt/shader.md
PR 4749 docs/dev/debt/shader.md
PR 4760 docs/dev/debt/shader.md
PR 4813 docs/dev/debt/shader.md
PR 5021 docs/dev/debt/shader.md
PR 5371 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
docs/dev/debt/shader.md
PR 5426 docs/dev/debt/shader.md
PR 5500 docs/dev/debt/shader.md
PR 5867 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
PR 6222 docs/dev/debt/shader.md
PR 6235 docs/dev/debt/shader.md
PR 6454 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp
core/shader/recompiler/Optimization/src/ResourceTracker.cpp
docs/dev/debt/shader.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6191715353 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5841#issuecomment-6191715353). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T12:10:15Z. --- <!-- pr-overlap --> 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](https://www.github.com/boykopovar/AnyPS5/pull/907) | `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp` | | [PR 1341](https://www.github.com/boykopovar/AnyPS5/pull/1341) | `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp` | | [PR 1896](https://www.github.com/boykopovar/AnyPS5/pull/1896) | `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp` | | [PR 3891](https://www.github.com/boykopovar/AnyPS5/pull/3891) | `docs/dev/debt/shader.md` | | [PR 4048](https://www.github.com/boykopovar/AnyPS5/pull/4048) | `docs/dev/debt/shader.md` | | [PR 4156](https://www.github.com/boykopovar/AnyPS5/pull/4156) | `docs/dev/debt/shader.md` | | [PR 4396](https://www.github.com/boykopovar/AnyPS5/pull/4396) | `docs/dev/debt/shader.md` | | [PR 4397](https://www.github.com/boykopovar/AnyPS5/pull/4397) | `docs/dev/debt/shader.md` | | [PR 4422](https://www.github.com/boykopovar/AnyPS5/pull/4422) | `docs/dev/debt/shader.md` | | [PR 4423](https://www.github.com/boykopovar/AnyPS5/pull/4423) | `docs/dev/debt/shader.md` | | [PR 4424](https://www.github.com/boykopovar/AnyPS5/pull/4424) | `docs/dev/debt/shader.md` | | [PR 4520](https://www.github.com/boykopovar/AnyPS5/pull/4520) | `docs/dev/debt/shader.md` | | [PR 4521](https://www.github.com/boykopovar/AnyPS5/pull/4521) | `docs/dev/debt/shader.md` | | [PR 4522](https://www.github.com/boykopovar/AnyPS5/pull/4522) | `docs/dev/debt/shader.md` | | [PR 4523](https://www.github.com/boykopovar/AnyPS5/pull/4523) | `docs/dev/debt/shader.md` | | [PR 4566](https://www.github.com/boykopovar/AnyPS5/pull/4566) | `docs/dev/debt/shader.md` | | [PR 4599](https://www.github.com/boykopovar/AnyPS5/pull/4599) | `docs/dev/debt/shader.md` | | [PR 4718](https://www.github.com/boykopovar/AnyPS5/pull/4718) | `docs/dev/debt/shader.md` | | [PR 4740](https://www.github.com/boykopovar/AnyPS5/pull/4740) | `docs/dev/debt/shader.md` | | [PR 4749](https://www.github.com/boykopovar/AnyPS5/pull/4749) | `docs/dev/debt/shader.md` | | [PR 4760](https://www.github.com/boykopovar/AnyPS5/pull/4760) | `docs/dev/debt/shader.md` | | [PR 4813](https://www.github.com/boykopovar/AnyPS5/pull/4813) | `docs/dev/debt/shader.md` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `docs/dev/debt/shader.md` | | [PR 5371](https://www.github.com/boykopovar/AnyPS5/pull/5371) | `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`docs/dev/debt/shader.md` | | [PR 5426](https://www.github.com/boykopovar/AnyPS5/pull/5426) | `docs/dev/debt/shader.md` | | [PR 5500](https://www.github.com/boykopovar/AnyPS5/pull/5500) | `docs/dev/debt/shader.md` | | [PR 5867](https://www.github.com/boykopovar/AnyPS5/pull/5867) | `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp` | | [PR 6222](https://www.github.com/boykopovar/AnyPS5/pull/6222) | `docs/dev/debt/shader.md` | | [PR 6235](https://www.github.com/boykopovar/AnyPS5/pull/6235) | `docs/dev/debt/shader.md` | | [PR 6454](https://www.github.com/boykopovar/AnyPS5/pull/6454) | `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp`<br>`core/shader/recompiler/Optimization/src/ResourceTracker.cpp`<br>`docs/dev/debt/shader.md` |
adriadam10 commented 2026-10-15 13:42:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-15T13:42:52Z.


Rebased onto main (mechanical conflict in ResourceMaterializer.cpp with the cube-face block; kept both). Measured on gfx1035 with the HW oracle (your probe, IEEE off): image_sample_l and image_sample_lz DIM 2D_ARRAY match DIM 1D on 24000/24000 rows each, and 2D-array image_load returns zeros at slice ≠ 0, so keeping it throwing is right. agc_driver_image_plane_address_on_line fails without the change and passes with it on RADV; merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6193526697 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5841#issuecomment-6193526697). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-15T13:42:52Z. --- Rebased onto `main` (mechanical conflict in `ResourceMaterializer.cpp` with the cube-face block; kept both). Measured on gfx1035 with the HW oracle (your probe, IEEE off): `image_sample_l` and `image_sample_lz` DIM 2D_ARRAY match DIM 1D on 24000/24000 rows each, and 2D-array `image_load` returns zeros at slice ≠ 0, so keeping it throwing is right. `agc_driver_image_plane_address_on_line` fails without the change and passes with it on RADV; merging.
Sign in to join this conversation.
No reviewers
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!5841
No description provided.