forked from MoonsideGames/Refresh
Compare commits
2 Commits
30fe868ea2
...
10cbac3fc3
Author | SHA1 | Date |
---|---|---|
Caleb Cornett | 10cbac3fc3 | |
Caleb Cornett | 7f70318f70 |
|
@ -622,7 +622,11 @@ static void D3D11_DestroyDevice(
|
||||||
/* Report leaks and clean up debug objects */
|
/* Report leaks and clean up debug objects */
|
||||||
if (renderer->dxgiDebug)
|
if (renderer->dxgiDebug)
|
||||||
{
|
{
|
||||||
IDXGIDebug_ReportLiveObjects(renderer->dxgiDebug, D3D_IID_DXGI_DEBUG_ALL, DXGI_DEBUG_RLO_ALL);
|
IDXGIDebug_ReportLiveObjects(
|
||||||
|
renderer->dxgiDebug,
|
||||||
|
D3D_IID_DXGI_DEBUG_ALL,
|
||||||
|
DXGI_DEBUG_RLO_SUMMARY | DXGI_DEBUG_RLO_DETAIL
|
||||||
|
);
|
||||||
IDXGIDebug_Release(renderer->dxgiDebug);
|
IDXGIDebug_Release(renderer->dxgiDebug);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2992,7 +2996,7 @@ static uint8_t D3D11_PrepareDriver(
|
||||||
) {
|
) {
|
||||||
void *d3d11_dll, *d3dcompiler_dll, *dxgi_dll;
|
void *d3d11_dll, *d3dcompiler_dll, *dxgi_dll;
|
||||||
PFN_D3D11_CREATE_DEVICE D3D11CreateDeviceFunc;
|
PFN_D3D11_CREATE_DEVICE D3D11CreateDeviceFunc;
|
||||||
D3D_FEATURE_LEVEL levels[] = { D3D_FEATURE_LEVEL_11_0 };
|
D3D_FEATURE_LEVEL levels[] = { D3D_FEATURE_LEVEL_11_1 };
|
||||||
PFN_D3DCOMPILE D3DCompileFunc;
|
PFN_D3DCOMPILE D3DCompileFunc;
|
||||||
PFN_CREATE_DXGI_FACTORY1 CreateDXGIFactoryFunc;
|
PFN_CREATE_DXGI_FACTORY1 CreateDXGIFactoryFunc;
|
||||||
HRESULT res;
|
HRESULT res;
|
||||||
|
@ -3114,7 +3118,6 @@ static void D3D11_INTERNAL_TryInitializeDXGIDebug(D3D11Renderer *renderer)
|
||||||
Refresh_LogWarn("Could not get IDXGIDebug interface");
|
Refresh_LogWarn("Could not get IDXGIDebug interface");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: Actually do something with the info queue! */
|
|
||||||
res = DXGIGetDebugInterfaceFunc(&D3D_IID_IDXGIInfoQueue, &renderer->dxgiInfoQueue);
|
res = DXGIGetDebugInterfaceFunc(&D3D_IID_IDXGIInfoQueue, &renderer->dxgiInfoQueue);
|
||||||
if (FAILED(res))
|
if (FAILED(res))
|
||||||
{
|
{
|
||||||
|
@ -3277,6 +3280,31 @@ tryCreateDevice:
|
||||||
);
|
);
|
||||||
ERROR_CHECK_RETURN("Could not get ID3D11Device1 interface", NULL);
|
ERROR_CHECK_RETURN("Could not get ID3D11Device1 interface", NULL);
|
||||||
|
|
||||||
|
/* Release the old device interface, we don't need it anymore */
|
||||||
|
ID3D11Device_Release(d3d11Device);
|
||||||
|
|
||||||
|
/* Set up the info queue */
|
||||||
|
if (renderer->dxgiInfoQueue)
|
||||||
|
{
|
||||||
|
DXGI_INFO_QUEUE_MESSAGE_SEVERITY sevList[] =
|
||||||
|
{
|
||||||
|
DXGI_INFO_QUEUE_MESSAGE_SEVERITY_CORRUPTION,
|
||||||
|
DXGI_INFO_QUEUE_MESSAGE_SEVERITY_ERROR,
|
||||||
|
DXGI_INFO_QUEUE_MESSAGE_SEVERITY_WARNING,
|
||||||
|
// DXGI_INFO_QUEUE_MESSAGE_SEVERITY_INFO, /* This can be a bit much, so toggle as needed for debugging. */
|
||||||
|
DXGI_INFO_QUEUE_MESSAGE_SEVERITY_MESSAGE
|
||||||
|
};
|
||||||
|
DXGI_INFO_QUEUE_FILTER filter = { 0 };
|
||||||
|
filter.AllowList.NumSeverities = SDL_arraysize(sevList);
|
||||||
|
filter.AllowList.pSeverityList = sevList;
|
||||||
|
|
||||||
|
IDXGIInfoQueue_PushStorageFilter(
|
||||||
|
renderer->dxgiInfoQueue,
|
||||||
|
D3D_IID_DXGI_DEBUG_ALL,
|
||||||
|
&filter
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/* Print driver info */
|
/* Print driver info */
|
||||||
Refresh_LogInfo("Refresh Driver: D3D11");
|
Refresh_LogInfo("Refresh Driver: D3D11");
|
||||||
Refresh_LogInfo("D3D11 Adapter: %S", adapterDesc.Description);
|
Refresh_LogInfo("D3D11 Adapter: %S", adapterDesc.Description);
|
||||||
|
|
Loading…
Reference in New Issue