mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:15:51 +01:00
[PR #1778] [MERGED] rdna2spirv: apply src0 float modifiers after bound_ctrl zero selection (SHADER-DPP-NEG-BOUND-CTRL) #1793
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#1793
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/1778
Author: @abnalstlll-byte
Created: 11/25/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142
Base:
main← Head:feat/shader-dpp-neg-bound-ctrl📝 Commits (3)
fb3552frdna2spirv: apply src0 float modifiers after bound_ctrl zero selection (SHADER-DPP-NEG-BOUND-CTRL)3e729e8docs/design.md: escape pipes in DPP table row and note gfx1101 measurement (SHADER-DPP-NEG-BOUND-CTRL)31e8ba5docs/design.md: note RDNA2 not measured for DPP invalid-lane modifier rule (SHADER-DPP-NEG-BOUND-CTRL)📊 Changes
3 files changed (+93 additions, -2 deletions)
View changed files
📝
docs/design.md(+1 -1)➕
tests/semantic/test_dpp_bound_ctrl_modifiers.py(+87 -0)📝
tools/rdna2spirv.py(+5 -1)📄 Description
Claimed in the coordination issue as: SHADER-DPP-NEG-BOUND-CTRL (claim)
What and why
Implements the hardware measurement by @mcpeacebir-lang on AMD RDNA3 (RX 7800 XT,
HW-DPP-NEG-INVALID-LANE, addressing @OreoFR's finding in Issue #1608):Previously,
Gen.dpp_insn(tools/rdna2spirv.py:7353) evaluatedsrc_val = self.src_u(src)before the shuffle and bound check under the assumption that "neg/abs are lane-uniform, so before or after the shuffle is the same". Then at line 7523,src0 = OpSelect %uint %src_ok %shuffled %zeroselected%zero(0x00000000/+0.0f) for invalid lanes (bound_ctrl:1or DPP8fi:0), which wiped out the float negation on invalid lanes and caused them to read+0.0finstead of-0.0f.This fixes the ordering:
negandabsfromraw_srcbefore evaluatingsrc_val = self.src_u(raw_src)so the raw register bits are shuffled across lanes.src0 = OpSelect %uint %src_ok %shuffled %zero.src0 = self.modify(src0, src)after the zero selection, applyingFAbs/OpFNegateto the selected result. An invalid lane reading0.0fwithnegbecomes-0.0f(0x80000000), withabsbecomes+0.0f(0x00000000), and with-|src0|becomes-0.0f.docs/design.md.tests/semantic/test_dpp_bound_ctrl_modifiers.pyverifying wave execution and SPIR-V instruction structure.Tested
python -m unittest tests/semantic/test_dpp_bound_ctrl_modifiers.py: 2/2 tests pass (0.03s).python -m unittest discover -s tests/semantic -p "*dpp*.py": 19/19 tests pass.python -I tests/test_text_write_line_endings.py: 3/3 pass (clean line endings).python -I scripts/check_no_game_data.py: clean (0 violations, no game data).AI-assisted (Claude Code)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.