Batch buffer_ops dispatches and avoid duplicate D3D12 device creation #136
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/137"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by PrivacyOnion on 2026-11-21T16:52:50Z.
## 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
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T17:17:42Z.
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.
Imported from R0Y00/Xbox2Windows. Originally posted by PrivacyOnion on 2026-11-21T17:50:18Z.
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: