mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:05:53 +01:00
[PR #226] tests: GPU fixture cs_w32_cvt_flr_rpi for v_cvt_flr_i32_f32 and v_cvt_rpi_i32_f32 #278
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#278
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/226
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:old-pr/9960📝 Commits (1)
2ae27e4tests: GPU fixture cs_w32_cvt_flr_rpi for v_cvt_flr_i32_f32 and v_cvt_rpi_i32_f32📊 Changes
4 files changed (+65 additions, -4 deletions)
View changed files
📝
docs/design.md(+1 -1)📝
runtime/test/shaders/check.py(+4 -1)➕
runtime/test/shaders/cs_w32_cvt_flr_rpi.asm(+55 -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-7116862079
What and why
Adds the hand-written wave32 compute GPU fixture
runtime/test/shaders/cs_w32_cvt_flr_rpi.asm(wired intoruntime/test/shaders/check.pyandscripts/run_gpu_tests.py) to GPU-verify thedocs/design.mdcontract row forv_cvt_flr_i32_f32andv_cvt_rpi_i32_f32, and updates that row indocs/design.md.Lane 0 stores eight dwords (
out[0..7]):out[0](v_cvt_flr_i32_f32(-2.5)):0xFFFFFFFD(-3; distinguishes floor from truncate)out[1](v_cvt_rpi_i32_f32(-2.5)):0xFFFFFFFE(-2;floor(-2.5 + 0.5))out[2](v_cvt_rpi_i32_f32(0x3EFFFFFF)):0x00000000(0; exactfloor(x + 0.5)without binary32 rounding of0.49999997 + 0.5)out[3](v_cvt_rpi_i32_f32(0x4B000001)):0x00800001(8388609; exact without binary32 tie rounding to8388610)out[4](v_cvt_rpi_i32_f32_e64(|-2.5|)):0x00000003(3; VOP3absmodifier + half-up rounding)out[5](v_cvt_flr_i32_f32_e64(-(3.25))):0xFFFFFFFC(-4; VOP3negmodifier + floor)out[6](v_cvt_flr_i32_f32(+qNaN 0x7FC00000)):0x7FFFFFFF(INT_MAXsaturation by sign bit)out[7](v_cvt_rpi_i32_f32(-qNaN 0xFFC00000)):0x80000000(INT_MINsaturation by sign bit)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_cvt_flr_rpi --require-pass: 1/1 translated, 1/1spirv-val,PASS cs_w32_cvt_flr_rpi 4294967293 4294967294 0 8388609 3 4294967292 2147483647 2147483648(1/1 passed).LEONIDA_W64_EMULATE=1 python -I scripts/run_gpu_tests.py --build runtime\build --filter cs_w32_cvt_flr_rpi --require-pass: 1/1 translated, 1/1spirv-val, 1/1 passed.runtime/test/shaders/build.py+check.pyforcs_w32_cvt_flr_rpi:cs_w32_cvt_flr_rpi ok.python -m unittest discover -s tests/semantic -p test_alu_cvt_flr_rpi.py(4/4 OK),python -I tests/test_run_gpu_tests.py(OK),python -I tests/test_gpu_build_dir.py(OK),python -I tests/test_design_contract_rows.py(OK),python -I tests/test_docs_encoding.py(OK),python -I tests/test_docs_table_rows.py(OK).python -I scripts/check_no_game_data.py runtime/test/shaders/cs_w32_cvt_flr_rpi.asm runtime/test/shaders/check.py scripts/run_gpu_tests.py docs/design.md— pass; LF-only line endings verified on all four files.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.