diff options
| author | lines9686-rgb <282495677+lines9686-rgb@users.noreply.github.com> | 2026-11-23 01:17:02 +0300 |
|---|---|---|
| committer | lines9686-rgb <282495677+lines9686-rgb@users.noreply.github.com> | 2026-11-23 01:17:02 +0300 |
| commit | 5dbfab6bd3deccf5e8edd6ab35ae30446eca44ed (patch) | |
| tree | 5a6101725fcba261d46d25de2c804f06642ffbe0 /scripts/run_gpu_tests.py | |
| parent | 14acb49902d06ad23ce58b6e8dc40c19fa3e68fd (diff) | |
| parent | aa2988cc555bad7ecd508b48a702adbb32fe7c95 (diff) | |
Merge main into test-windows-nonascii
test_report_paths' macOS normcase fix landed on main as f7c7d57b; take main's
version of the file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'scripts/run_gpu_tests.py')
| -rw-r--r-- | scripts/run_gpu_tests.py | 68 |
1 files changed, 52 insertions, 16 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py index 7cd0e9dbf..94de20f26 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")) | |||
| 25 | import mc_command # noqa: E402 | 25 | import mc_command # noqa: E402 |
| 26 | sys.path.insert(0, SHADER_DIR) | 26 | sys.path.insert(0, SHADER_DIR) |
| 27 | from build import CLIP_CASES, clip_container, shader_source | 27 | from build import CLIP_CASES, clip_container, shader_source |
| 28 | from check import Skip, clip_test, fmt_1010102_test, fmt_int_narrow_test, fmt_sint32_test, fmt_xy_xyz_test, tbuffer_store_test | 28 | from 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) | ||
| 29 | from compute_fixture import compute_header | 30 | from compute_fixture import compute_header |
| 30 | from check import SAMPLER_CASES, sampler_test # ps_ssharp: the S#/T# mip fields (vk_sampler_test) | 31 | from check import SAMPLER_CASES, sampler_test # ps_ssharp: the S#/T# mip fields (vk_sampler_test) |
| 31 | from check import (CMPX_CLASS_WORDS, CVT_F32_SAT_CASES, CVT_PK_U8_WORDS, GRADIENT_TESTS, TEST_PROGRAMS, TEXTURE_MIP_DEPENDENCIES, | 32 | from 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) |
| 34 | from check import SIGNED_MIP_TEST | 35 | from check import SIGNED_MIP_TEST |
| 36 | from check import HEAP_INIT_EXPECTED, heap_init_env # cs_heap_init: vk_compute_test's VKC_HEAP_INIT | ||
| 35 | from check import judged_words, words_match # dump words not judged on some devices (cs_signed_zero_nan) | 37 | from check import judged_words, words_match # dump words not judged on some devices (cs_signed_zero_nan) |
| 36 | from check import TEXOFF_ARGS, texoff_problem # ps_texoff's expected words and arguments live in check.py | 38 | from check import TEXOFF_ARGS, texoff_problem # ps_texoff's expected words and arguments live in check.py |
| 37 | from check import TEXOFF_FALLBACK, texoff_env # LEONIDA_TEXOFF_FALLBACK=1: texel offsets without maintenance8 | 39 | from 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 | |||
| 40 | from check import (WAVE32_LANE_DUMPS, WAVE32_LANE_ENV, bitmask_perm_narrow_skip, narrow_subgroup_skip, | 42 | from 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 |
| 42 | from check import PIXEL_VERTEX, interp_f16_high_problem, ij_computed_problem, mandelbrot_problem # pixel producers and checks | 44 | from check import PIXEL_VERTEX, interp_f16_high_problem, ij_computed_problem, mandelbrot_problem # pixel producers and checks |
| 45 | from check import barycentric_problem | ||
| 43 | from check import GET_LOD_TESTS, STORE_WORDS, get_lod_test, store_words_problem # TEST-184: image atomics and queries | 46 | from check import GET_LOD_TESTS, STORE_WORDS, get_lod_test, store_words_problem # TEST-184: image atomics and queries |
| 44 | from check import wide_pixel_skip # ps_w64x_readlane: judged only where the fragment stage was required 64-wide | 47 | from check import wide_pixel_skip # ps_w64x_readlane: judged only where the fragment stage was required 64-wide |
| 48 | from check import FMA_FUSED_ENV, judge_fma_fused # cs_fma_fused: strict under LEONIDA_FMA=khr, fused/split under glsl | ||
| 45 | 49 | ||
| 46 | 50 | ||
| 47 | def make_dxbc(chunks: list[tuple[bytes, bytes]]) -> bytes: | 51 | def make_dxbc(chunks: list[tuple[bytes, bytes]]) -> bytes: |
| @@ -370,17 +374,8 @@ def frame_problem(px) -> str: | |||
| 370 | 374 | ||
| 371 | 375 | ||
| 372 | def check_bary(raw_path: str) -> tuple[bool, str]: | 376 | def 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 | ||
| 386 | def check_bitmask_perm(raw_path: str, msg: str = "") -> tuple[bool | None, str]: | 381 | def check_bitmask_perm(raw_path: str, msg: str = "") -> tuple[bool | None, str]: |
| @@ -420,7 +415,14 @@ PIXEL_ENV = {"ps_vcc_x2": {"VKH_SGPRS": "0x1000,0,16,0", "VKH_HEAP": "0x1000=0x1 | |||
| 420 | "VKH_HEAP": "0x1000=0x7fc10001,0x1004=0x40e00000,0x1008=0x40a00000," | 415 | "VKH_HEAP": "0x1000=0x7fc10001,0x1004=0x40e00000,0x1008=0x40a00000," |
| 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 | 426 | ||
| 425 | 427 | ||
| 426 | def check_flat(raw_path: str) -> tuple[bool, str]: | 428 | def check_flat(raw_path: str) -> tuple[bool, str]: |
| @@ -879,6 +881,10 @@ def run_suite(a, work: str) -> int: | |||
| 879 | elif name == "cs_tbuffer_store": | 881 | elif name == "cs_tbuffer_store": |
| 880 | # tbuffer_store_format_*: the instruction's format, words measured natively on a Radeon 680M (the .asm header) | 882 | # tbuffer_store_format_*: the instruction's format, words measured natively on a Radeon 680M (the .asm header) |
| 881 | problem = tbuffer_store_test(a.build, spirv_dir, cs_env) | 883 | problem = tbuffer_store_test(a.build, spirv_dir, cs_env) |
| 884 | elif name == "cs_fmt_d16_xyz": | ||
| 885 | # d16_xyz / d16_xy typed-buffer loads and d16_xyz stores (cs_fmt_d16_xyz.asm header) | ||
| 886 | problem = fmt_d16_xyz_test(a.build, spirv_dir, cs_env) | ||
| 887 | results.append((name, not problem, problem or "80/80 dumped words exact")) | ||
| 882 | results.append((name, not problem, problem or "128/128 dumped words exact")) | 888 | results.append((name, not problem, problem or "128/128 dumped words exact")) |
| 883 | elif name == "cs_global_neg_offset": | 889 | elif name == "cs_global_neg_offset": |
| 884 | # Negative global_load/global_store offsets (cs_global_neg_offset.asm): 40 groups give a 0x2800-byte | 890 | # Negative global_load/global_store offsets (cs_global_neg_offset.asm): 40 groups give a 0x2800-byte |
| @@ -887,6 +893,13 @@ def run_suite(a, work: str) -> int: | |||
| 887 | want = [0x5EED1FFC, 0x8BAD1800, 0x5EED1FF0, 0x5EED1FF4, 0x9E, 0xFFFF8BAD, 0x57023FFC, 0xEEEEEEEE] | 893 | want = [0x5EED1FFC, 0x8BAD1800, 0x5EED1FF0, 0x5EED1FF4, 0x9E, 0xFFFF8BAD, 0x57023FFC, 0xEEEEEEEE] |
| 888 | ok, detail = judge_cs_dump(rc, msg, want, wave64=False, partial=False, emulated=False, hexwords=True) | 894 | ok, detail = judge_cs_dump(rc, msg, want, wave64=False, partial=False, emulated=False, hexwords=True) |
| 889 | results.append((name, ok, detail)) | 895 | results.append((name, ok, detail)) |
| 896 | elif name == "cs_heap_init": | ||
| 897 | # vk_compute_test copies VKC_HEAP_INIT's file into the heap; the shader copies its words at 0x100 to 0. | ||
| 898 | rc, msg = run_cmd([vk_compute, spv, "1", "dump"], env=dict(cs_env or os.environ, **heap_init_env())) | ||
| 899 | words = dump_words(msg) | ||
| 900 | vals = words[:len(HEAP_INIT_EXPECTED)] if words else [] | ||
| 901 | results.append((name, rc == 0 and vals == HEAP_INIT_EXPECTED, | ||
| 902 | " ".join(hex(x) for x in vals) if vals else msg)) | ||
| 890 | elif name == "cs_user_sgprs": | 903 | elif name == "cs_user_sgprs": |
| 891 | # vk_compute_test seeds s4..s7 from VKC_SGPRS; the shader stores them back. | 904 | # vk_compute_test seeds s4..s7 from VKC_SGPRS; the shader stores them back. |
| 892 | rc, msg = run_cmd([vk_compute, spv, "1", "dump"], env=dict(cs_env or os.environ, **USER_SGPRS_ENV)) | 905 | rc, msg = run_cmd([vk_compute, spv, "1", "dump"], env=dict(cs_env or os.environ, **USER_SGPRS_ENV)) |
| @@ -915,11 +928,23 @@ def run_suite(a, work: str) -> int: | |||
| 915 | n = len(CVT_F32_SAT_CASES) | 928 | n = len(CVT_F32_SAT_CASES) |
| 916 | results.append((name, not wrong, f"{n}/{n} inputs exact" if not wrong | 929 | results.append((name, not wrong, f"{n}/{n} inputs exact" if not wrong |
| 917 | else f"{len(wrong)}/{n} inputs wrong, first {wrong[0]}")) | 930 | else f"{len(wrong)}/{n} inputs wrong, first {wrong[0]}")) |
| 931 | elif name == "cs_fma_fused": | ||
| 932 | # Single-rounded f32 FMA (+ f16 round-to-odd): strict under LEONIDA_FMA=khr (OpFmaKHR, exit 77 if | ||
| 933 | # unsupported), fused-or-split f32 allowed under default --fma glsl (e.g. Mesa RADV splits 5/7). | ||
| 934 | rc, msg = run_cmd([vk_compute, spv, "1", "dump"], env=dict(cs_env or os.environ, **FMA_FUSED_ENV)) | ||
| 935 | if rc == UNSUPPORTED: | ||
| 936 | results.append((name, None, unsupported_skip(msg))) | ||
| 937 | elif rc != 0: | ||
| 938 | results.append((name, False, msg)) | ||
| 939 | else: | ||
| 940 | khr = os.environ.get("LEONIDA_FMA") == "khr" | ||
| 941 | ok, detail = judge_fma_fused(dump_words(msg), khr=khr) | ||
| 942 | results.append((name, ok, detail)) | ||
| 918 | elif name == "cs_wavemask": | 943 | elif name == "cs_wavemask": |
| 919 | # Whole-wave mask test, as in check.py: needs a 64-wide subgroup, skipped where the device has none. | 944 | # Whole-wave mask test, as in check.py: needs a 64-wide subgroup, skipped where the device has none. |
| 920 | # With LEONIDA_W64_EMULATE=1 it was translated with --wave64-emulate and runs on any subgroup size. | 945 | # With LEONIDA_W64_EMULATE=1 it was translated with --wave64-emulate and runs on any subgroup size. |
| 921 | results.append((name,) + wavemask_check(vk_compute, spv, cs_env, w64_emulated())) | 946 | results.append((name,) + wavemask_check(vk_compute, spv, cs_env, w64_emulated())) |
| 922 | 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", | 947 | 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", |
| 923 | "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", "cs_dpp_ops", "cs_dpp_bank", "cs_dpp_fi", | 948 | "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", "cs_dpp_ops", "cs_dpp_bank", "cs_dpp_fi", |
| 924 | "cs_dpp_bound", "cs_dpp_w64", | 949 | "cs_dpp_bound", "cs_dpp_w64", |
| 925 | "cs_w64_mask_detect", | 950 | "cs_w64_mask_detect", |
| @@ -928,7 +953,7 @@ def run_suite(a, work: str) -> int: | |||
| 928 | "cs_w64x_lds_war", "cs_w64x_partial", "cs_w64x_sbarrier", "cs_w64x_load_ballot_load", | 953 | "cs_w64x_lds_war", "cs_w64x_partial", "cs_w64x_sbarrier", "cs_w64x_load_ballot_load", |
| 929 | "cs_w64x_mask_reuse", "cs_w64x_mask_reuse2", "cs_w64x_chain_barrier", "cs_barrier_divergent", | 954 | "cs_w64x_mask_reuse", "cs_w64x_mask_reuse2", "cs_w64x_chain_barrier", "cs_barrier_divergent", |
| 930 | "cs_bpermute32", "cs_w64x_partial_scmp", "cs_w32_partial_scmp", "cs_barrier_early_end", | 955 | "cs_bpermute32", "cs_w64x_partial_scmp", "cs_w32_partial_scmp", "cs_barrier_early_end", |
| 931 | "cs_barrier_loop", "cs_w64x_andn2_exec", "cs_w64x_saveexec_b64", "cs_lds_b64_cmpst", | 956 | "cs_barrier_loop", "cs_w64x_andn2_exec", "cs_w64x_saveexec_b64", "cs_lds_b64_cmpst", "cs_w32_andn2_exec", |
| 932 | "cs_mask_vgpr_exec"): | 957 | "cs_mask_vgpr_exec"): |
| 933 | cs_dump_wants = { | 958 | cs_dump_wants = { |
| 934 | "cs_store": [0x400080FF, 0xE00003FF, 0x3C004000, 0xEEEEEEEE, 0x40003C00, 0xBC003800, 0x40FF8000, 0x3FF00000], | 959 | "cs_store": [0x400080FF, 0xE00003FF, 0x3C004000, 0xEEEEEEEE, 0x40003C00, 0xBC003800, 0x40FF8000, 0x3FF00000], |
| @@ -951,6 +976,9 @@ def run_suite(a, work: str) -> int: | |||
| 951 | "cs_w32_salu64": [0x1E6A2C48, 0x1234, 0xFFFFFFFF, 0x100, 47, 48, 0xFFFF8000, 0xFFFFFFFE], | 976 | "cs_w32_salu64": [0x1E6A2C48, 0x1234, 0xFFFFFFFF, 0x100, 47, 48, 0xFFFF8000, 0xFFFFFFFE], |
| 952 | # SHADER-85: ds_read_u8/i8_d16[_hi] (cs_w32_lds_u8_d16.asm header) | 977 | # SHADER-85: ds_read_u8/i8_d16[_hi] (cs_w32_lds_u8_d16.asm header) |
| 953 | "cs_w32_lds_u8_d16": [0xBEEF00FF, 0x00FF1234, 0xBEEFFF80, 0xFF801234, 0xBEEF007F, 0x007F1234, 0xBEEF0080, 0xFFFF1234], | 978 | "cs_w32_lds_u8_d16": [0xBEEF00FF, 0x00FF1234, 0xBEEFFF80, 0xFF801234, 0xBEEF007F, 0x007F1234, 0xBEEF0080, 0xFFFF1234], |
| 979 | # 8/16-bit and 64/96/128-bit LDS accesses (cs_w32_lds_subdword.asm / cs_w32_lds_wide.asm headers) | ||
| 980 | "cs_w32_lds_subdword": [0x11B2D444, 0xA1B2C3D4, 0xFFFFFFB2, 0x000000B2, 0x00000011, 0xFFFFA1B2, 0x0000A1B2, 0xFFFFC3D4], | ||
| 981 | "cs_w32_lds_wide": [0xCAFEF00D, 0xFEEDFACE, 0x600DD00D, 0x00000000, 0x8BADF00D, 0xDEADC0DE, 0x12345678, 0x9ABCDEF0], | ||
| 954 | # ds_cmpst_b32 and the b64 2-address forms (cs_lds_b64_cmpst.asm header) | 982 | # ds_cmpst_b32 and the b64 2-address forms (cs_lds_b64_cmpst.asm header) |
| 955 | "cs_lds_b64_cmpst": [0x11110001, 0x22220002, 0x33330003, 0x44440004, | 983 | "cs_lds_b64_cmpst": [0x11110001, 0x22220002, 0x33330003, 0x44440004, |
| 956 | 0xCCCC000C, 0x44440004, 0xBBBB000B, 0x3579BADC], | 984 | 0xCCCC000C, 0x44440004, 0xBBBB000B, 0x3579BADC], |
| @@ -997,6 +1025,7 @@ def run_suite(a, work: str) -> int: | |||
| 997 | "cs_w64x_partial": [40, 40, 528, 0, 0, 532, 539, 524820], | 1025 | "cs_w64x_partial": [40, 40, 528, 0, 0, 532, 539, 524820], |
| 998 | "cs_w64x_partial_scmp": [0, 1, 0, 1, 1, 1, 1, 0], # s_cmp mask, -1 in a partial wave | 1026 | "cs_w64x_partial_scmp": [0, 1, 0, 1, 1, 1, 1, 0], # s_cmp mask, -1 in a partial wave |
| 999 | "cs_w32_partial_scmp": [0, 1, 1, 0, 1, 1, 1, 1], # the same in a 20-thread wave32 | 1027 | "cs_w32_partial_scmp": [0, 1, 1, 0, 1, 1, 1, 1], # the same in a 20-thread wave32 |
| 1028 | "cs_w32_andn2_exec": [1, 8, 16, 2064, 2068, 3, 20, 1544], # s_andn2_saveexec/wrexec_b32 (.asm header) | ||
| 1000 | "cs_w32_sincos": [1, 1, 1, 1, 1, 1], # SHADER-88 (cs_w32_sincos.asm): angles in turns | 1029 | "cs_w32_sincos": [1, 1, 1, 1, 1, 1], # SHADER-88 (cs_w32_sincos.asm): angles in turns |
| 1001 | "cs_w64x_sbarrier": [605, 605, 686, 686, 3032, 3013, 3032, 3031], | 1030 | "cs_w64x_sbarrier": [605, 605, 686, 686, 3032, 3013, 3032, 3031], |
| 1002 | "cs_w64x_load_ballot_load": [43, 74, 75, 42, 42, 18, 41, 32], | 1031 | "cs_w64x_load_ballot_load": [43, 74, 75, 42, 42, 18, 41, 32], |
| @@ -1028,10 +1057,11 @@ def run_suite(a, work: str) -> int: | |||
| 1028 | wave64 = name not in ("cs_store", "cs_signed_zero_nan", "cs_smem_soffset_imm", "cs_wqm_w32", "cs_w32_lane_wrap", "cs_movrelsd_2", | 1057 | wave64 = name not in ("cs_store", "cs_signed_zero_nan", "cs_smem_soffset_imm", "cs_wqm_w32", "cs_w32_lane_wrap", "cs_movrelsd_2", |
| 1029 | "cs_w32_permute", "cs_barrier_divergent", "cs_barrier_early_end", "cs_barrier_loop", | 1058 | "cs_w32_permute", "cs_barrier_divergent", "cs_barrier_early_end", "cs_barrier_loop", |
| 1030 | "cs_w32_lds_u8_d16", "cs_w32_int_ext", "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", | 1059 | "cs_w32_lds_u8_d16", "cs_w32_int_ext", "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", |
| 1060 | "cs_w32_lds_subdword", "cs_w32_lds_wide", | ||
| 1031 | "cs_bpermute32", "cs_w32_partial_scmp", "cs_w32_sincos", | 1061 | "cs_bpermute32", "cs_w32_partial_scmp", "cs_w32_sincos", |
| 1032 | "cs_lds_b64_cmpst", "cs_exec_const", "cs_w32_mask_imm", "cs_mask_vgpr_exec", | 1062 | "cs_lds_b64_cmpst", "cs_exec_const", "cs_w32_mask_imm", "cs_mask_vgpr_exec", |
| 1033 | "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", | 1063 | "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", |
| 1034 | "cs_dpp_ops", "cs_dpp_bound", "cs_dpp_bank", "cs_dpp_fi") and not emulated and not partial | 1064 | "cs_dpp_ops", "cs_dpp_bound", "cs_dpp_bank", "cs_dpp_fi", "cs_w32_andn2_exec") and not emulated and not partial |
| 1035 | if partial and not emulated: | 1065 | if partial and not emulated: |
| 1036 | cs_env = dict(os.environ, VKC_SUBGROUP_SIZE="64") | 1066 | cs_env = dict(os.environ, VKC_SUBGROUP_SIZE="64") |
| 1037 | if name in WAVE32_LANE_DUMPS: # 32 lanes even without index.json, as check.py requests (#774) | 1067 | if name in WAVE32_LANE_DUMPS: # 32 lanes even without index.json, as check.py requests (#774) |
| @@ -1048,6 +1078,7 @@ def run_suite(a, work: str) -> int: | |||
| 1048 | want = judged_words(name, msg, want) # cs_signed_zero_nan on Apple and llvmpipe (check.py) | 1078 | want = judged_words(name, msg, want) # cs_signed_zero_nan on Apple and llvmpipe (check.py) |
| 1049 | ok, detail = judge_cs_dump(rc, msg, want, wave64=wave64, partial=partial, emulated=emulated, | 1079 | ok, detail = judge_cs_dump(rc, msg, want, wave64=wave64, partial=partial, emulated=emulated, |
| 1050 | hexwords=name in ("cs_store", "cs_smem_soffset_imm", "cs_w32_lds_u8_d16", | 1080 | hexwords=name in ("cs_store", "cs_smem_soffset_imm", "cs_w32_lds_u8_d16", |
| 1081 | "cs_w32_lds_subdword", "cs_w32_lds_wide", | ||
| 1051 | "cs_lds_b64_cmpst", "cs_signed_zero_nan")) | 1082 | "cs_lds_b64_cmpst", "cs_signed_zero_nan")) |
| 1052 | if ok and None in want: | 1083 | if ok and None in want: |
| 1053 | unjudged = ", ".join(str(i) for i, w in enumerate(want) if w is None) | 1084 | unjudged = ", ".join(str(i) for i, w in enumerate(want) if w is None) |
| @@ -1166,6 +1197,8 @@ def run_suite(a, work: str) -> int: | |||
| 1166 | "ps_sdwa": (0x000000F1, 0xBFFEFFF2, 0x3C003344, 0xBFF70000), | 1197 | "ps_sdwa": (0x000000F1, 0xBFFEFFF2, 0x3C003344, 0xBFF70000), |
| 1167 | "ps_sdwa_dword_hi": (0x00004000, 0x00000003, 0x00004700, 0x0000C000), # 16-bit SDWA, dst_sel:DWORD | 1198 | "ps_sdwa_dword_hi": (0x00004000, 0x00000003, 0x00004700, 0x0000C000), # 16-bit SDWA, dst_sel:DWORD |
| 1168 | "ps_legacy_mul": (0, 0, 0, 0x40C00000), # same expectation as check.py | 1199 | "ps_legacy_mul": (0, 0, 0, 0x40C00000), # same expectation as check.py |
| 1200 | "ps_mul_legacy_denorm": (0, 0, 0, 0x80000000), # mode0 input FTZ + DX9 +0 override; output FTZ keeps sign | ||
| 1201 | "ps_mul_legacy_denorm_mods": (0, 0, 0, 0x40400000), # product FTZ before omod; omod -0 -> +0 | ||
| 1169 | "ps_ops5": (0x12340010, 0xBEEF0800, 0xAAAAFFFF, 0xDEADBC00), # from the .asm headers | 1202 | "ps_ops5": (0x12340010, 0xBEEF0800, 0xAAAAFFFF, 0xDEADBC00), # from the .asm headers |
| 1170 | "ps_ops6": (0xF800FFFF, 0x01000010, 0x00800800, 0x8000FFF0), | 1203 | "ps_ops6": (0xF800FFFF, 0x01000010, 0x00800800, 0x8000FFF0), |
| 1171 | "ps_ops7": (0x00FF8077, 0xFF0000FF, 0x89ABCDEF, 0x00070003), | 1204 | "ps_ops7": (0x00FF8077, 0xFF0000FF, 0x89ABCDEF, 0x00070003), |
| @@ -1179,6 +1212,7 @@ def run_suite(a, work: str) -> int: | |||
| 1179 | "ps_scc_logic64": (0x0fff0fff, 0xff000000, 0xff0000ff, 0x16), | 1212 | "ps_scc_logic64": (0x0fff0fff, 0xff000000, 0xff0000ff, 0x16), |
| 1180 | "ps_fma_literal": (0x41B80000, 0x41800000, 0x40E00000, 0x41A40000), | 1213 | "ps_fma_literal": (0x41B80000, 0x41800000, 0x40E00000, 0x41A40000), |
| 1181 | "ps_f64_mods": (0x40040000, 0x3FF00000, 0x3FE40000, 0x3FF00000), # needs shaderFloat64 | 1214 | "ps_f64_mods": (0x40040000, 0x3FF00000, 0x3FE40000, 0x3FF00000), # needs shaderFloat64 |
| 1215 | "ps_f64_round": (0xC12AF665, 0x3FE7FFFF, 0xBFFFFFFF, 0xC12AF666), # needs shaderFloat64 | ||
| 1182 | "ps_outmods_f16": (0xAAAA3C00, 0xAAAA3E00, 0x7C000000, 0x3C000000), | 1216 | "ps_outmods_f16": (0xAAAA3C00, 0xAAAA3E00, 0x7C000000, 0x3C000000), |
| 1183 | # f16 op_sel / partial writes / inline constants: RDNA2 hardware words (see the .asm headers) | 1217 | # f16 op_sel / partial writes / inline constants: RDNA2 hardware words (see the .asm headers) |
| 1184 | "ps_f16_med3_opsel": (0xAAAA4100, 0xAAAA4200, 0xAAAA3E00, 0x40005555), | 1218 | "ps_f16_med3_opsel": (0xAAAA4100, 0xAAAA4200, 0xAAAA3E00, 0x40005555), |
| @@ -1209,6 +1243,8 @@ def run_suite(a, work: str) -> int: | |||
| 1209 | # v_mad_u32_u16 / v_mad_i32_i16 and v_subrev_f16, which had CPU checks only (.asm headers) | 1243 | # v_mad_u32_u16 / v_mad_i32_i16 and v_subrev_f16, which had CPU checks only (.asm headers) |
| 1210 | "ps_valu16_mad": (0x00000002, 0x00030002, 0x00008000, 0x00000004), | 1244 | "ps_valu16_mad": (0x00000002, 0x00030002, 0x00008000, 0x00000004), |
| 1211 | "ps_valu16_subrev": (0xAAAABC00, 0xAAAAC000, 0xAAAA3C00, 0x42003800), | 1245 | "ps_valu16_subrev": (0xAAAABC00, 0xAAAAC000, 0xAAAA3C00, 0x42003800), |
| 1246 | "ps_vcmp_f32_nan": (0x0000376C, 0x0000FD5B, 0x0000D36C, 0x00000FE7), # from the .asm headers | ||
| 1247 | "ps_vcmp_64": (0x0000B3C4, 0x000091E6, 0x00006787, 0x00007C93), | ||
| 1212 | "ps_w64x_readlane": (0x40000079, 0x40000010, 0x40000064, 0x400000BE), # same expectation as check.py | 1248 | "ps_w64x_readlane": (0x40000079, 0x40000010, 0x40000064, 0x400000BE), # same expectation as check.py |
| 1213 | } | 1249 | } |
| 1214 | if skip := wide_pixel_skip(name, msg): # a 64-wide pixel stage the device could not give: nothing to judge | 1250 | if skip := wide_pixel_skip(name, msg): # a 64-wide pixel stage the device could not give: nothing to judge |