upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/scripts/run_gpu_tests.py
diff options
context:
space:
mode:
authorVonsek <45567075+Vonsek@users.noreply.github.com>2026-11-22 12:43:08 +0100
committerVonsek <45567075+Vonsek@users.noreply.github.com>2026-11-22 13:33:58 +0100
commit67c8ffe45c19d698ed6140a23dafad17e0cde8bb (patch)
treeeddba3baa9af86881496cee320b9fdc502347323 /scripts/run_gpu_tests.py
parent41f448261e1de8a410b4d760e69a7e5656cef858 (diff)
fix(shader): query dimensions from 2D array image views
Array resource queries need the array at the descriptor index so the third component reports the view's layer count. Check the returned dimensions through a draw against the existing 12-layer texture.
Diffstat (limited to 'scripts/run_gpu_tests.py')
-rw-r--r--scripts/run_gpu_tests.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py
index d8bcb7c28..726159f64 100644
--- a/scripts/run_gpu_tests.py
+++ b/scripts/run_gpu_tests.py
@@ -29,7 +29,7 @@ from check import Skip, clip_test, fmt_1010102_test, fmt_xy_xyz_test
29from compute_fixture import compute_header 29from compute_fixture import compute_header
30from check import SAMPLER_CASES, sampler_test # ps_ssharp: the S#/T# mip fields (vk_sampler_test) 30from check import SAMPLER_CASES, sampler_test # ps_ssharp: the S#/T# mip fields (vk_sampler_test)
31from check import (CMPX_CLASS_WORDS, CVT_F32_SAT_CASES, GRADIENT_TESTS, TEST_PROGRAMS, TEXTURE_MIP_DEPENDENCIES, 31from check import (CMPX_CLASS_WORDS, CVT_F32_SAT_CASES, GRADIENT_TESTS, TEST_PROGRAMS, TEXTURE_MIP_DEPENDENCIES,
32 TEXTURE_MIP_TEST, GATHER_LOD_TEST, MIP_TEST_PASSES, GATHER_WRAP, USER_SGPRS_ENV, USER_SGPRS_WORDS, Skip, mesh_v5_test, not_found_message, 32 TEXTURE_MIP_TEST, GATHER_LOD_TEST, MIP_TEST_PASSES, TEXTURE_CONSTANTS, USER_SGPRS_ENV, USER_SGPRS_WORDS, Skip, mesh_v5_test, not_found_message,
33 pick_build_dir, start_failure, texture_gradient_a16_test, texture_mip_test) 33 pick_build_dir, start_failure, texture_gradient_a16_test, texture_mip_test)
34from check import TEXOFF_ARGS, texoff_problem # ps_texoff's expected words and arguments live in check.py 34from check import TEXOFF_ARGS, texoff_problem # ps_texoff's expected words and arguments live in check.py
35from check import TEXOFF_FALLBACK, texoff_env # LEONIDA_TEXOFF_FALLBACK=1: texel offsets without maintenance8 35from check import TEXOFF_FALLBACK, texoff_env # LEONIDA_TEXOFF_FALLBACK=1: texel offsets without maintenance8
@@ -536,7 +536,7 @@ def check_clip_half(raw_path: str, want_b: float, want_a: float) -> tuple[bool,
536# Shaders a selected test draws with, built even when the filter leaves them out (#192). 536# Shaders a selected test draws with, built even when the filter leaves them out (#192).
537DRAWN_WITH = {GATHER_LOD_TEST: "vs_ids.asm", "ps_flat": "vs_ids.asm", "ps_texture_sample": "vs_ids.asm", "ps_cube_sample": "vs_ids.asm", 537DRAWN_WITH = {GATHER_LOD_TEST: "vs_ids.asm", "ps_flat": "vs_ids.asm", "ps_texture_sample": "vs_ids.asm", "ps_cube_sample": "vs_ids.asm",
538 "ps_texture_sample_d16": "vs_ids.asm", "ps_sample_c_lz": "vs_ids.asm", "ps_sample_c_lz_a16": "vs_ids.asm", 538 "ps_texture_sample_d16": "vs_ids.asm", "ps_sample_c_lz": "vs_ids.asm", "ps_sample_c_lz_a16": "vs_ids.asm",
539 "ps_gather_wrap": "vs_ids.asm", "ps_ssharp": "vs_ids.asm", 539 **{name: "vs_ids.asm" for name in TEXTURE_CONSTANTS}, "ps_ssharp": "vs_ids.asm",
540 **{name: "vs_ids.asm" for name in GRADIENT_TESTS}, "vs_clip": "ps_clip_color.asm", 540 **{name: "vs_ids.asm" for name in GRADIENT_TESTS}, "vs_clip": "ps_clip_color.asm",
541 "ps_interp_f16_high": "vs_f16_pack.asm", "ms_f16_pack": "ps_interp_f16_high.asm", 541 "ps_interp_f16_high": "vs_f16_pack.asm", "ms_f16_pack": "ps_interp_f16_high.asm",
542 "ps_interp_f32_mods": "vs_interp_consts.asm", "ps_interp_mov_mods": "vs_interp_consts.asm"} 542 "ps_interp_f32_mods": "vs_interp_consts.asm", "ps_interp_mov_mods": "vs_interp_consts.asm"}
@@ -841,7 +841,7 @@ def run_suite(a, work: str) -> int:
841 # base + soffset + imm (cs_smem_soffset_imm.asm); out[4..7] are seeds the shader leaves alone 841 # base + soffset + imm (cs_smem_soffset_imm.asm); out[4..7] are seeds the shader leaves alone
842 "cs_smem_soffset_imm": [0x5EED0024, 0x5EED0028, 0x5EED002C, 0x5EED0030, 842 "cs_smem_soffset_imm": [0x5EED0024, 0x5EED0028, 0x5EED002C, 0x5EED0030,
843 0x5EED0010, 0x5EED0014, 0x5EED0018, 0x5EED001C], 843 0x5EED0010, 0x5EED0014, 0x5EED0018, 0x5EED001C],
844 # SHADER-52: wave32 lane select & 31 (40 → 8) 844 # SHADER-52: wave32 lane select & 31 (40 → 8)
845 "cs_w32_lane_wrap": [25, 16, 777, 777], 845 "cs_w32_lane_wrap": [25, 16, 777, 777],
846 # v_movrelsd_2_b32: VGPR[D + M0[25:16]] = VGPR[S0 + M0[9:0]] (cs_movrelsd_2.asm) 846 # v_movrelsd_2_b32: VGPR[D + M0[25:16]] = VGPR[S0 + M0[9:0]] (cs_movrelsd_2.asm)
847 "cs_movrelsd_2": [11, 33, 33, 55, 1717, 77, 1515, 1717], 847 "cs_movrelsd_2": [11, 33, 33, 55, 1717, 77, 1515, 1717],
@@ -971,8 +971,8 @@ def run_suite(a, work: str) -> int:
971 results.append((name, ok, detail)) 971 results.append((name, ok, detail))
972 else: 972 else:
973 results.append((name, rc == 0 and "PASSED" in msg, msg.splitlines()[-1] if msg else "")) 973 results.append((name, rc == 0 and "PASSED" in msg, msg.splitlines()[-1] if msg else ""))
974 elif name == "ps_gather_wrap": 974 elif name in TEXTURE_CONSTANTS:
975 # SHADER-36: image_gather4_l_o under wrap/mirror/clamp/mirror-once S#s; every pixel holds GATHER_WRAP. 975 expected = TEXTURE_CONSTANTS[name]
976 tool = os.path.join(a.build, "vk_texture_test" + ext) 976 tool = os.path.join(a.build, "vk_texture_test" + ext)
977 raw = os.path.join(raw_dir, f"{name}.raw") 977 raw = os.path.join(raw_dir, f"{name}.raw")
978 try: 978 try:
@@ -984,12 +984,12 @@ def run_suite(a, work: str) -> int:
984 bad = 4096 984 bad = 4096
985 if rc == 0 and os.path.isfile(raw): 985 if rc == 0 and os.path.isfile(raw):
986 data = Path(raw).read_bytes() 986 data = Path(raw).read_bytes()
987 bad = 4096 if len(data) != 64 * 64 * 16 else sum(q != GATHER_WRAP for q in struct.iter_unpack("<4f", data)) 987 bad = 4096 if len(data) != 64 * 64 * 16 else sum(q != expected for q in struct.iter_unpack("<4f", data))
988 if rc == UNSUPPORTED: 988 if rc == UNSUPPORTED:
989 results.append((name, None, unsupported_skip(msg))) 989 results.append((name, None, unsupported_skip(msg)))
990 else: 990 else:
991 results.append((name, rc == 0 and bad == 0, "4096/4096 pixels exact" if bad == 0 else 991 results.append((name, rc == 0 and bad == 0, "4096/4096 pixels exact" if bad == 0 else
992 f"{bad} pixels differ from {GATHER_WRAP}: {msg.splitlines()[-1] if msg else ''}")) 992 f"{bad} pixels differ from {expected}: {msg.splitlines()[-1] if msg else ''}"))
993 elif name == "ps_tex": 993 elif name == "ps_tex":
994 # A texture through the descriptor hash table and the bindless set. vk_bindless_test compares the 994 # A texture through the descriptor hash table and the bindless set. vk_bindless_test compares the
995 # pixels itself, and exits 77 where the device lacks a feature the set or the shader needs. 995 # pixels itself, and exits 77 where the device lacks a feature the set or the shader needs.