Repository navigation
Conversation
|
Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on Two more than the baseline: clamping out-of-range buffer loads and 64-bit cases are covered and green. Tree restored afterwards (full diff against a clean checkout), hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
The vector-load half looks right to me. The
AI-assisted (Claude Code). |
BufKind::Load clamps inactive and out-of-range MUBUF addresses to 0u before reading the memory window, whereas BufKind::FormatLoad, mubuf_d16, and sub-dword MUBUF loads passed unclamped 32-bit offsets into ld_raw (whose arguments are evaluated eagerly by HLSL 2021 select()). When a lane's offset lies past a 512 MiB or 4095 MiB window while xcl_w still names that window, Vulkan storage-buffer translation under vkd3d-proton can fault the GPU MMU (ivall#916). Clamp ld_raw addresses to 0u on !act || !ok across FormatLoad, mubuf_d16, and sub-dword MUBUF loads. Part of ivall#916. Assisted-by: Antigravity (Google DeepMind, Gemini 4 Carbon)
a4fd6c8 to
7b7c853
Compare
|
Thanks @upipibi for catching that I split the AI use: Antigravity (Gemini 4 Carbon) |
|
Test report for exact head Tested
main: PR: Not tested: AMD, the head merged onto current AI use: Claude Code (Claude Opus 5.5) ran this and wrote the report; the diff was read for safety by a Claude Opus 5.5 sub-agent before it was built. |
|
Test report for head Tested
Not tested
AI use
|
|
AMD run on the exact head Tested
Not tested
AI use
|
BufKind::Loadclamps inactive (!act) and out-of-range (!ok) MUBUF addresses to0ubefore reading the memory window, whereasBufKind::FormatLoad,mubuf_d16, and sub-dword MUBUF loads still passed unclamped 32-bit{t}_aoffsets intold_raw(whose arguments HLSL 2021select()evaluates eagerly). When an inactive or out-of-range lane holds a large or negative/sentinel offset past a 512 MiB or 4095 MiB window whilexcl_wstill selects that window, storage-buffer translation undervkd3d-protonon NVIDIA Vulkan can fault the GPU MMU (NVRM: Xid 13 … MMU Fault, #916).Part of #916.
What is in it
crates/xcl/src/gpu/recomp/emit.rs: clampld_rawaddresses to0uviaselect(and({t}_act, {t}_ok), {t}_a, 0u)inBufKind::FormatLoad,mubuf_d16loads, and sub-dword MUBUF loads (buffer_load_ubyte/sbyte/ushort/sshort).crates/xcl/src/gpu/recomp/tests.rs: addformat_and_subdword_buffer_loads_clamp_out_of_range_offsetschecking generated 1-window and 4-window HLSL and GPU execution across in-range, out-of-range, andEXEC-masked lanes forbuffer_load_format_xyzw,tbuffer_load_format_xyzw,buffer_load_ubyte,buffer_load_short_d16, andbuffer_load_format_d16_xy.Tested
32.0.32015.16001),rustc 1.100.0 (0ef1bc386 2026-11-09), debug and release.cargo test --workspace --no-fail-fast -- --test-threads=4: 752 passed, 0 failed, 41 ignored, 0SKIPPEDGPU capability skips (the 2 optionald3d12SDKLayers.dlltests return early because Windows Graphics Tools is not installed on this host).format_and_subdword_buffer_loads_clamp_out_of_range_offsetsfailed before theemit.rschanges (FormatLoadand sub-dword loads emitted unclampedld_raw(tN_a)calls) and passes after them (gpu::recomp: 190 passed, 0 failed, 18 ignored).Regression run
main:PR head:
Not tested
vkd3d-protonon NVIDIA (Xid 13world-load reproduction in Linux + NVIDIA: world load fails right after the 4th mid-list Wait-after-Write64 split (vkQueueSubmit2 AV / device lost / stuck fence) #916).XCL_SAMPLE_*sample-data tests.AI use