Repository navigation
Translation: buffer range checks without a division - #66
Merged
ThatRecompDev merged 1 commit intoNov 27, 2026
Merged
Conversation
NVIDIA refused the pipelines of 21 shader tests with E_OUTOFMEMORY (RTX 3060, driver 32.0.16.1714): their guarded stores depend on 0xffffffff / stride in buf_limit and sbuf_limit. buf_index_overflows answers index * stride >= 2^32 with shifts and two products that stay under 32 bits (checked against the division for every stride).
Owner
|
thanks, this is a nice one. went through the math: with the 14-bit stride the hi/lo split gives exactly index * stride >= 2^32 and nothing passes 32 bits, and stride 0 behaves like before, so it's equivalent to the division. ran it here together with #61, #62, #67 and our own pending translator changes: 572 passed / 0 failed on WARP, and the buffer, typed view, wave emulation and user-data tests (50) pass on a 4090 too. it changes translation output so it lands with that batch, should be soon |
Owner
|
in main now with the translator batch (976cc3e). it ran in all of last night's boots on the 4090 without trouble, thanks for this one. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the E_OUTOFMEMORY group from #9 (21 cases on an RTX 3060, driver 32.0.16.1714).
NVIDIA refuses the pipeline when a guarded store depends on
0xffffffff / stride, whichbuf_limitandsbuf_limitused for the 4 GiB overflow check.buf_index_overflowsanswersindex * stride >= 2^32without dividing: the stride has 14 bits, so splitting the index at bit 18 keeps both products under 32 bits. I checked it against the division for every stride (0..0x3fff).Tests: WARP 550 passed, 0 failed. On the 3060 none of the 21 fail anymore; what's left there is the rootdesc variant (next PR) and what #61/#62 fix.
AI-assisted (Claude), reviewed and tested by me.