d3d12_xs: opt-in GPU-based validation with TOMBOX_D3D12_GBV=1 #348
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/348"
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 omonkeyz/xbox-emulator. Originally posted by GDAgent on 2026-11-23T23:19:00Z.
Library / area: d3d12_xs, debug-layer setup (
lib.rs,maybe_enable_debug_layer)What it does
With the D3D12 debug layer enabled (
TOMBOX_D3D12_DEBUG),TOMBOX_D3D12_GBV=1(oron) additionally queriesID3D12Debug1and callsSetEnableGPUBasedValidation(TRUE)before the device is created. The compat log says whether it was enabled or why not (ID3D12Debug1 unavailable hr=...). Without the variable nothing changes; it is a diagnostic switch, off by default.Why
GPU-based validation sees what the CPU-side debug layer cannot: descriptors and views as shaders actually use them. On The Matrix Awakens (native Windows 11; not run under Proton; RDNA2) it reported 26
GPU_BASED_VALIDATION_STRUCTURED_BUFFER_STRIDE_MISMATCHerrors between the title's buffer views and the translated shaders' element types, which led to #346 and #347 (0 errors after both).Tests
gbv_tests::gbv_is_opt_in:1/onenable it; unset,0,off,yesdo not.gbv_tests::debug1_iid_is_the_sdk_layers_value:ID3D12Debug1={affaa4ca-63fe-4d8e-b8ad-159000af4304}.Limits
docs/BLOCKERS.mdnotes hosts whereD3D12GetDebugInterfacefails (Graphics Tools / Developer Mode); there the switch logs nothing extra and changes nothing.Imported from omonkeyz/xbox-emulator. Originally posted by omonkeyz on 2026-11-25T13:50:35Z.
Applied on main in
0e6bde2(cherry-picked onto the current history with your authorship kept; comment lines stripped per CONTRIBUTING). Thank you.Pull request closed