Cleanup.
This commit is contained in:
parent
125cb968fc
commit
2c3bd9ce95
2
3rdparty/dxsdk/include/d3dcommon.h
vendored
2
3rdparty/dxsdk/include/d3dcommon.h
vendored
@ -37,7 +37,7 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#if _MSC_VER <= 1600
|
||||
#if defined(_MSC_VER) && _MSC_VER <= 1600
|
||||
#ifndef VS2008_SAL_COMPAT
|
||||
#define VS2008_SAL_COMPAT
|
||||
// BK - SAL compatibility for VS2008
|
||||
|
@ -624,8 +624,6 @@ namespace bgfx { namespace d3d11
|
||||
agsSupported = AGS_SUCCESS == result;
|
||||
if (agsSupported)
|
||||
{
|
||||
AGS_RETURN_CODE result;
|
||||
|
||||
AGSDriverVersionInfo vi;
|
||||
result = agsGetDriverVersionInfo(m_ags, &vi);
|
||||
BX_TRACE(" Driver version: %s", vi.strDriverVersion);
|
||||
@ -643,13 +641,17 @@ namespace bgfx { namespace d3d11
|
||||
{
|
||||
long long memSize;
|
||||
result = agsGetGPUMemorySize(m_ags, ii, &memSize);
|
||||
char memSizeStr[16];
|
||||
bx::prettify(memSizeStr, BX_COUNTOF(memSizeStr), memSize);
|
||||
BX_TRACE(" GPU #%d mem size: %s", ii, memSizeStr);
|
||||
if (AGS_SUCCESS == result)
|
||||
{
|
||||
char memSizeStr[16];
|
||||
bx::prettify(memSizeStr, BX_COUNTOF(memSizeStr), memSize);
|
||||
BX_TRACE(" GPU #%d mem size: %s", ii, memSizeStr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BX_WARN(!agsSupported, "AMD/AGS supported.");
|
||||
if (!agsSupported)
|
||||
{
|
||||
if (NULL != m_ags)
|
||||
@ -661,10 +663,6 @@ namespace bgfx { namespace d3d11
|
||||
bx::dlclose(m_agsdll);
|
||||
m_agsdll = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
BX_TRACE("AMD/AGS supported.");
|
||||
}
|
||||
}
|
||||
|
||||
#if USE_D3D11_DYNAMIC_LIB
|
||||
@ -905,32 +903,6 @@ namespace bgfx { namespace d3d11
|
||||
}
|
||||
}
|
||||
|
||||
multiDrawInstancedIndirect = stubMultiDrawInstancedIndirect;
|
||||
multiDrawIndexedInstancedIndirect = stubMultiDrawIndexedInstancedIndirect;
|
||||
if (NULL != m_ags)
|
||||
{
|
||||
uint32_t flags;
|
||||
AGS_RETURN_CODE result = agsDriverExtensions_Init(m_ags, m_device, &flags);
|
||||
bool hasExtensions = AGS_SUCCESS == result;
|
||||
|
||||
if (hasExtensions
|
||||
&& 0 != (flags & AGS_EXTENSION_MULTIDRAWINDIRECT) )
|
||||
{
|
||||
multiDrawInstancedIndirect = amdAgsMultiDrawInstancedIndirect;
|
||||
multiDrawIndexedInstancedIndirect = amdAgsMultiDrawIndexedInstancedIndirect;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (hasExtensions)
|
||||
{
|
||||
agsDriverExtensions_DeInit(m_ags);
|
||||
}
|
||||
|
||||
agsDeInit(m_ags);
|
||||
m_ags = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
IDXGIDevice* device = NULL;
|
||||
IDXGIAdapter* adapter = NULL;
|
||||
@ -1335,14 +1307,41 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
mbstowcs(s_viewNameW[ii], name, BGFX_CONFIG_MAX_VIEW_NAME_RESERVED);
|
||||
}
|
||||
|
||||
#if !defined(__MINGW32__)
|
||||
if (BX_ENABLED(BGFX_CONFIG_DEBUG)
|
||||
&& NULL != m_infoQueue)
|
||||
{
|
||||
m_infoQueue->SetBreakOnSeverity(D3D11_MESSAGE_SEVERITY_ERROR, true);
|
||||
}
|
||||
#endif // !defined(__MINGW32__)
|
||||
|
||||
{ //
|
||||
multiDrawInstancedIndirect = stubMultiDrawInstancedIndirect;
|
||||
multiDrawIndexedInstancedIndirect = stubMultiDrawIndexedInstancedIndirect;
|
||||
if (NULL != m_ags)
|
||||
{
|
||||
uint32_t flags;
|
||||
AGS_RETURN_CODE result = agsDriverExtensions_Init(m_ags, m_device, &flags);
|
||||
bool hasExtensions = AGS_SUCCESS == result;
|
||||
|
||||
if (hasExtensions
|
||||
&& 0 != (flags & AGS_EXTENSION_MULTIDRAWINDIRECT) )
|
||||
{
|
||||
multiDrawInstancedIndirect = amdAgsMultiDrawInstancedIndirect;
|
||||
multiDrawIndexedInstancedIndirect = amdAgsMultiDrawIndexedInstancedIndirect;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (hasExtensions)
|
||||
{
|
||||
agsDriverExtensions_DeInit(m_ags);
|
||||
}
|
||||
|
||||
agsDeInit(m_ags);
|
||||
m_ags = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
updateMsaa();
|
||||
postReset();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user