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 23:49:26 +0100
committerVonsek <45567075+Vonsek@users.noreply.github.com>2026-11-22 23:49:26 +0100
commitd2e989c46e7b4a7494bb3ba3d9c77a64b1100405 (patch)
tree39142d6b31710c81b2bda80e59454d2f7645505d /scripts/run_gpu_tests.py
parente3e1eece519d2fdad710cc223060a000892d1d4e (diff)
parentaa2988cc555bad7ecd508b48a702adbb32fe7c95 (diff)
Merge main into valu-int-misc (#1492)
runtime/test/shaders/check.py scripts/run_gpu_tests.py tests/semantic/regen_fixtures.py tests/semantic/test_value_semantics.py AI-assisted.
Diffstat (limited to 'scripts/run_gpu_tests.py')
-rw-r--r--scripts/run_gpu_tests.py66
1 files changed, 51 insertions, 15 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py
index c4e14703d..dbf1fb1d0 100644
--- a/scripts/run_gpu_tests.py
+++ b/scripts/run_gpu_tests.py
@@ -25,13 +25,15 @@ sys.path.insert(0, os.path.join(ROOT, "tools"))
25import mc_command # noqa: E402 25import mc_command # noqa: E402
26sys.path.insert(0, SHADER_DIR) 26sys.path.insert(0, SHADER_DIR)
27from build import CLIP_CASES, clip_container, shader_source 27from build import CLIP_CASES, clip_container, shader_source
28from check import Skip, clip_test, fmt_1010102_test, fmt_int_narrow_test, fmt_sint32_test, fmt_xy_xyz_test, tbuffer_store_test 28from check import (Skip, clip_test, fmt_1010102_test, fmt_d16_xyz_test, fmt_int_narrow_test, fmt_sint32_test,
29 fmt_xy_xyz_test, tbuffer_store_test)
29from compute_fixture import compute_header 30from compute_fixture import compute_header
30from check import SAMPLER_CASES, sampler_test # ps_ssharp: the S#/T# mip fields (vk_sampler_test) 31from 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, CVT_PK_U8_WORDS, GRADIENT_TESTS, TEST_PROGRAMS, TEXTURE_MIP_DEPENDENCIES, 32from check import (CMPX_CLASS_WORDS, CVT_F32_SAT_CASES, CVT_PK_U8_WORDS, GRADIENT_TESTS, TEST_PROGRAMS, TEXTURE_MIP_DEPENDENCIES,
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 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) 34 pick_build_dir, start_failure, texture_gradient_a16_test, texture_mip_test)
34from check import SIGNED_MIP_TEST 35from check import SIGNED_MIP_TEST
36from check import HEAP_INIT_EXPECTED, heap_init_env # cs_heap_init: vk_compute_test's VKC_HEAP_INIT
35from check import judged_words, words_match # dump words not judged on some devices (cs_signed_zero_nan) 37from check import judged_words, words_match # dump words not judged on some devices (cs_signed_zero_nan)
36from check import TEXOFF_ARGS, texoff_problem # ps_texoff's expected words and arguments live in check.py 38from check import TEXOFF_ARGS, texoff_problem # ps_texoff's expected words and arguments live in check.py
37from check import TEXOFF_FALLBACK, texoff_env # LEONIDA_TEXOFF_FALLBACK=1: texel offsets without maintenance8 39from check import TEXOFF_FALLBACK, texoff_env # LEONIDA_TEXOFF_FALLBACK=1: texel offsets without maintenance8
@@ -40,8 +42,10 @@ from check import MESH_COMPUTE, mesh_env # LEONIDA_MESH_COMPUTE=1: mesh shader
40from check import (WAVE32_LANE_DUMPS, WAVE32_LANE_ENV, bitmask_perm_narrow_skip, narrow_subgroup_skip, 42from check import (WAVE32_LANE_DUMPS, WAVE32_LANE_ENV, bitmask_perm_narrow_skip, narrow_subgroup_skip,
41 unpinned_subgroup_skip, vcmpx_forms_narrow_skip, wave32_lane_skip) # as in check.py 43 unpinned_subgroup_skip, vcmpx_forms_narrow_skip, wave32_lane_skip) # as in check.py
42from check import PIXEL_VERTEX, VINT_ENV, interp_f16_high_problem, ij_computed_problem, mandelbrot_problem # pixel producers and checks 44from check import PIXEL_VERTEX, VINT_ENV, interp_f16_high_problem, ij_computed_problem, mandelbrot_problem # pixel producers and checks
45from check import barycentric_problem
43from check import GET_LOD_TESTS, STORE_WORDS, get_lod_test, store_words_problem # TEST-184: image atomics and queries 46from check import GET_LOD_TESTS, STORE_WORDS, get_lod_test, store_words_problem # TEST-184: image atomics and queries
44from check import wide_pixel_skip # ps_w64x_readlane: judged only where the fragment stage was required 64-wide 47from check import wide_pixel_skip # ps_w64x_readlane: judged only where the fragment stage was required 64-wide
48from check import FMA_FUSED_ENV, judge_fma_fused # cs_fma_fused: strict under LEONIDA_FMA=khr, fused/split under glsl
45 49
46 50
47def make_dxbc(chunks: list[tuple[bytes, bytes]]) -> bytes: 51def make_dxbc(chunks: list[tuple[bytes, bytes]]) -> bytes:
@@ -370,17 +374,8 @@ def frame_problem(px) -> str:
370 374
371 375
372def check_bary(raw_path: str) -> tuple[bool, str]: 376def check_bary(raw_path: str) -> tuple[bool, str]:
373 px = read_raw_rgba32f(raw_path) 377 problem = barycentric_problem(read_raw_rgba32f(raw_path), 1e-4)
374 if problem := frame_problem(px): 378 return not problem, problem or "4096/4096 pixels match"
375 return False, problem
376 bad = 0
377 first = ""
378 for i, (ax, ay, bi, bj) in enumerate(px):
379 if abs(ax * 0.5 - bi) > 1e-4 or abs(ay * 0.5 - bj) > 1e-4:
380 if not bad:
381 first = f"at ({i%64},{i//64}): attr/2=({ax*0.5:.5f},{ay*0.5:.5f}) raw=({bi:.5f},{bj:.5f})"
382 bad += 1
383 return (bad == 0), (first if bad else "4096/4096 pixels exact")
384 379
385 380
386def check_bitmask_perm(raw_path: str, msg: str = "") -> tuple[bool | None, str]: 381def check_bitmask_perm(raw_path: str, msg: str = "") -> tuple[bool | None, str]:
@@ -421,6 +416,13 @@ PIXEL_ENV = {"ps_vcc_x2": {"VKH_SGPRS": "0x1000,0,16,0", "VKH_HEAP": "0x1000=0x1
421 "0x100c=0x7fc10001,0x1010=0x40600000,0x1014=0xc0200000"}, 416 "0x100c=0x7fc10001,0x1010=0x40600000,0x1014=0xc0200000"},
422 "ps_fnan_fract": {"VKH_SGPRS": "0x1000,0,16,0", 417 "ps_fnan_fract": {"VKH_SGPRS": "0x1000,0,16,0",
423 "VKH_HEAP": "0x1000=0xaedbe6ff,0x1004=0x00008800,0x1008=0x7fc10001,0x100c=0xc0200000"}, 418 "VKH_HEAP": "0x1000=0xaedbe6ff,0x1004=0x00008800,0x1008=0x7fc10001,0x100c=0xc0200000"},
419 # f32 VOPC with a NaN, 64-bit integer VOPC: inputs from memory (derivations in the .asm headers)
420 "ps_vcmp_f32_nan": {"VKH_SGPRS": "0x1000,0,16,0",
421 "VKH_HEAP": "0x1000=0x7fc10001,0x1004=0x3f800000,0x1008=0x40000000"},
422 "ps_vcmp_64": {"VKH_SGPRS": "0x1000,0,64,0",
423 "VKH_HEAP": "0x1000=0x80000000,0x1004=0,0x1008=1,0x100c=0,0x1010=0xffffffff,"
424 "0x1014=0xffffffff,0x1018=1,0x101c=0,0x1020=1,0x1024=0,0x1028=0x80000000,"
425 "0x102c=0,0x1030=7,0x1034=5,0x1038=7,0x103c=5"},
424 # the ps_vint_* integer fixtures share one heap, h0..h7 (see their .asm headers) 426 # the ps_vint_* integer fixtures share one heap, h0..h7 (see their .asm headers)
425 "ps_vint_logic3": VINT_ENV, 427 "ps_vint_logic3": VINT_ENV,
426 "ps_vint_bits": VINT_ENV, 428 "ps_vint_bits": VINT_ENV,
@@ -885,6 +887,10 @@ def run_suite(a, work: str) -> int:
885 elif name == "cs_tbuffer_store": 887 elif name == "cs_tbuffer_store":
886 # tbuffer_store_format_*: the instruction's format, words measured natively on a Radeon 680M (the .asm header) 888 # tbuffer_store_format_*: the instruction's format, words measured natively on a Radeon 680M (the .asm header)
887 problem = tbuffer_store_test(a.build, spirv_dir, cs_env) 889 problem = tbuffer_store_test(a.build, spirv_dir, cs_env)
890 elif name == "cs_fmt_d16_xyz":
891 # d16_xyz / d16_xy typed-buffer loads and d16_xyz stores (cs_fmt_d16_xyz.asm header)
892 problem = fmt_d16_xyz_test(a.build, spirv_dir, cs_env)
893 results.append((name, not problem, problem or "80/80 dumped words exact"))
888 results.append((name, not problem, problem or "128/128 dumped words exact")) 894 results.append((name, not problem, problem or "128/128 dumped words exact"))
889 elif name == "cs_global_neg_offset": 895 elif name == "cs_global_neg_offset":
890 # Negative global_load/global_store offsets (cs_global_neg_offset.asm): 40 groups give a 0x2800-byte 896 # Negative global_load/global_store offsets (cs_global_neg_offset.asm): 40 groups give a 0x2800-byte
@@ -893,6 +899,13 @@ def run_suite(a, work: str) -> int:
893 want = [0x5EED1FFC, 0x8BAD1800, 0x5EED1FF0, 0x5EED1FF4, 0x9E, 0xFFFF8BAD, 0x57023FFC, 0xEEEEEEEE] 899 want = [0x5EED1FFC, 0x8BAD1800, 0x5EED1FF0, 0x5EED1FF4, 0x9E, 0xFFFF8BAD, 0x57023FFC, 0xEEEEEEEE]
894 ok, detail = judge_cs_dump(rc, msg, want, wave64=False, partial=False, emulated=False, hexwords=True) 900 ok, detail = judge_cs_dump(rc, msg, want, wave64=False, partial=False, emulated=False, hexwords=True)
895 results.append((name, ok, detail)) 901 results.append((name, ok, detail))
902 elif name == "cs_heap_init":
903 # vk_compute_test copies VKC_HEAP_INIT's file into the heap; the shader copies its words at 0x100 to 0.
904 rc, msg = run_cmd([vk_compute, spv, "1", "dump"], env=dict(cs_env or os.environ, **heap_init_env()))
905 words = dump_words(msg)
906 vals = words[:len(HEAP_INIT_EXPECTED)] if words else []
907 results.append((name, rc == 0 and vals == HEAP_INIT_EXPECTED,
908 " ".join(hex(x) for x in vals) if vals else msg))
896 elif name == "cs_user_sgprs": 909 elif name == "cs_user_sgprs":
897 # vk_compute_test seeds s4..s7 from VKC_SGPRS; the shader stores them back. 910 # vk_compute_test seeds s4..s7 from VKC_SGPRS; the shader stores them back.
898 rc, msg = run_cmd([vk_compute, spv, "1", "dump"], env=dict(cs_env or os.environ, **USER_SGPRS_ENV)) 911 rc, msg = run_cmd([vk_compute, spv, "1", "dump"], env=dict(cs_env or os.environ, **USER_SGPRS_ENV))
@@ -921,11 +934,23 @@ def run_suite(a, work: str) -> int:
921 n = len(CVT_F32_SAT_CASES) 934 n = len(CVT_F32_SAT_CASES)
922 results.append((name, not wrong, f"{n}/{n} inputs exact" if not wrong 935 results.append((name, not wrong, f"{n}/{n} inputs exact" if not wrong
923 else f"{len(wrong)}/{n} inputs wrong, first {wrong[0]}")) 936 else f"{len(wrong)}/{n} inputs wrong, first {wrong[0]}"))
937 elif name == "cs_fma_fused":
938 # Single-rounded f32 FMA (+ f16 round-to-odd): strict under LEONIDA_FMA=khr (OpFmaKHR, exit 77 if
939 # unsupported), fused-or-split f32 allowed under default --fma glsl (e.g. Mesa RADV splits 5/7).
940 rc, msg = run_cmd([vk_compute, spv, "1", "dump"], env=dict(cs_env or os.environ, **FMA_FUSED_ENV))
941 if rc == UNSUPPORTED:
942 results.append((name, None, unsupported_skip(msg)))
943 elif rc != 0:
944 results.append((name, False, msg))
945 else:
946 khr = os.environ.get("LEONIDA_FMA") == "khr"
947 ok, detail = judge_fma_fused(dump_words(msg), khr=khr)
948 results.append((name, ok, detail))
924 elif name == "cs_wavemask": 949 elif name == "cs_wavemask":
925 # Whole-wave mask test, as in check.py: needs a 64-wide subgroup, skipped where the device has none. 950 # Whole-wave mask test, as in check.py: needs a 64-wide subgroup, skipped where the device has none.
926 # With LEONIDA_W64_EMULATE=1 it was translated with --wave64-emulate and runs on any subgroup size. 951 # With LEONIDA_W64_EMULATE=1 it was translated with --wave64-emulate and runs on any subgroup size.
927 results.append((name,) + wavemask_check(vk_compute, spv, cs_env, w64_emulated())) 952 results.append((name,) + wavemask_check(vk_compute, spv, cs_env, w64_emulated()))
928 elif name in ("cs_store", "cs_signed_zero_nan", "cs_smem_soffset_imm", "cs_w32_lane_wrap", "cs_movrelsd_2", "cs_w32_permute", "cs_w32_sincos", "cs_exec_const", "cs_w32_mask_imm", "cs_w64_mask_imm", "cs_w32_lds_u8_d16", "cs_w32_int_ext", "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", "cs_wave64_ballot", "cs_wm_half_ops", "cs_wm_half_cmp", "cs_wm_bfm64", "cs_wm_scc_rfl", "cs_wqm_w64", "cs_wqm_w32", "cs_wqm_w64_half", 953 elif name in ("cs_store", "cs_signed_zero_nan", "cs_smem_soffset_imm", "cs_w32_lane_wrap", "cs_movrelsd_2", "cs_w32_permute", "cs_w32_sincos", "cs_exec_const", "cs_w32_mask_imm", "cs_w64_mask_imm", "cs_w32_lds_u8_d16", "cs_w32_lds_subdword", "cs_w32_lds_wide", "cs_w32_int_ext", "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", "cs_wave64_ballot", "cs_wm_half_ops", "cs_wm_half_cmp", "cs_wm_bfm64", "cs_wm_scc_rfl", "cs_wqm_w64", "cs_wqm_w32", "cs_wqm_w64_half",
929 "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", "cs_dpp_ops", "cs_dpp_bank", "cs_dpp_fi", 954 "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", "cs_dpp_ops", "cs_dpp_bank", "cs_dpp_fi",
930 "cs_dpp_bound", "cs_dpp_w64", 955 "cs_dpp_bound", "cs_dpp_w64",
931 "cs_w64_mask_detect", 956 "cs_w64_mask_detect",
@@ -934,7 +959,7 @@ def run_suite(a, work: str) -> int:
934 "cs_w64x_lds_war", "cs_w64x_partial", "cs_w64x_sbarrier", "cs_w64x_load_ballot_load", 959 "cs_w64x_lds_war", "cs_w64x_partial", "cs_w64x_sbarrier", "cs_w64x_load_ballot_load",
935 "cs_w64x_mask_reuse", "cs_w64x_mask_reuse2", "cs_w64x_chain_barrier", "cs_barrier_divergent", 960 "cs_w64x_mask_reuse", "cs_w64x_mask_reuse2", "cs_w64x_chain_barrier", "cs_barrier_divergent",
936 "cs_bpermute32", "cs_w64x_partial_scmp", "cs_w32_partial_scmp", "cs_barrier_early_end", 961 "cs_bpermute32", "cs_w64x_partial_scmp", "cs_w32_partial_scmp", "cs_barrier_early_end",
937 "cs_barrier_loop", "cs_w64x_andn2_exec", "cs_w64x_saveexec_b64", "cs_lds_b64_cmpst", 962 "cs_barrier_loop", "cs_w64x_andn2_exec", "cs_w64x_saveexec_b64", "cs_lds_b64_cmpst", "cs_w32_andn2_exec",
938 "cs_mask_vgpr_exec"): 963 "cs_mask_vgpr_exec"):
939 cs_dump_wants = { 964 cs_dump_wants = {
940 "cs_store": [0x400080FF, 0xE00003FF, 0x3C004000, 0xEEEEEEEE, 0x40003C00, 0xBC003800, 0x40FF8000, 0x3FF00000], 965 "cs_store": [0x400080FF, 0xE00003FF, 0x3C004000, 0xEEEEEEEE, 0x40003C00, 0xBC003800, 0x40FF8000, 0x3FF00000],
@@ -957,6 +982,9 @@ def run_suite(a, work: str) -> int:
957 "cs_w32_salu64": [0x1E6A2C48, 0x1234, 0xFFFFFFFF, 0x100, 47, 48, 0xFFFF8000, 0xFFFFFFFE], 982 "cs_w32_salu64": [0x1E6A2C48, 0x1234, 0xFFFFFFFF, 0x100, 47, 48, 0xFFFF8000, 0xFFFFFFFE],
958 # SHADER-85: ds_read_u8/i8_d16[_hi] (cs_w32_lds_u8_d16.asm header) 983 # SHADER-85: ds_read_u8/i8_d16[_hi] (cs_w32_lds_u8_d16.asm header)
959 "cs_w32_lds_u8_d16": [0xBEEF00FF, 0x00FF1234, 0xBEEFFF80, 0xFF801234, 0xBEEF007F, 0x007F1234, 0xBEEF0080, 0xFFFF1234], 984 "cs_w32_lds_u8_d16": [0xBEEF00FF, 0x00FF1234, 0xBEEFFF80, 0xFF801234, 0xBEEF007F, 0x007F1234, 0xBEEF0080, 0xFFFF1234],
985 # 8/16-bit and 64/96/128-bit LDS accesses (cs_w32_lds_subdword.asm / cs_w32_lds_wide.asm headers)
986 "cs_w32_lds_subdword": [0x11B2D444, 0xA1B2C3D4, 0xFFFFFFB2, 0x000000B2, 0x00000011, 0xFFFFA1B2, 0x0000A1B2, 0xFFFFC3D4],
987 "cs_w32_lds_wide": [0xCAFEF00D, 0xFEEDFACE, 0x600DD00D, 0x00000000, 0x8BADF00D, 0xDEADC0DE, 0x12345678, 0x9ABCDEF0],
960 # ds_cmpst_b32 and the b64 2-address forms (cs_lds_b64_cmpst.asm header) 988 # ds_cmpst_b32 and the b64 2-address forms (cs_lds_b64_cmpst.asm header)
961 "cs_lds_b64_cmpst": [0x11110001, 0x22220002, 0x33330003, 0x44440004, 989 "cs_lds_b64_cmpst": [0x11110001, 0x22220002, 0x33330003, 0x44440004,
962 0xCCCC000C, 0x44440004, 0xBBBB000B, 0x3579BADC], 990 0xCCCC000C, 0x44440004, 0xBBBB000B, 0x3579BADC],
@@ -1003,6 +1031,7 @@ def run_suite(a, work: str) -> int:
1003 "cs_w64x_partial": [40, 40, 528, 0, 0, 532, 539, 524820], 1031 "cs_w64x_partial": [40, 40, 528, 0, 0, 532, 539, 524820],
1004 "cs_w64x_partial_scmp": [0, 1, 0, 1, 1, 1, 1, 0], # s_cmp mask, -1 in a partial wave 1032 "cs_w64x_partial_scmp": [0, 1, 0, 1, 1, 1, 1, 0], # s_cmp mask, -1 in a partial wave
1005 "cs_w32_partial_scmp": [0, 1, 1, 0, 1, 1, 1, 1], # the same in a 20-thread wave32 1033 "cs_w32_partial_scmp": [0, 1, 1, 0, 1, 1, 1, 1], # the same in a 20-thread wave32
1034 "cs_w32_andn2_exec": [1, 8, 16, 2064, 2068, 3, 20, 1544], # s_andn2_saveexec/wrexec_b32 (.asm header)
1006 "cs_w32_sincos": [1, 1, 1, 1, 1, 1], # SHADER-88 (cs_w32_sincos.asm): angles in turns 1035 "cs_w32_sincos": [1, 1, 1, 1, 1, 1], # SHADER-88 (cs_w32_sincos.asm): angles in turns
1007 "cs_w64x_sbarrier": [605, 605, 686, 686, 3032, 3013, 3032, 3031], 1036 "cs_w64x_sbarrier": [605, 605, 686, 686, 3032, 3013, 3032, 3031],
1008 "cs_w64x_load_ballot_load": [43, 74, 75, 42, 42, 18, 41, 32], 1037 "cs_w64x_load_ballot_load": [43, 74, 75, 42, 42, 18, 41, 32],
@@ -1034,10 +1063,11 @@ def run_suite(a, work: str) -> int:
1034 wave64 = name not in ("cs_store", "cs_signed_zero_nan", "cs_smem_soffset_imm", "cs_wqm_w32", "cs_w32_lane_wrap", "cs_movrelsd_2", 1063 wave64 = name not in ("cs_store", "cs_signed_zero_nan", "cs_smem_soffset_imm", "cs_wqm_w32", "cs_w32_lane_wrap", "cs_movrelsd_2",
1035 "cs_w32_permute", "cs_barrier_divergent", "cs_barrier_early_end", "cs_barrier_loop", 1064 "cs_w32_permute", "cs_barrier_divergent", "cs_barrier_early_end", "cs_barrier_loop",
1036 "cs_w32_lds_u8_d16", "cs_w32_int_ext", "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", 1065 "cs_w32_lds_u8_d16", "cs_w32_int_ext", "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops",
1066 "cs_w32_lds_subdword", "cs_w32_lds_wide",
1037 "cs_bpermute32", "cs_w32_partial_scmp", "cs_w32_sincos", 1067 "cs_bpermute32", "cs_w32_partial_scmp", "cs_w32_sincos",
1038 "cs_lds_b64_cmpst", "cs_exec_const", "cs_w32_mask_imm", "cs_mask_vgpr_exec", 1068 "cs_lds_b64_cmpst", "cs_exec_const", "cs_w32_mask_imm", "cs_mask_vgpr_exec",
1039 "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", 1069 "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8",
1040 "cs_dpp_ops", "cs_dpp_bound", "cs_dpp_bank", "cs_dpp_fi") and not emulated and not partial 1070 "cs_dpp_ops", "cs_dpp_bound", "cs_dpp_bank", "cs_dpp_fi", "cs_w32_andn2_exec") and not emulated and not partial
1041 if partial and not emulated: 1071 if partial and not emulated:
1042 cs_env = dict(os.environ, VKC_SUBGROUP_SIZE="64") 1072 cs_env = dict(os.environ, VKC_SUBGROUP_SIZE="64")
1043 if name in WAVE32_LANE_DUMPS: # 32 lanes even without index.json, as check.py requests (#774) 1073 if name in WAVE32_LANE_DUMPS: # 32 lanes even without index.json, as check.py requests (#774)
@@ -1054,6 +1084,7 @@ def run_suite(a, work: str) -> int:
1054 want = judged_words(name, msg, want) # cs_signed_zero_nan on Apple and llvmpipe (check.py) 1084 want = judged_words(name, msg, want) # cs_signed_zero_nan on Apple and llvmpipe (check.py)
1055 ok, detail = judge_cs_dump(rc, msg, want, wave64=wave64, partial=partial, emulated=emulated, 1085 ok, detail = judge_cs_dump(rc, msg, want, wave64=wave64, partial=partial, emulated=emulated,
1056 hexwords=name in ("cs_store", "cs_smem_soffset_imm", "cs_w32_lds_u8_d16", 1086 hexwords=name in ("cs_store", "cs_smem_soffset_imm", "cs_w32_lds_u8_d16",
1087 "cs_w32_lds_subdword", "cs_w32_lds_wide",
1057 "cs_lds_b64_cmpst", "cs_signed_zero_nan")) 1088 "cs_lds_b64_cmpst", "cs_signed_zero_nan"))
1058 if ok and None in want: 1089 if ok and None in want:
1059 unjudged = ", ".join(str(i) for i, w in enumerate(want) if w is None) 1090 unjudged = ", ".join(str(i) for i, w in enumerate(want) if w is None)
@@ -1172,6 +1203,8 @@ def run_suite(a, work: str) -> int:
1172 "ps_sdwa": (0x000000F1, 0xBFFEFFF2, 0x3C003344, 0xBFF70000), 1203 "ps_sdwa": (0x000000F1, 0xBFFEFFF2, 0x3C003344, 0xBFF70000),
1173 "ps_sdwa_dword_hi": (0x00004000, 0x00000003, 0x00004700, 0x0000C000), # 16-bit SDWA, dst_sel:DWORD 1204 "ps_sdwa_dword_hi": (0x00004000, 0x00000003, 0x00004700, 0x0000C000), # 16-bit SDWA, dst_sel:DWORD
1174 "ps_legacy_mul": (0, 0, 0, 0x40C00000), # same expectation as check.py 1205 "ps_legacy_mul": (0, 0, 0, 0x40C00000), # same expectation as check.py
1206 "ps_mul_legacy_denorm": (0, 0, 0, 0x80000000), # mode0 input FTZ + DX9 +0 override; output FTZ keeps sign
1207 "ps_mul_legacy_denorm_mods": (0, 0, 0, 0x40400000), # product FTZ before omod; omod -0 -> +0
1175 "ps_ops5": (0x12340010, 0xBEEF0800, 0xAAAAFFFF, 0xDEADBC00), # from the .asm headers 1208 "ps_ops5": (0x12340010, 0xBEEF0800, 0xAAAAFFFF, 0xDEADBC00), # from the .asm headers
1176 "ps_ops6": (0xF800FFFF, 0x01000010, 0x00800800, 0x8000FFF0), 1209 "ps_ops6": (0xF800FFFF, 0x01000010, 0x00800800, 0x8000FFF0),
1177 "ps_ops7": (0x00FF8077, 0xFF0000FF, 0x89ABCDEF, 0x00070003), 1210 "ps_ops7": (0x00FF8077, 0xFF0000FF, 0x89ABCDEF, 0x00070003),
@@ -1185,6 +1218,7 @@ def run_suite(a, work: str) -> int:
1185 "ps_scc_logic64": (0x0fff0fff, 0xff000000, 0xff0000ff, 0x16), 1218 "ps_scc_logic64": (0x0fff0fff, 0xff000000, 0xff0000ff, 0x16),
1186 "ps_fma_literal": (0x41B80000, 0x41800000, 0x40E00000, 0x41A40000), 1219 "ps_fma_literal": (0x41B80000, 0x41800000, 0x40E00000, 0x41A40000),
1187 "ps_f64_mods": (0x40040000, 0x3FF00000, 0x3FE40000, 0x3FF00000), # needs shaderFloat64 1220 "ps_f64_mods": (0x40040000, 0x3FF00000, 0x3FE40000, 0x3FF00000), # needs shaderFloat64
1221 "ps_f64_round": (0xC12AF665, 0x3FE7FFFF, 0xBFFFFFFF, 0xC12AF666), # needs shaderFloat64
1188 "ps_outmods_f16": (0xAAAA3C00, 0xAAAA3E00, 0x7C000000, 0x3C000000), 1222 "ps_outmods_f16": (0xAAAA3C00, 0xAAAA3E00, 0x7C000000, 0x3C000000),
1189 # f16 op_sel / partial writes / inline constants: RDNA2 hardware words (see the .asm headers) 1223 # f16 op_sel / partial writes / inline constants: RDNA2 hardware words (see the .asm headers)
1190 "ps_f16_med3_opsel": (0xAAAA4100, 0xAAAA4200, 0xAAAA3E00, 0x40005555), 1224 "ps_f16_med3_opsel": (0xAAAA4100, 0xAAAA4200, 0xAAAA3E00, 0x40005555),
@@ -1215,6 +1249,8 @@ def run_suite(a, work: str) -> int:
1215 # v_mad_u32_u16 / v_mad_i32_i16 and v_subrev_f16, which had CPU checks only (.asm headers) 1249 # v_mad_u32_u16 / v_mad_i32_i16 and v_subrev_f16, which had CPU checks only (.asm headers)
1216 "ps_valu16_mad": (0x00000002, 0x00030002, 0x00008000, 0x00000004), 1250 "ps_valu16_mad": (0x00000002, 0x00030002, 0x00008000, 0x00000004),
1217 "ps_valu16_subrev": (0xAAAABC00, 0xAAAAC000, 0xAAAA3C00, 0x42003800), 1251 "ps_valu16_subrev": (0xAAAABC00, 0xAAAAC000, 0xAAAA3C00, 0x42003800),
1252 "ps_vcmp_f32_nan": (0x0000376C, 0x0000FD5B, 0x0000D36C, 0x00000FE7), # from the .asm headers
1253 "ps_vcmp_64": (0x0000B3C4, 0x000091E6, 0x00006787, 0x00007C93),
1218 # 32-bit integer VALU ops on VINT_ENV's heap (derivations in the .asm headers) 1254 # 32-bit integer VALU ops on VINT_ENV's heap (derivations in the .asm headers)
1219 "ps_vint_logic3": (0xFFFFFFFE, 0xBBB05070, 0x1D3B5977, 0x123F5F7E), 1255 "ps_vint_logic3": (0xFFFFFFFE, 0xBBB05070, 0x1D3B5977, 0x123F5F7E),
1220 "ps_vint_bits": (0xFFFFFFFE, 0x40000000, 0x1E6A2C48, 0x000001D5), 1256 "ps_vint_bits": (0xFFFFFFFE, 0x40000000, 0x1E6A2C48, 0x000001D5),