Repository navigation
Runtime: apply backing-buffer offsets to ExecuteIndirect (D3D-17) - #1339
Conversation
|
I reproduced the argument and count offset errors independently with actual
The argument view started at backing offset 64 and used resource-relative offset 16 (absolute 80). The count view started at 160 and used resource-relative offset 8 (absolute 168). The count and the command each ended exactly at the end of their logical view. I compared all 256 RGBA pixels after each draw; all six frames matched on each GPU at I used the source-built |
|
Tested on Windows 11 with two GPUs on one machine (runtime built from this PR's head, MSVC 14.51, llvm-mc 23.1.6): pass. |
|
Tested 3b7cbf4 on NVIDIA GeForce RTX 3090 (Ampere, subgroup 32..32), driver 610.88 (Vulkan 1.4.341), Windows 11 Pro 26300: pass. The PR's diff applied cleanly to
|
|
The fix is already on
AI-assisted (Claude Code). |
|
Tested
Counts differ from my #166 entry (main) because this branch is based on |
What and why
D3D-17 follow-up. Claim.
The ExecuteIndirect implementation on main passes offsets relative to D3D12 resources directly to Vulkan. If an argument or count resource is a slice of the backing VkBuffer, Vulkan reads bytes from the wrong location.
Add each binding's backing-buffer offset for fixed-count draw, indexed draw, and dispatch, and for both count-buffer draw variants. Validate the stride, alignment, and argument/count spans in preparation, including overflow after adding the backing-buffer offset. The final record only needs to hold the command bytes.
Tested