mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:35:53 +01:00
[PR #1039] test(gpu): cover EXEC-masked sdst, global atomics, clamp, the mad flush and f64 compares #1077
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1077
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1039
Author: @YaBulochka
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:feat/fixtures-batch4📝 Commits (1)
4589472test(gpu): cover EXEC-masked sdst, global atomics, clamp, the mad flush and f64 compares📊 Changes
22 files changed (+1543 additions, -4 deletions)
View changed files
📝
docs/shader_validation.md(+34 -0)📝
runtime/test/shaders/check.py(+23 -3)➕
runtime/test/shaders/cs_global_atomic32_float.asm(+66 -0)➕
runtime/test/shaders/cs_global_atomic32_int.asm(+71 -0)➕
runtime/test/shaders/cs_global_atomic32_rtn.asm(+72 -0)➕
runtime/test/shaders/cs_global_atomic32_x2.asm(+69 -0)➕
runtime/test/shaders/cs_w32_clamp16.asm(+58 -0)➕
runtime/test/shaders/cs_w32_clamp32.asm(+51 -0)➕
runtime/test/shaders/cs_w32_mad_denorm.asm(+54 -0)➕
runtime/test/shaders/cs_w32_sdst_exec.asm(+140 -0)➕
runtime/test/shaders/cs_w32_vcmp_f64.asm(+173 -0)📝
scripts/run_gpu_tests.py(+17 -1)➕
tests/semantic/fixtures/disasm/cs_global_atomic32_float.s(+50 -0)➕
tests/semantic/fixtures/disasm/cs_global_atomic32_int.s(+54 -0)➕
tests/semantic/fixtures/disasm/cs_global_atomic32_rtn.s(+54 -0)➕
tests/semantic/fixtures/disasm/cs_global_atomic32_x2.s(+56 -0)➕
tests/semantic/fixtures/disasm/cs_w32_clamp16.s(+41 -0)➕
tests/semantic/fixtures/disasm/cs_w32_clamp32.s(+36 -0)➕
tests/semantic/fixtures/disasm/cs_w32_mad_denorm.s(+38 -0)➕
tests/semantic/fixtures/disasm/cs_w32_sdst_exec.s(+117 -0)...and 2 more files
📄 Description
Claimed in the coordination issue as: carried over from the closed original repository (branch
feat/fixtures-batch4); no new claimDepends on: none. Overlaps #1012 (
v_cmp_*_f64/v_cmpx_*_f64readback), #173 (ds_mskor, integer clamp), #373 (v_mac_legacy_f32) and #411/#413 (global atomics). Each of those rows also has a fixture here; whichever lands first, the other can drop the row it covered.What and why
Nine wave32 GPU fixtures for
docs/design.mdrows that had no GPU check:cs_w32_sdst_exec(#218): all eight carry/sign-out ops underEXEC = 0xAAAAAAAAwith uniform carrying operands; every sdst is0xAAAAAAAA(16set lanes| 1 << 8), so inactive lanes write 0 and active ones write their bit. The six*_co_*forms and bothv_mad_*64ops are covered.cs_global_atomic32_{int,rtn,float,x2}(#226): the first global-atomic fixtures in the corpus — add/sub/smin/umin/smax/umax/and/or; xor/swap/inc/dec and fourglcreturns; fmin/fmax on 1.0/2.0, a qNaN and -0/+0 plus cmpswap hit and miss; and/or/xor/swap_x2 on 8-byte elements.cs_w32_clamp32/cs_w32_clamp16(#265):v_add/sub/subrev_nc_u32,v_add/sub_nc_i32, the 16-bit_nc_forms and the six carry ops withclamp.cs_w32_mad_denorm(#379/#380): subnormal operand and subnormal product forv_mad_f32,v_mac_f32,v_mad_legacy_f32andv_mac_legacy_f32, oneclampcase and a non-flushing control.cs_w32_vcmp_f64(#381): all 16 predicates in bothv_cmp_*_f64andv_cmpx_*_f64, four predicates per eight-word dump.Registered in
check.py(WAVE32_DUMPS,WAVE32_LANE_DUMPS,CS_DUMPS) andscripts/run_gpu_tests.py;tests/semantic/test_batch4_gpu_fixtures.pyreplays the disassembly in the interpreter and keeps the headers,CS_DUMPSand the runner table in step. The.sfixtures are generated from the author's hand-written.asmsources (not game dumps) and--checkis clean.docs/design.mdrows 218, 226, 265, 379, 380 and 381 anddocs/shader_validation.mdname the fixtures.Tested
python3 -m unittest discover -s tests/semantic -p "test_batch4_gpu_fixtures.py": 3 tests, OK.python3 -m pytest tests/test_shader_checks.py -x -q: 91 passed, 393 subtests passed.python3 tests/semantic/regen_fixtures.py --check: clean.RAPHAEL_MENDOCINO, Mesa 27.0.0-devel; 9/9 fixtures and 72/72 words exact through both runners.AI-assisted: yes.
Checklist
docs/design.md, with how it was confirmed. (No new rule; the existing rows now name the GPU confirmation.)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.