Repository navigation
fix(shader): use integer typed-buffer overloads - #196
Merged
pragyaangaur merged 5 commits intoNov 26, 2026
Merged
Conversation
Signed-off-by: Vedant Dadhich <vedantdadhich21@gmail.com>
Select bufferLoad.i32 and bufferStore.i32 for runtime UINT/SINT views using the view-kind metadata. Keep independently annotated float and integer handles in mutually exclusive branches so float views never execute a mismatched overload. Preserve the established d16 path for narrow formats. Add structural DXIL coverage and synthetic SRV/UAV round trips for RGB32/RGBA32 UINT, SINT and FLOAT, including integer boundaries and NaN bit patterns. Skip known-broken RGB32 D3DMetal view creation while still querying WARP. Signed-off-by: Vedant Dadhich <vedantdadhich21@gmail.com>
vedantdadhich21
marked this pull request as ready for review
November 26, 2026 00:36
This was referenced Nov 26, 2026
…ze limit lower.rs went over the 512 KiB limit of the asset policy with the typed-buffer changes. The tests move unchanged to lower/tests.rs; the policy is not touched.
Owner
|
I read the diff (it carries #181 and #177, which were already reviewed as sound), merged main into it and merged it. Changes I made on top: the new fields from #180 and #164 in the test initialisers and the Lowered struct, WARP skipping typed formats it does not support in the page boundary test (a CI WARP lost the device on RGB32F), and a move of the lowering tests from lower.rs to lower/tests.rs, unchanged, because lower.rs went past the 512 KiB limit of the asset policy (the policy itself is untouched). The shader suite passed under Wine with D3DMetal and CI is green. Thank you, and thanks for folding the two earlier PRs together. |
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.
Summary
Typed 32-bit UINT/SINT buffer accesses were emitted through
bufferLoad.f32/bufferStore.f32and bitcast afterward, relying on the driver to preserve mismatched component bits.This branch:
bufferLoad.i32/bufferStore.i32paths from runtimeVIEW_INTEGERmetadata;.f32and preserves the established_d16narrow-format path;The integer and float branches are mutually exclusive, with i32 phis joining load results so no mismatched overload executes.
Regressions
0xffffffff,0x80000000, NaN patterns,0,1, and-1.Verification
victory-shader: 167 passed, 2 ignored.victory-shaderandvictory-gpu, all targets/features: passed.cargo xtask policy: 216 files ok.git diff --check: passed.DXIL validation was skipped because
dxil.dllis unavailable. D3DMetal passed RGBA32 FLOAT/UINT/SINT; RGB32 D3DMetal view creation and WARP were unavailable, so those cases are skipped conditionally. No game files or proprietary assets were used. AI-assisted.