mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-30 19:31:07 +00:00
Add D3D12 test command line parameter to enable GPUVA
This commit is contained in:
@@ -141,6 +141,14 @@ void D3D12GraphicsTest::Prepare(int argc, char **argv)
|
||||
else if(!factory)
|
||||
Avail = "Couldn't create DXGI factory";
|
||||
|
||||
for(int i = 0; i < argc; i++)
|
||||
{
|
||||
if(!strcmp(argv[i], "--gpuva") || !strcmp(argv[i], "--debug-gpu"))
|
||||
{
|
||||
gpuva = true;
|
||||
}
|
||||
}
|
||||
|
||||
m_Factory = factory;
|
||||
}
|
||||
|
||||
@@ -191,6 +199,14 @@ bool D3D12GraphicsTest::Init()
|
||||
if(SUCCEEDED(hr) && d3d12Debug)
|
||||
{
|
||||
d3d12Debug->EnableDebugLayer();
|
||||
|
||||
if(gpuva)
|
||||
{
|
||||
ID3D12Debug1Ptr debug1 = d3d12Debug;
|
||||
|
||||
if(debug1)
|
||||
debug1->SetEnableGPUBasedValidation(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -185,6 +185,7 @@ struct D3D12GraphicsTest : public GraphicsTest
|
||||
ID3D12ResourcePtr bbTex[2];
|
||||
uint32_t texIdx = 0;
|
||||
|
||||
bool gpuva = false;
|
||||
IDXGIFactory1Ptr m_Factory;
|
||||
|
||||
ID3D12DebugPtr d3d12Debug;
|
||||
|
||||
Reference in New Issue
Block a user