|
@@ -165,14 +165,18 @@ void DirectX12::initialize( WFenster *fenster, Vec2<int> backBufferSize, bool fu
|
|
|
D3D12SerializeVersionedRootSignatureFunction d3d12svrsf = (D3D12SerializeVersionedRootSignatureFunction)GetProcAddress( d3d12DLL, "D3D12SerializeVersionedRootSignature" );
|
|
|
D3D12SerializeRootSignatureFunction d3d12srsf = (D3D12SerializeRootSignatureFunction)GetProcAddress( d3d12DLL, "D3D12SerializeRootSignature" );
|
|
|
#ifdef _DEBUG
|
|
|
- D3D12GetDebugInterfaceFunction getDebugInterface = (D3D12GetDebugInterfaceFunction)GetProcAddress( d3d12DLL, "D3D12GetDebugInterface" );
|
|
|
- getDebugInterface( __uuidof( ID3D12Debug ), (void **)&debug );
|
|
|
- debug->EnableDebugLayer();
|
|
|
+ if( debugDX )
|
|
|
+ {
|
|
|
+ D3D12GetDebugInterfaceFunction getDebugInterface = (D3D12GetDebugInterfaceFunction)GetProcAddress( d3d12DLL, "D3D12GetDebugInterface" );
|
|
|
+ getDebugInterface( __uuidof(ID3D12Debug), (void**)&debug );
|
|
|
+ debug->EnableDebugLayer();
|
|
|
+ }
|
|
|
#endif
|
|
|
IDXGIFactory4 *factory;
|
|
|
UINT createFactoryFlags = 0;
|
|
|
#if defined(_DEBUG)
|
|
|
- createFactoryFlags = DXGI_CREATE_FACTORY_DEBUG;
|
|
|
+ if( debugDX )
|
|
|
+ createFactoryFlags = DXGI_CREATE_FACTORY_DEBUG;
|
|
|
#endif
|
|
|
HRESULT res = createFactory( createFactoryFlags, __uuidof( IDXGIFactory4 ), (void **)&factory );
|
|
|
if( FAILED( res ) )
|