In the next update to Windows, codenamed 19H1, the DirectX12 debug layer adds support for GPU-based validation (GBV) of shader model 6.x (DXIL) as well as the previously supported shader model 5.x (DXBC).
GBV is a GPU timeline validation that modifies and injects validation instructions directly into application shaders. It can provide more detailed validation than is possible using CPU validation alone. In previous Windows releases, GBV modified DXBC shaders to provide validations such as resource state tracking, out-of-bound buffer accesses, uninitialized resource and descriptor bindings, and resource promotion/decay validation. With the 19H1 release, the debug layer provides all these validations for DXIL based shaders as well.
This support is available today in the latest 19H1 builds accessible through the Windows Insider Program.
How to enable GPU-based validation for applications using DXIL shaders
No additional step is needed to enable DXIL GBV. The traditional method is extended to support DXIL based shader patching as well as DXBC:
void EnableShaderBasedValidation() { CComPtr<ID3D12Debug> spDebugController0; CComPtr<ID3D12Debug1> spDebugController1; VERIFY(D3D12GetDebugInterface(IID_PPV_ARGS(&spDebugController0))); VERIFY(spDebugController0->QueryInterface(IID_PPV_ARGS(&spDebugController1))); spDebugController1->SetEnableGPUBasedValidation(true); }
0 comments