mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:10:53 +01:00
[PR #143] fix: translate image_load_mip glc on 2D through the coherent storage view #195
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#195
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/143
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:old-pr/9875📝 Commits (1)
8c9a474fix: translate image_load_mip glc on 2D through the coherent storage view📊 Changes
2 files changed (+90 additions, -6 deletions)
View changed files
📝
tests/semantic/test_image_coherent.py(+60 -1)📝
tools/rdna2spirv.py(+30 -5)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):What
image_load_mipwithglcon a plain 2D image no longer raisesUnsupported. It reads through the same Coherent storage view thatimage_loadglc already uses (image_load_coherent). The read is taken when the mip operand is 0. Any other mip writes zeros to the result registers, which is what an out-of-rangeimage_load_mipreturns on hardware, because the storage view has exactly one level. Other dims and the tfe/lwe forms still raiseUnsupported, now with the dim in the message.Why
A shader containing a coherent mip load could not be translated at all, so the pipeline that uses it fails to build. That blocks PSO creation and the first frame for any shader that hits it. This makes the translation succeed and validate.
Tested
pytest tests/semantic/test_image_coherent.py: 16 passed, 15 subtests passed.tools/rdna2spirv.pyrestored to origin/main (the test file kept), 8 tests fail (CoherentMipLoad x3 plus the subtests per dmask, and Validation spirv-val f32 and d16). With the fix they pass.-k 'image or mip or coherent'selection of tests/semantic has the same 47 failures with and without this change, all in test_image_atomics_guard.py. Those fail on current origin/main already ("OpImageTexelPointer in unguarded block"), unrelated to this PR.Rebased cleanly on current main (cherry-pick, no conflicts).
Coordination: https://github.com/ProjectLeonida/Leonida/issues/9677
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.