upleb.uk

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

summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authornonverifiedperson <8898330+nonverifiedperson@users.noreply.github.com>2026-11-22 13:39:39 +0100
committernonverifiedperson <8898330+nonverifiedperson@users.noreply.github.com>2026-11-22 15:30:42 +0100
commitc5edaf72f70466670d7c16100f01f2e062bb6a7e (patch)
tree5ee2fbc2a6857abcb5ede61c35e77d924fe9cf94 /scripts
parent003e78129303643a3fdc9e5f0e31a01b09759236 (diff)
Add ps_mandelbrot: a divergent backward loop with EXEC masking
A pixel shader that iterates z = z^2 + c per lane until it escapes or 64 rounds pass. Escaped lanes drop out of EXEC, s_cbranch_execz leaves the loop once all lanes are out, and EXEC is restored before the export. check.py and run_gpu_tests.py compare every pixel's iteration count with a pure-Python float32 model (mul/add/sub only, no FMA, so the model is exact). Tested on main 003e7812: run_gpu_tests.py 131/171 on RTX 5070 Ti (40 skipped) and 162/171 on AMD Radeon integrated graphics (9 skipped, run by the d3d12 draw tests). AI-assisted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/run_gpu_tests.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py
index 7209c364c..bbd4a4fa2 100644
--- a/scripts/run_gpu_tests.py
+++ b/scripts/run_gpu_tests.py
@@ -38,7 +38,7 @@ from check import gpu_test_timeout, timed_out # per-program time limit (LEONID
38from check import MESH_COMPUTE, mesh_env # LEONIDA_MESH_COMPUTE=1: mesh shaders as compute + a generated VS 38from check import MESH_COMPUTE, mesh_env # LEONIDA_MESH_COMPUTE=1: mesh shaders as compute + a generated VS
39from check import (WAVE32_LANE_DUMPS, WAVE32_LANE_ENV, bitmask_perm_narrow_skip, narrow_subgroup_skip, 39from check import (WAVE32_LANE_DUMPS, WAVE32_LANE_ENV, bitmask_perm_narrow_skip, narrow_subgroup_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
41from check import PIXEL_VERTEX, interp_f16_high_problem, ij_computed_problem # pixel producers and checks 41from check import PIXEL_VERTEX, interp_f16_high_problem, ij_computed_problem, mandelbrot_problem # pixel producers and checks
42from check import GET_LOD_TESTS, STORE_WORDS, get_lod_test, store_words_problem # TEST-184: image atomics and queries 42from check import GET_LOD_TESTS, STORE_WORDS, get_lod_test, store_words_problem # TEST-184: image atomics and queries
43from check import wide_pixel_skip # ps_w64x_readlane: judged only where the fragment stage was required 64-wide 43from check import wide_pixel_skip # ps_w64x_readlane: judged only where the fragment stage was required 64-wide
44 44
@@ -1168,6 +1168,11 @@ def run_suite(a, work: str) -> int:
1168 with open(raw, "rb") as source: 1168 with open(raw, "rb") as source:
1169 problem = ij_computed_problem(list(struct.iter_unpack("<4I", source.read()))) 1169 problem = ij_computed_problem(list(struct.iter_unpack("<4I", source.read())))
1170 ok, detail = not problem, problem or "computed I/J pair words and v/2 within 1e-6" 1170 ok, detail = not problem, problem or "computed I/J pair words and v/2 within 1e-6"
1171 elif name == "ps_mandelbrot":
1172 with open(raw, "rb") as source:
1173 px = list(struct.iter_unpack("<4I", source.read()))
1174 problem = mandelbrot_problem(px)
1175 ok, detail = not problem, problem or f"{len(px)}/{len(px)} iteration counts match the float32 model"
1171 else: 1176 else:
1172 ok, detail = False, "no checker defined" 1177 ok, detail = False, "no checker defined"
1173 results.append((name, ok, detail)) 1178 results.append((name, ok, detail))