mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:10:52 +01:00
[PR #101] rdna2spirv: use subgroup ballot in quad_any for non-PS stages to avoid partial-quad UB #154
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#154
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/101
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:old-pr/9833📝 Commits (1)
833af33rdna2spirv: use subgroup ballot in quad_any for non-PS stages to avoid partial-quad UB📊 Changes
2 files changed (+183 additions, -17 deletions)
View changed files
➕
tests/semantic/test_quad_any_partial_quad.py(+154 -0)📝
tools/rdna2spirv.py(+29 -17)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):### Summary
In non-pixel shader stages (CS/VS/etc.), a 4-lane quad can be partially populated (absent/inactive subgroup lanes), where OpGroupNonUniformQuadSwap* has undefined behavior under Vulkan/SPIR-V rules.
This change updates quad_any in ools/rdna2spirv.py to use OpGroupNonUniformBallot masked to the lane's 4-lane quad for non-PS stages, while preserving OpGroupNonUniformQuadSwap* for pixel shaders where full 2x2 quads are guaranteed.
Tests
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.