shader: lower neg(N) operand modifier in gfx2hlsl (Part of #1723) #2037
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!2037
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2037/head"
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?
@tedin7 on GitHub · 2026-11-24 23:32 UTC · original
tedin7:x2w-r20-neg-operand→main· +113 −8 · 3 files · 1 commits · merged 2026-11-25 01:28 UTCPart of #1723
What this unblocks: Run 20 census #14 (43 pairs) refused with
operand 'neg(...)'.LLVM prints a lone negation of a numeric operand as
neg(x), so that-1is not read as the integer. gfx2hlsl only knew the-xspelling. A shared helper now reads both:neg(x)is the sign bit flipped (^ 0x80000000uon integer selects, a float negation on float ops and compares).-1stays the integer. Integer ops that do not model a negation still refuse it. New teststartup_gfx2hlsl_neg_operand(registered in CMakeLists.txt).Verification:
python3 -B tests/startup_gfx2hlsl_neg_operand_check.py-> PASS (on origin/main the same test fails withUnsupported: operand 'neg(v30)')tests/startup_gfx2hlsl*_check.pyscripts run withpython3 -B-> exit 0AI-assisted; commands listed were executed locally.
@chatgpt-codex-connector[bot] on GitHub · 2026-11-24 23:32 UTC · original · edited 2026-11-24 23:35 UTC
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
8a290f6ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.