mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:10:52 +01:00
[PR #335] [MERGED] GPU fixture cs_imgstore_cube: image_store on dim:SQ_RSRC_IMG_CUBE (GPU-CUBE-STORE) #386
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#386
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/335
Author: @milk4sale
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @aslan2142
Base:
main← Head:gpu-test/cube-store📝 Commits (1)
0d27fdcGPU fixture cs_imgstore_cube: image_store on dim:SQ_RSRC_IMG_CUBE (GPU-CUBE-STORE)📊 Changes
6 files changed (+207 additions, -14 deletions)
View changed files
📝
docs/design.md(+1 -1)📝
runtime/test/shaders/check.py(+2 -1)➕
runtime/test/shaders/cs_imgstore_cube.asm(+95 -0)📝
runtime/test/vk_store_test.cpp(+102 -8)📝
scripts/run_gpu_tests.py(+3 -0)📝
tests/test_shader_checks.py(+4 -4)📄 Description
Claimed in the coordination issue as: GPU-CUBE-STORE (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7120639163)
Depends on: none. It builds on #44 (DOC-CUBE-STORE, merged), whose "Typed image stores" row said a cube store was "not GPU-verified: no GPU fixture covers a cube store yet". It touches
vk_store_test.cpp,check.py,run_gpu_tests.pyandtest_shader_checks.py, which #213 also changes. The two don't overlap in meaning (#213 keeps 2D-array storage at bindings 11/12/13 and adds 26-28 for 1D arrays), but whichever lands second may need a textual rebase.What and why
The translator writes
image_store ... dim:SQ_RSRC_IMG_CUBEthrough a six-layer 2D-array storage view (bindings 11/12/13 for float/uint/sint, coordinates (x, y, face)), as the runtime binds a cube UAV (runtime/src/vulkan_bindless.h). Until now onlytests/semantic/test_image_cube_store_glc.pychecked that, on the CPU. This adds the GPU fixture:runtime/test/shaders/cs_imgstore_cube.asm: three T#s (FORMAT 56 rgba8 unorm, 20 r32 uint, 21 r32 sint; word3 TYPE = 0xB,SQ_RSRC_IMG_CUBE). 64 threads each store to their texel on all six faces, with per-face values so a wrong layer shows: rgba8(x/7, y/7, face/5, 1), uint100 + 1000·face + 8y + x, sint-(1000·face + 8y + x).vk_store_test cs_imgstore_cube.spv cube: three cube-compatible 8x8 images of six layers, each bound through a six-layerVK_IMAGE_VIEW_TYPE_2D_ARRAYstorage view at index 1-3 of bindings 11/12/13. All six layers are read back and every texel of every face is checked. The other modes are unchanged: they keep their 8 bindings and do not create the cube images.scripts/run_gpu_tests.pyandruntime/test/shaders/check.pyrun it the way they runcs_imgstore.tests/test_shader_checks.pycounts the seventhvk_store_testcase and fakes its output.docs/design.md, "Typed image stores": the cube sentence names the fixture and the GPUs it passed on, replacing "not GPU-verified".Tested
On
main1c7f5b510plus this commit, CachyOS (kernel 7.3.3), llvm-mc 23.1.4, SPIRV-Tools v2026.4, GCC 16.2.1:cs_imgstore_cubenativeLEONIDA_W64_EMULATE=1182 109 204 255/4129/-4029in the passing runs, as the fixture predicts.cs_imgstorestill passes on both GPUs, native and emulated.scripts/run_semantic_tests.py tests/semantic: 463 files, 6,075 tests, 0 failed.ctest: 70/70 (2 skipped as on main).node --test tests/test_viewer_streaming.cjs: 57/57.python -I tests/test_*.pyfor every standard-library test file: all pass excepttest_rdna2_decode.py, which fails the same way onmainhere (llvm-mc 23.1.4 printsop_sel:[0,1]where the decoder givesop_sel:[0,1,0,0]). The 30 pytest-based test files were not run (pytest is not installed on this machine).scripts/check_no_game_data.pyon the new fixture: clean.AI-assisted: yes (Claude Code)
Checklist
docs/design.md, with how it was confirmed. (No new rule: this GPU-confirms the existing cube store row.)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.