mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:15:52 +01:00
[PR #212] rdna2spirv: s_bfe_u64 / s_bfe_i64 on the dword pair, with no Int64 (SHADER-930) #264
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#264
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/212
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:old-pr/9947📝 Commits (1)
eb9199frdna2spirv: s_bfe_u64 / s_bfe_i64 on the dword pair, with no Int64 (SHADER-930)📊 Changes
3 files changed (+53 additions, -37 deletions)
View changed files
📝
docs/design.md(+1 -1)📝
tests/semantic/test_salu_bfe_64.py(+20 -5)📝
tools/rdna2spirv.py(+32 -31)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):Item: SHADER-930 (translator part; claimed in
#9677). The gfx1036 hardware measurement in the row stays up for grabs.Depends on: nothing
What.
s_bfe_u64/s_bfe_i64were the last 64-bit scalar data ops that built a%ulongand setuses_psb(Int64). The others in the row (s_brev_b64,s_bitset*_b64,s_flbit_i32_*64) already use 32-bit ops only. The extract is now lowered on the (lo, hi) dword pair:(b << 1) << (31 - s), so no shift amount reaches 32 and s = 0 needs no select.min(w, 32)bits of the low dword andw - 32of the high one withOpBitField[U|S]Extract. A count of 0 extracts 0, so width 0 still gives D = 0 and SCC = 0.s_bfe_i64with w ≤ 32 sign-fills the high dword from the low field's top bit.constantFoldBFE), SCC = D ≠ 0.Tests (Linux, CPU).
test_salu_bfe_64.py: the two emission tests no longer pin%ulong/%long; they assert no 64-bit type anduses_psbFalse (both fail on main, as intended). A new test checks every offset 0-63 × widths 0, 1, 2, 15, 16, 31-34, 47, 62-65, 127 × both ops × a value with the top bit set and one with it clear, against the file's reference model: 3,840 cases, all pass.test_salu*64*files pass, includingtest_salu64_fixture.py. The translatedcs_w32_salu64passesspirv-val --target-env vulkan1.2. That module still declares Int64 for its buffer addressing, not fors_bfe.test_exec_computed(SHADER-1264),test_image_atomics_guardandtest_int32_to_f64.docs/design.md: the 64-bit scalar data ops row says how they are lowered and how that was checked.GPU.
cs_w32_salu64(it runss_bfe_u64ands_bfe_i64against the hardware-verified words in the row) on an NVIDIA RTX 3060 / Windows 11: result to follow in a comment.AI-assisted (Claude).
🤖 Generated with Claude Code
https://claude.ai/code/session_01FXR27ZYP9qtZtN8SG7QPWW
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.