diff options
| author | aslan2142 <jan.trencansky@protonmail.com> | 2026-11-24 18:07:14 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-24 18:07:14 +0100 |
| commit | b0224e44fcc5faf57cd8cae01a348057eedfada9 (patch) | |
| tree | 237703a7b125a4580297151be72df4aea03fd2e7 /scripts/run_gpu_tests.py | |
| parent | 8afbba14b9e96c4809c6a2ee0b574be9f3d1003e (diff) | |
| parent | d4de3a7df9438bb0781d8d7c8f7f169a2616279f (diff) | |
Merge branch 'main' into fix/shader-1266-tfe-fixtures
Diffstat (limited to 'scripts/run_gpu_tests.py')
| -rw-r--r-- | scripts/run_gpu_tests.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py index 80b380d9e..e8fce4277 100644 --- a/scripts/run_gpu_tests.py +++ b/scripts/run_gpu_tests.py | |||
| @@ -264,6 +264,8 @@ def read_raw_u32(path: str) -> list[tuple[int, int, int, int]]: | |||
| 264 | return [struct.unpack_from("<4I", data, 16 * i) for i in range(n)] | 264 | return [struct.unpack_from("<4I", data, 16 * i) for i in range(n)] |
| 265 | 265 | ||
| 266 | 266 | ||
| 267 | # cs_div_fmas_f64_rt's operands a = 1 + 2^-30, c = -(1 + 2^-29) as s4..s7 (low word first). | ||
| 268 | DIV_FMAS_F64_SGPRS = "0x00400000,0x3ff00000,0x00800000,0xbff00000" | ||
| 267 | UNSUPPORTED = 77 # vk_harness: the device lacks a stage the test draws with (geometry or mesh shaders) | 269 | UNSUPPORTED = 77 # vk_harness: the device lacks a stage the test draws with (geometry or mesh shaders) |
| 268 | 270 | ||
| 269 | 271 | ||
| @@ -1102,10 +1104,12 @@ def run_suite(a, work: str) -> int: | |||
| 1102 | ok, detail = judge_cs_dump(rc, msg, [0, 0x40040000], wave64=False, partial=False, emulated=False, | 1104 | ok, detail = judge_cs_dump(rc, msg, [0, 0x40040000], wave64=False, partial=False, emulated=False, |
| 1103 | hexwords=True) | 1105 | hexwords=True) |
| 1104 | results.append((name, ok, detail)) | 1106 | results.append((name, ok, detail)) |
| 1105 | elif name == "cs_div_fmas_f64": | 1107 | elif name in ("cs_div_fmas_f64", "cs_div_fmas_f64_rt"): |
| 1106 | # One-rounding binary64 FMA: strict where the translator emitted OpFmaKHR on doubles (shaderFmaFloat64, | 1108 | # One-rounding binary64 FMA: strict where the translator emitted OpFmaKHR on doubles (shaderFmaFloat64, |
| 1107 | # --fma khr); under the default GLSL Fma the split result (0) is allowed, as cs_fma_fused allows it. | 1109 | # --fma khr); under the default GLSL Fma the split result (0) is allowed, as cs_fma_fused allows it. |
| 1108 | rc, msg = run_cmd([vk_compute, spv, "1", "dump"], env=cs_env) | 1110 | # The _rt fixture reads the same operands from s4..s7, so the driver cannot fold the Fma at compile time. |
| 1111 | env = dict(cs_env or os.environ, VKC_SGPRS=DIV_FMAS_F64_SGPRS) if name.endswith("_rt") else cs_env | ||
| 1112 | rc, msg = run_cmd([vk_compute, spv, "1", "dump"], env=env) | ||
| 1109 | if rc == UNSUPPORTED: # no shaderFloat64, or (--fma khr) no shaderFmaFloat64 | 1113 | if rc == UNSUPPORTED: # no shaderFloat64, or (--fma khr) no shaderFmaFloat64 |
| 1110 | results.append((name, None, unsupported_skip(msg))) | 1114 | results.append((name, None, unsupported_skip(msg))) |
| 1111 | else: | 1115 | else: |
| @@ -1115,7 +1119,8 @@ def run_suite(a, work: str) -> int: | |||
| 1115 | ok = rc == 0 and (words == fused or (not strict and words == split)) | 1119 | ok = rc == 0 and (words == fused or (not strict and words == split)) |
| 1116 | detail = " ".join(hex(x) for x in words) if words else msg | 1120 | detail = " ".join(hex(x) for x in words) if words else msg |
| 1117 | if ok and words == split: | 1121 | if ok and words == split: |
| 1118 | detail += " (split: the driver rounds GLSL Fma on doubles twice; --fma khr fixes it)" | 1122 | detail += (" (split: the driver rounded GLSL Fma on doubles twice%s; --fma khr fixes it)" |
| 1123 | % ("" if name.endswith("_rt") else " when folding the constants")) | ||
| 1119 | results.append((name, ok, detail)) | 1124 | results.append((name, ok, detail)) |
| 1120 | elif name == "cs_cvt_f32_sat": | 1125 | elif name == "cs_cvt_f32_sat": |
| 1121 | # #300's saturating float -> int conversions: one dispatch per input word in s4 (VKC_SGPRS). | 1126 | # #300's saturating float -> int conversions: one dispatch per input word in s4 (VKC_SGPRS). |
| @@ -1330,6 +1335,9 @@ def run_suite(a, work: str) -> int: | |||
| 1330 | elif name == "cs_imgstore": | 1335 | elif name == "cs_imgstore": |
| 1331 | rc, msg = run_cmd([vk_store, spv]) | 1336 | rc, msg = run_cmd([vk_store, spv]) |
| 1332 | results.append((name, *helper_result(rc, msg))) | 1337 | results.append((name, *helper_result(rc, msg))) |
| 1338 | elif name == "cs_imgstore_cube": # GPU-CUBE-STORE: six-layer 2D-array views at bindings 11/12/13 | ||
| 1339 | rc, msg = run_cmd([vk_store, spv, "cube"]) | ||
| 1340 | results.append((name, *helper_result(rc, msg))) | ||
| 1333 | elif name in ("cs_imgload", "cs_imgload_tfe", "cs_imgload_d16", "cs_imgload_d16_tfe", "cs_sample_lz_int_d16"): | 1341 | elif name in ("cs_imgload", "cs_imgload_tfe", "cs_imgload_d16", "cs_imgload_d16_tfe", "cs_sample_lz_int_d16"): |
| 1334 | rc, msg = run_cmd([vk_store, spv, "load" if name in ("cs_imgload", "cs_imgload_tfe") else "load-d16"]) | 1342 | rc, msg = run_cmd([vk_store, spv, "load" if name in ("cs_imgload", "cs_imgload_tfe") else "load-d16"]) |
| 1335 | results.append((name, *helper_result(rc, msg))) | 1343 | results.append((name, *helper_result(rc, msg))) |