Add D3D12 test command line parameter to enable GPUVA

This commit is contained in:
baldurk
2019-11-20 18:53:00 +00:00
parent ff309d8c54
commit aa7c2170b9
2 changed files with 17 additions and 0 deletions
+16
View File
@@ -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);
}
}
}
+1
View File
@@ -185,6 +185,7 @@ struct D3D12GraphicsTest : public GraphicsTest
ID3D12ResourcePtr bbTex[2];
uint32_t texIdx = 0;
bool gpuva = false;
IDXGIFactory1Ptr m_Factory;
ID3D12DebugPtr d3d12Debug;