This commit is contained in:
Branimir Karadžić 2015-03-31 22:01:50 -07:00
parent 8a367819e6
commit 8f3708fe28
2 changed files with 28 additions and 23 deletions

View File

@ -543,6 +543,8 @@ namespace bgfx { namespace d3d11
g_caps.gpu[ii].deviceId = (uint16_t)desc.DeviceId;
++g_caps.numGPUs;
if (NULL == m_adapter)
{
if ( (BGFX_PCI_ID_NONE != g_caps.vendorId || 0 != g_caps.deviceId)
&& (BGFX_PCI_ID_NONE == g_caps.vendorId || desc.VendorId == g_caps.vendorId)
&& ( 0 == g_caps.deviceId || desc.DeviceId == g_caps.deviceId) )
@ -559,6 +561,7 @@ namespace bgfx { namespace d3d11
m_driverType = D3D_DRIVER_TYPE_REFERENCE;
}
}
}
DX_RELEASE(adapter, adapter == m_adapter ? 1 : 0);
}

View File

@ -380,6 +380,8 @@ namespace bgfx { namespace d3d9
g_caps.gpu[ii].vendorId = (uint16_t)desc.VendorId;
g_caps.gpu[ii].deviceId = (uint16_t)desc.DeviceId;
if (D3DADAPTER_DEFAULT == m_adapter)
{
if ( (BGFX_PCI_ID_NONE != g_caps.vendorId || 0 != g_caps.deviceId)
&& (BGFX_PCI_ID_NONE == g_caps.vendorId || desc.VendorId == g_caps.vendorId)
&& ( 0 == g_caps.deviceId || desc.DeviceId == g_caps.deviceId) )
@ -387,13 +389,13 @@ namespace bgfx { namespace d3d9
m_adapter = ii;
}
#if BGFX_CONFIG_DEBUG_PERFHUD
if (0 != strstr(desc.Description, "PerfHUD") )
if (BX_ENABLED(BGFX_CONFIG_DEBUG_PERFHUD)
&& 0 != strstr(description, "PerfHUD"))
{
m_adapter = ii;
m_deviceType = D3DDEVTYPE_REF;
}
#endif // BGFX_CONFIG_DEBUG_PERFHUD
}
}
}