shader: lower bounded 64-bit word loads and stores through the SPIR-V address window #1150
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1157"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T01:56:42Z.
Bounded 64-bit loads and stores through the SPIR-V address window.
A plain 64-bit load or store through a physical pointer becomes two 32-bit accesses inside an explicit branch, taken only for an address that is 8-byte aligned, below 0xfffffff8, and does not wrap on an indexed address. Otherwise a load returns zero and a store changes nothing; the substitute index is never used (same approach as the atomics). Atomics, Volatile, other alignments and other uses of the pointer are rejected.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T02:39:46Z.
Review: COMMENTED
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
3f8a40bbc9ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T02:35:04Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
3f8a40bℹ️ 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.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T02:42:56Z.
AI-assisted update addressing the P2 finding: a QWORD access that splits a block now rewrites the parent label of
OpPhis in successor blocks to the generated*_mergeblock.tests/spirv_window/check.pygains a module with a successor phi, validated with spirv-as and spirv-val before and after lowering. The check fails on the previous lowering (spirv-val: phi parent is not a predecessor) and passes now.docs/experiments.mdnotes the rewrite.Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T02:39:46Z.
Code review location:
tools/spirv_address_window.py; line 251When a QWORD access occurs in a block that feeds a successor
OpPhi, this moves the original terminator into a generated*_mergeblock without updating the successor's incoming parent label. In a variant ofqword.spvasmthat branches from%entryto%exitwith%copied = OpPhi %ulong %result %entry, lowering retains%entryin that phi even though%x2w_load_value_mergeis now the actual predecessor. The generated SPIR-V is therefore invalid, so output validation rejects an otherwise supported shader. Track each original block's final label and rewrite the original successor phi parents after inserting these guards.Useful? React with 👍 / 👎.