mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:40:52 +01:00
[PR #144] [CLOSED] tests: GPU fixture cs_w32_min3_med3_16 for 16-bit min3/max3/med3 #197
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#197
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/144
Author: @Andretuta
Created: 11/24/2026
Status: ❌ Closed
Base:
main← Head:old-pr/9876📝 Commits (1)
8656629tests: GPU fixture cs_w32_min3_med3_16 for 16-bit min3/max3/med3📊 Changes
4 files changed (+89 additions, -4 deletions)
View changed files
📝
docs/design.md(+1 -1)📝
runtime/test/shaders/check.py(+4 -1)➕
runtime/test/shaders/cs_w32_min3_med3_16.asm(+79 -0)📝
scripts/run_gpu_tests.py(+5 -2)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):Claimed in the coordination issue as: https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7116716878
What and why
Adds the hand-written wave32 compute GPU fixture
runtime/test/shaders/cs_w32_min3_med3_16.asm(wired intoruntime/test/shaders/check.pyandscripts/run_gpu_tests.py) to GPU-verify thedocs/design.mdcontract row forv_min3_f16,v_max3_f16,v_min3_i16,v_min3_u16,v_max3_i16,v_max3_u16,v_med3_i16andv_med3_u16, and updates that row indocs/design.md.Each of the eight ops writes one dword (
out[0..7]) from lane 0:out[0](v_min3_f16): qNaN ignoring,-0.0 < +0.0ordering,op_sel:[1,0,1,0], destination high half0xCAFEpreserved (0xCAFE8000)out[1](v_max3_f16): sourcenegandabs, qNaN ignoring, VOP3clamp,op_sel:[0,1,0,1], destination low half0xBEEFpreserved (0x3C00BEEF)out[2](v_min3_i16): signed ordering(-32768, -1, 32767),op_sel:[1,0,1,0], destination high half preserved (0x12348000)out[3](v_max3_i16): signed ordering(-1, 5, -32768),op_sel:[0,1,0,1], destination low half preserved (0x00055678)out[4](v_min3_u16): unsigned ordering(32768, 65535, 32767),op_sel:[1,1,0,0], destination high half preserved (0x9ABC7FFF)out[5](v_max3_u16): unsigned ordering(5, 32768, 65535),op_sel:[0,0,1,1], destination low half preserved (0xFFFFDEF0)out[6](v_med3_i16): signed median of(-10, 5, -32768)→-10,op_sel:[0,1,1,0], destination high half preserved (0x4321FFF6)out[7](v_med3_u16): unsigned median of the exact same three 16-bit bit patterns(0xFFF6, 0x0005, 0x8000)→0x8000,op_sel:[0,1,1,1], destination low half preserved (0x80008765)Tested
621.24, Vulkan1.4.357, Windows 11 Pro 26H2 (26300.9974),llvm-mc23.1.6(conda-forgellvm-tools),SPIRV-Tools2026.4, MSVC19.51.36260.0.python -I scripts/run_gpu_tests.py --build runtime\build --filter cs_w32_min3_med3_16 --require-pass: 1/1 translated, 1/1spirv-val,PASS cs_w32_min3_med3_16 3405676544 1006681839 305430528 349816 2596044799 4294958832 1126301686 2147518309(1/1 passed).LEONIDA_W64_EMULATE=1 python -I scripts/run_gpu_tests.py --build runtime\build --filter cs_w32_min3_med3_16 --require-pass: 1/1 translated, 1/1spirv-val, 1/1 passed.runtime/test/shaders/build.py+check.pyforcs_w32_min3_med3_16:cs_w32_min3_med3_16 ok.python -I tests/test_run_gpu_tests.py(62/62 OK),python -I tests/test_gpu_build_dir.py(18/18 OK),python -m compileall -q runtime/test/shaders/check.py scripts/run_gpu_tests.py.python -I scripts/check_no_game_data.py runtime/test/shaders/cs_w32_min3_med3_16.asm runtime/test/shaders/check.py scripts/run_gpu_tests.py docs/design.md— pass; all modified/added files verified LF-only.AI-assisted: yes
Checklist
docs/design.md, with how it was confirmed.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.