diff options
| author | AlxcBTW <187763517+AlxcBTW@users.noreply.github.com> | 2026-11-22 15:13:40 +0100 |
|---|---|---|
| committer | AlxcBTW <187763517+AlxcBTW@users.noreply.github.com> | 2026-11-22 15:13:40 +0100 |
| commit | c2f39447b611f6c5df7bd283ae41e44a6f78d458 (patch) | |
| tree | 510b0aa4f91eaf897879ca44d9b6d41892640ddb /scripts/run_gpu_tests.py | |
| parent | 967564a20c96f188982832102c0206957e761a2a (diff) | |
| parent | 003e78129303643a3fdc9e5f0e31a01b09759236 (diff) | |
Merge origin/main into m4-synthetic-gate
Diffstat (limited to 'scripts/run_gpu_tests.py')
| -rw-r--r-- | scripts/run_gpu_tests.py | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py index 819b5933a..2addcb273 100644 --- a/scripts/run_gpu_tests.py +++ b/scripts/run_gpu_tests.py | |||
| @@ -25,7 +25,7 @@ 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_xy_xyz_test | 28 | from check import Skip, clip_test, fmt_1010102_test, fmt_sint32_test, fmt_xy_xyz_test |
| 29 | from compute_fixture import compute_header | 29 | from compute_fixture import compute_header |
| 30 | from check import SAMPLER_CASES, sampler_test # ps_ssharp: the S#/T# mip fields (vk_sampler_test) | 30 | 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, GRADIENT_TESTS, TEST_PROGRAMS, TEXTURE_MIP_DEPENDENCIES, | 31 | from check import (CMPX_CLASS_WORDS, CVT_F32_SAT_CASES, GRADIENT_TESTS, TEST_PROGRAMS, TEXTURE_MIP_DEPENDENCIES, |
| @@ -40,6 +40,7 @@ from check import (WAVE32_LANE_DUMPS, WAVE32_LANE_ENV, bitmask_perm_narrow_skip, | |||
| 40 | vcmpx_forms_narrow_skip, wave32_lane_skip) # as in check.py | 40 | vcmpx_forms_narrow_skip, wave32_lane_skip) # as in check.py |
| 41 | from check import PIXEL_VERTEX, interp_f16_high_problem, ij_computed_problem # pixel producers and checks | 41 | from check import PIXEL_VERTEX, interp_f16_high_problem, ij_computed_problem # pixel producers and checks |
| 42 | from check import GET_LOD_TESTS, STORE_WORDS, get_lod_test, store_words_problem # TEST-184: image atomics and queries | 42 | from check import GET_LOD_TESTS, STORE_WORDS, get_lod_test, store_words_problem # TEST-184: image atomics and queries |
| 43 | from check import wide_pixel_skip # ps_w64x_readlane: judged only where the fragment stage was required 64-wide | ||
| 43 | 44 | ||
| 44 | 45 | ||
| 45 | def make_dxbc(chunks: list[tuple[bytes, bytes]]) -> bytes: | 46 | def make_dxbc(chunks: list[tuple[bytes, bytes]]) -> bytes: |
| @@ -756,6 +757,12 @@ def run_suite(a, work: str) -> int: | |||
| 756 | for fname in asm_files: | 757 | for fname in asm_files: |
| 757 | name = os.path.splitext(fname)[0] | 758 | name = os.path.splitext(fname)[0] |
| 758 | spv = os.path.join(spirv_dir, f"{name}.spv") | 759 | spv = os.path.join(spirv_dir, f"{name}.spv") |
| 760 | if name == "ps_ij_computed" and (bary_fallback() or f16_interp_fallback()): | ||
| 761 | # Before the .spv check: without PerVertexKHR inputs the translator refuses a computed I/J pair, so there | ||
| 762 | # is no .spv (the f16 fallback is on by default where PerVertexKHR doesn't compile: MoltenVK). | ||
| 763 | results.append((name, None, "SKIP (computed I/J pairs need PerVertexKHR inputs: " | ||
| 764 | "no --bary-fallback / --f16-interp-fallback)")) | ||
| 765 | continue | ||
| 759 | if not os.path.isfile(spv): | 766 | if not os.path.isfile(spv): |
| 760 | results.append((name, False, "missing .spv (translation failed)")) | 767 | results.append((name, False, "missing .spv (translation failed)")) |
| 761 | continue | 768 | continue |
| @@ -826,6 +833,9 @@ def run_suite(a, work: str) -> int: | |||
| 826 | elif name == "cs_fmt_1010102": | 833 | elif name == "cs_fmt_1010102": |
| 827 | problem = fmt_1010102_test(a.build, spirv_dir, cs_env) | 834 | problem = fmt_1010102_test(a.build, spirv_dir, cs_env) |
| 828 | results.append((name, not problem, problem or "64/64 dumped words exact")) | 835 | results.append((name, not problem, problem or "64/64 dumped words exact")) |
| 836 | elif name == "cs_fmt_sint32": | ||
| 837 | problem = fmt_sint32_test(a.build, spirv_dir, cs_env) | ||
| 838 | results.append((name, not problem, problem or "64/64 dumped words exact")) | ||
| 829 | elif name == "cs_fmt_xy_xyz": | 839 | elif name == "cs_fmt_xy_xyz": |
| 830 | # TEST-185: xy/xyz format loads and stores, words measured natively on a Radeon 680M (the .asm header) | 840 | # TEST-185: xy/xyz format loads and stores, words measured natively on a Radeon 680M (the .asm header) |
| 831 | problem = fmt_xy_xyz_test(a.build, spirv_dir, cs_env) | 841 | problem = fmt_xy_xyz_test(a.build, spirv_dir, cs_env) |
| @@ -861,7 +871,7 @@ def run_suite(a, work: str) -> int: | |||
| 861 | # Whole-wave mask test, as in check.py: needs a 64-wide subgroup, skipped where the device has none. | 871 | # Whole-wave mask test, as in check.py: needs a 64-wide subgroup, skipped where the device has none. |
| 862 | # With LEONIDA_W64_EMULATE=1 it was translated with --wave64-emulate and runs on any subgroup size. | 872 | # With LEONIDA_W64_EMULATE=1 it was translated with --wave64-emulate and runs on any subgroup size. |
| 863 | results.append((name,) + wavemask_check(vk_compute, spv, cs_env, w64_emulated())) | 873 | results.append((name,) + wavemask_check(vk_compute, spv, cs_env, w64_emulated())) |
| 864 | elif name in ("cs_store", "cs_smem_soffset_imm", "cs_w32_lane_wrap", "cs_movrelsd_2", "cs_w32_permute", "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", | 874 | elif name in ("cs_store", "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", |
| 865 | "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", "cs_dpp_ops", "cs_dpp_bank", "cs_dpp_fi", | 875 | "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", "cs_dpp_ops", "cs_dpp_bank", "cs_dpp_fi", |
| 866 | "cs_dpp_bound", "cs_dpp_w64", | 876 | "cs_dpp_bound", "cs_dpp_w64", |
| 867 | "cs_w64_mask_detect", | 877 | "cs_w64_mask_detect", |
| @@ -932,6 +942,7 @@ def run_suite(a, work: str) -> int: | |||
| 932 | "cs_w64x_partial": [40, 40, 528, 0, 0, 532, 539, 524820], | 942 | "cs_w64x_partial": [40, 40, 528, 0, 0, 532, 539, 524820], |
| 933 | "cs_w64x_partial_scmp": [0, 1, 0, 1, 1, 1, 1, 0], # s_cmp mask, -1 in a partial wave | 943 | "cs_w64x_partial_scmp": [0, 1, 0, 1, 1, 1, 1, 0], # s_cmp mask, -1 in a partial wave |
| 934 | "cs_w32_partial_scmp": [0, 1, 1, 0, 1, 1, 1, 1], # the same in a 20-thread wave32 | 944 | "cs_w32_partial_scmp": [0, 1, 1, 0, 1, 1, 1, 1], # the same in a 20-thread wave32 |
| 945 | "cs_w32_sincos": [1, 1, 1, 1, 1, 1], # SHADER-88 (cs_w32_sincos.asm): angles in turns | ||
| 935 | "cs_w64x_sbarrier": [605, 605, 686, 686, 3032, 3013, 3032, 3031], | 946 | "cs_w64x_sbarrier": [605, 605, 686, 686, 3032, 3013, 3032, 3031], |
| 936 | "cs_w64x_load_ballot_load": [43, 74, 75, 42, 42, 18, 41, 32], | 947 | "cs_w64x_load_ballot_load": [43, 74, 75, 42, 42, 18, 41, 32], |
| 937 | "cs_w64x_andn2_exec": [1, 16, 32, 4144, 2052, 3, 8, 1544], # s_andn2_saveexec/wrexec_b64 (.asm header) | 948 | "cs_w64x_andn2_exec": [1, 16, 32, 4144, 2052, 3, 8, 1544], # s_andn2_saveexec/wrexec_b64 (.asm header) |
| @@ -946,7 +957,7 @@ def run_suite(a, work: str) -> int: | |||
| 946 | } | 957 | } |
| 947 | want = cs_dump_wants[name] | 958 | want = cs_dump_wants[name] |
| 948 | # Every dump but cs_store / cs_smem_soffset_imm / cs_w32_lane_wrap / cs_movrelsd_2 / cs_w32_permute / | 959 | # Every dump but cs_store / cs_smem_soffset_imm / cs_w32_lane_wrap / cs_movrelsd_2 / cs_w32_permute / |
| 949 | # cs_w32_lds_u8_d16 / cs_w32_int_ext / cs_w32_salu64 / cs_w32_misc_ext / cs_w32_new_ops, the wave32 | 960 | # cs_w32_lds_u8_d16 / cs_w32_sincos / cs_w32_int_ext / cs_w32_salu64 / cs_w32_misc_ext / cs_w32_new_ops, the wave32 |
| 950 | # cs_wqm_w32 / cs_bpermute32 and the DPP tests is a whole-wave (wave64) mask test: ask for a 64-wide subgroup and skip, | 961 | # cs_wqm_w32 / cs_bpermute32 and the DPP tests is a whole-wave (wave64) mask test: ask for a 64-wide subgroup and skip, |
| 951 | # as check.py does, where the device has none | 962 | # as check.py does, where the device has none |
| 952 | # (vk_compute_test exits 77) instead of reporting a failure. With LEONIDA_W64_EMULATE=1 they were | 963 | # (vk_compute_test exits 77) instead of reporting a failure. With LEONIDA_W64_EMULATE=1 they were |
| @@ -958,7 +969,7 @@ def run_suite(a, work: str) -> int: | |||
| 958 | wave64 = name not in ("cs_store", "cs_smem_soffset_imm", "cs_wqm_w32", "cs_w32_lane_wrap", "cs_movrelsd_2", | 969 | wave64 = name not in ("cs_store", "cs_smem_soffset_imm", "cs_wqm_w32", "cs_w32_lane_wrap", "cs_movrelsd_2", |
| 959 | "cs_w32_permute", "cs_barrier_divergent", "cs_barrier_early_end", "cs_barrier_loop", | 970 | "cs_w32_permute", "cs_barrier_divergent", "cs_barrier_early_end", "cs_barrier_loop", |
| 960 | "cs_w32_lds_u8_d16", "cs_w32_int_ext", "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", | 971 | "cs_w32_lds_u8_d16", "cs_w32_int_ext", "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", |
| 961 | "cs_bpermute32", "cs_w32_partial_scmp", | 972 | "cs_bpermute32", "cs_w32_partial_scmp", "cs_w32_sincos", |
| 962 | "cs_exec_const", "cs_w32_mask_imm", "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", | 973 | "cs_exec_const", "cs_w32_mask_imm", "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", |
| 963 | "cs_dpp_ops", "cs_dpp_bound", "cs_dpp_bank", "cs_dpp_fi") and not emulated and not partial | 974 | "cs_dpp_ops", "cs_dpp_bound", "cs_dpp_bank", "cs_dpp_fi") and not emulated and not partial |
| 964 | if partial and not emulated: | 975 | if partial and not emulated: |
| @@ -1067,7 +1078,7 @@ def run_suite(a, work: str) -> int: | |||
| 1067 | raw = os.path.join(raw_dir, f"{name}.raw") | 1078 | raw = os.path.join(raw_dir, f"{name}.raw") |
| 1068 | vs = os.path.join(spirv_dir, "vs_ids.spv") if name == "ps_flat" else vs_tri # check.py draws ps_flat with vs_ids | 1079 | vs = os.path.join(spirv_dir, "vs_ids.spv") if name == "ps_flat" else vs_tri # check.py draws ps_flat with vs_ids |
| 1069 | if name in PIXEL_VERTEX: | 1080 | if name in PIXEL_VERTEX: |
| 1070 | if bary_fallback() and name in ("ps_interp_f16_high", "ps_ij_computed"): # no PerVertexKHR inputs | 1081 | if bary_fallback() and name == "ps_interp_f16_high": # no PerVertexKHR inputs under --bary-fallback |
| 1071 | results.append((name, None, "SKIP (per-vertex f16 interpolants need barycentrics)")) | 1082 | results.append((name, None, "SKIP (per-vertex f16 interpolants need barycentrics)")) |
| 1072 | continue | 1083 | continue |
| 1073 | vs = os.path.join(spirv_dir, PIXEL_VERTEX[name] + ".spv") | 1084 | vs = os.path.join(spirv_dir, PIXEL_VERTEX[name] + ".spv") |
| @@ -1112,6 +1123,7 @@ def run_suite(a, work: str) -> int: | |||
| 1112 | "ps_f16_const": (0xAAAA3D00, 0x38005555, 0xAAAA3800, 0x3F000000), | 1123 | "ps_f16_const": (0xAAAA3D00, 0x38005555, 0xAAAA3800, 0x3F000000), |
| 1113 | "ps_f16_const2": (0x42003D00, 0x3D004200, 0xAAAABC00, 3), | 1124 | "ps_f16_const2": (0x42003D00, 0x3D004200, 0xAAAABC00, 3), |
| 1114 | "ps_f16_pack": (0x34003C00, 0x38003400, 0x34000000, 0x44004200), | 1125 | "ps_f16_pack": (0x34003C00, 0x38003400, 0x34000000, 0x44004200), |
| 1126 | "ps_f16_pack_mods": (0x4400B400, 0xC4003400, 0x4400C200, 0xB400B400), | ||
| 1115 | "ps_sff_imm": (2, 1, 20, 16), # SHADER-46: s_ff0/s_ff1 of an immediate | 1127 | "ps_sff_imm": (2, 1, 20, 16), # SHADER-46: s_ff0/s_ff1 of an immediate |
| 1116 | "ps_fnan_med3": (0x40A00000, 0xC0200000, 0xC0200000, 0x40600000), # measured on RDNA2 hardware | 1128 | "ps_fnan_med3": (0x40A00000, 0xC0200000, 0xC0200000, 0x40600000), # measured on RDNA2 hardware |
| 1117 | "ps_fnan_fract": (0x3F7FFFFF, 0x00003BFF, 0xC0200000, 0xC0200000), | 1129 | "ps_fnan_fract": (0x3F7FFFFF, 0x00003BFF, 0xC0200000, 0xC0200000), |
| @@ -1125,7 +1137,11 @@ def run_suite(a, work: str) -> int: | |||
| 1125 | # v_mad_u32_u16 / v_mad_i32_i16 and v_subrev_f16, which had CPU checks only (.asm headers) | 1137 | # v_mad_u32_u16 / v_mad_i32_i16 and v_subrev_f16, which had CPU checks only (.asm headers) |
| 1126 | "ps_valu16_mad": (0x00000002, 0x00030002, 0x00008000, 0x00000004), | 1138 | "ps_valu16_mad": (0x00000002, 0x00030002, 0x00008000, 0x00000004), |
| 1127 | "ps_valu16_subrev": (0xAAAABC00, 0xAAAAC000, 0xAAAA3C00, 0x42003800), | 1139 | "ps_valu16_subrev": (0xAAAABC00, 0xAAAAC000, 0xAAAA3C00, 0x42003800), |
| 1140 | "ps_w64x_readlane": (0x40000079, 0x40000010, 0x40000064, 0x400000BE), # same expectation as check.py | ||
| 1128 | } | 1141 | } |
| 1142 | if skip := wide_pixel_skip(name, msg): # a 64-wide pixel stage the device could not give: nothing to judge | ||
| 1143 | results.append((name, None, str(skip))) | ||
| 1144 | continue | ||
| 1129 | if name in const_wants: | 1145 | if name in const_wants: |
| 1130 | if name == "ps_vcmpx_forms" and (skip := vcmpx_forms_narrow_skip(msg)): | 1146 | if name == "ps_vcmpx_forms" and (skip := vcmpx_forms_narrow_skip(msg)): |
| 1131 | ok, detail = None, str(skip) | 1147 | ok, detail = None, str(skip) |