mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2025-02-17 20:31:57 -05:00
DX9: Added device info to debug display.
This commit is contained in:
parent
a33175cf6a
commit
80282277a9
1 changed files with 11 additions and 6 deletions
|
@ -295,10 +295,9 @@ namespace bgfx
|
||||||
#endif // BGFX_CONFIG_DEBUG_PERFHUD
|
#endif // BGFX_CONFIG_DEBUG_PERFHUD
|
||||||
}
|
}
|
||||||
|
|
||||||
D3DADAPTER_IDENTIFIER9 identifier;
|
DX_CHECK(m_d3d9->GetAdapterIdentifier(m_adapter, 0, &m_identifier) );
|
||||||
DX_CHECK(m_d3d9->GetAdapterIdentifier(m_adapter, 0, &identifier) );
|
m_amd = m_identifier.VendorId == 0x1002;
|
||||||
m_amd = identifier.VendorId == 0x1002;
|
m_nvidia = m_identifier.VendorId == 0x10de;
|
||||||
m_nvidia = identifier.VendorId == 0x10de;
|
|
||||||
|
|
||||||
uint32_t behaviorFlags[] =
|
uint32_t behaviorFlags[] =
|
||||||
{
|
{
|
||||||
|
@ -875,6 +874,7 @@ namespace bgfx
|
||||||
D3DDEVTYPE m_deviceType;
|
D3DDEVTYPE m_deviceType;
|
||||||
D3DPRESENT_PARAMETERS m_params;
|
D3DPRESENT_PARAMETERS m_params;
|
||||||
uint32_t m_flags;
|
uint32_t m_flags;
|
||||||
|
D3DADAPTER_IDENTIFIER9 m_identifier;
|
||||||
|
|
||||||
bool m_initialized;
|
bool m_initialized;
|
||||||
bool m_amd;
|
bool m_amd;
|
||||||
|
@ -2772,8 +2772,13 @@ namespace bgfx
|
||||||
double toMs = 1000.0/freq;
|
double toMs = 1000.0/freq;
|
||||||
|
|
||||||
tvm.clear();
|
tvm.clear();
|
||||||
uint16_t pos = 10;
|
uint16_t pos = 0;
|
||||||
tvm.printf(0, 0, BGFX_CONFIG_DEBUG ? 0x89 : 0x8f, " " BGFX_RENDERER_NAME " ");
|
tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x89 : 0x8f, " " BGFX_RENDERER_NAME " ");
|
||||||
|
|
||||||
|
const D3DADAPTER_IDENTIFIER9& identifier = s_renderCtx.m_identifier;
|
||||||
|
tvm.printf(0, pos++, 0x0f, "Device: %s (%s)", identifier.Description, identifier.Driver);
|
||||||
|
|
||||||
|
pos = 10;
|
||||||
tvm.printf(10, pos++, 0x8e, " Frame: %7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS"
|
tvm.printf(10, pos++, 0x8e, " Frame: %7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS"
|
||||||
, double(frameTime)*toMs
|
, double(frameTime)*toMs
|
||||||
, double(min)*toMs
|
, double(min)*toMs
|
||||||
|
|
Loading…
Reference in a new issue