Batch buffer_ops dispatches and avoid duplicate D3D12 device creation #137
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!137
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/137/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?
@PrivacyOnion on GitHub · 2026-11-21 16:52 UTC · original
PrivacyOnion:batch-buffer-ops-and-single-device→main· +133 −68 · 2 files · 1 commits · merged 2026-11-21 17:57 UTC## Change
tests/offscreen_check.cpp:ComPtr<ID3D12Device>directly insideselect_adapter(usingdevice_factory->CreateDevicewhenOFFSCREEN_AGILITY_620is enabled orD3D12CreateDeviceotherwise) instead of probing hardware adapters withD3D12CreateDevice(..., nullptr)and then creating the device a second time inmain().tests/buffer_ops.cpp:upload((case_count + 1) * sizeof(Words)),output(sizeof(Words)), andreadback(case_count * sizeof(Words)) buffers once incheck_buffer_opsand record all 26CopyBlocks,FillBlocks,NumberBlocks,CopySpan, andResetBoundscases into a singleComputeCommandscommand list before callingsubmit_and_waitand verifying all 26 readback slices.CreateCommittedResourcecalls and 26 separateComputeCommandsqueues, allocators, command lists, fences, and CPU-GPU sync waits with a single submission (bvh_buffer_ops_hardwaredrops from1.07sto0.34s;bvh_buffer_ops_warpdrops from0.13sto0.05s).Verification
@R0Y00 on GitHub · 2026-11-21 17:17 UTC · original
Please coordinate with #116 before landing the select_adapter rewrite. Rebase the device-selection change after #116 and verify explicit adapter selection, WARP and the batched buffer-ops results together.
@PrivacyOnion on GitHub · 2026-11-21 17:50 UTC · original
Rebased onto
mainand integrated theXBOX2WINDOWS_ADAPTERsubstring filter from #116 intoselect_adapter:XBOX2WINDOWS_ADAPTERis unset or matchesdesc.Description(case-insensitive),select_adaptercreates and retains theComPtr<ID3D12Device>once on that adapter.XBOX2WINDOWS_ADAPTERdoes not match a D3D12 hardware adapter, it probes support without allocating a full device, logsXBOX2WINDOWS_ADAPTER: skipping <Description>, and fails withNo D3D12 hardware adapter matches XBOX2WINDOWS_ADAPTER=<filter>if no adapter matches.Verified explicit adapter selection (
XBOX2WINDOWS_ADAPTER="RTX 5070"and unmatchedXBOX2WINDOWS_ADAPTER="no adapter has this name"),WARP, and the batched 26-casebuffer_opsrun together: