[removed by author] #284
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!284
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/284/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?
@thegl0w on GitHub · 2026-11-21 20:34 UTC · original
gpu-alias/shader-lookup→main· +630 −4 · 11 files · 8 commits · merged 2026-11-21 21:26 UTC[removed by author]
On the console a shader can load through a 64-bit address read from memory, because a graphics allocation's CPU pointer is also its GPU address. On desktop each aliased allocation is a separate buffer. src/title_va_lookup.hlsli binary-searches ranges sorted by title address (64-bit compares on uint2) and returns the range's descriptor slot and the byte offset. era_title_va::shader_ranges packs a table's ranges in that layout and rejects unsorted, overlapping, empty or 4 GiB ranges, which a raw view cannot cover. gpu_alias_lookup_{warp,hardware} open three era_heap graphics allocations plus one placed across a 4 GiB line, and load one word through each of 122 title addresses read from an input buffer. The addresses cover range starts, ends, middles, the words just outside each range, the null page, an address above user space, and the same low words 4 GiB above and below the placed range. Results must match the CPU reading through the title pointers. era_title_va_shader covers the packing. Co-Authored-By: Claude Opus 5.5 <[email protected]>Shaders that read addresses from their inputs also store and use atomics through them (global_store, global_atomic_add and _sub, float min and max). gpu_alias_writes.hlsl does each through TitleLookup on the aliased title allocations; float min and max use a compare-exchange loop on the word's bits. gpu_alias_lookup_writes_{warp,hardware} reuse the lookup fixture (now shared with gpu_alias_lookup) and run 1,041 records: - 14 stores at range starts, middles and ends and on both sides of the 4 GiB line; - 256 contending threads each for add, sub, float min and float max on one word per operation; - three stores to unmapped addresses, which must report 0 and change nothing. Afterwards every word of all four allocations is compared with the CPU's expectation through the title pointers. Co-Authored-By: Claude Opus 5.5 <[email protected]>github-bot referenced this pull request2026-11-26 21:43:14 +00:00
@R0Y00 on GitHub · 2026-11-21 20:55 UTC · original
TitleLookupchecks only the first byte, but both shaders use the result for a four-byte raw UAV operation. A start inside the last three bytes currently reports success, and an unaligned offset can reach a raw load/store or atomic. Please validate the entire aligned DWORD access before issuing it (or keep the helper byte-oriented and check at its callers). Add last-valid-word, tail-crossing and misaligned controls, with unchanged backing words for rejected writes.github-bot referenced this pull request2026-11-27 01:51:59 +00:00
shader: load, store and use atomics through 64-bit title addressesto [removed by author]