Added version info to debug stats.

This commit is contained in:
Бранимир Караџић
2020-10-05 19:45:22 -07:00
parent 766ab668f8
commit e878147cf9
9 changed files with 53 additions and 10 deletions

View File

@@ -11,7 +11,6 @@
#include <bx/mutex.h>
#include "topology.h"
#include "version.h"
#if BX_PLATFORM_OSX || BX_PLATFORM_IOS
# include <objc/message.h>

View File

@@ -131,6 +131,7 @@ namespace bgfx
#include <bimg/bimg.h>
#include "shader.h"
#include "vertexlayout.h"
#include "version.h"
#define BGFX_CHUNK_MAGIC_TEX BX_MAKEFOURCC('T', 'E', 'X', 0x0)

View File

@@ -1018,7 +1018,7 @@ namespace bgfx { namespace d3d11
*
* Moreover, it is actually not desirable to create the backbuffer with an _SRGB format, because that
* is incompatible with the flip presentation model, which is desirable for various reasons including
* player embedding.
* player embedding.
*/
m_scd.format = s_textureFormat[_init.resolution.format].m_fmt;
@@ -6448,11 +6448,17 @@ namespace bgfx { namespace d3d11
tvm.clear();
uint16_t pos = 0;
tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x8c : 0x8f
, " %s.%d (FL %d.%d) / " BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME " "
, " %s.%d (FL %d.%d) / " BX_COMPILER_NAME
" / " BX_CPU_NAME
" / " BX_ARCH_NAME
" / " BX_PLATFORM_NAME
" / Version 1.%d.%d (commit: " BGFX_REV_SHA1 ")"
, getRendererName()
, m_deviceInterfaceVersion
, (m_featureLevel >> 12) & 0xf
, (m_featureLevel >> 8) & 0xf
, BGFX_API_VERSION
, BGFX_REV_NUMBER
);
const DXGI_ADAPTER_DESC& desc = m_dxgi.m_adapterDesc;

View File

@@ -6837,11 +6837,17 @@ namespace bgfx { namespace d3d12
tvm.clear();
uint16_t pos = 0;
tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x8c : 0x8f
, " %s.%d (FL %d.%d) / " BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME " "
, " %s.%d (FL %d.%d) / " BX_COMPILER_NAME
" / " BX_CPU_NAME
" / " BX_ARCH_NAME
" / " BX_PLATFORM_NAME
" / Version 1.%d.%d (commit: " BGFX_REV_SHA1 ")"
, getRendererName()
, m_deviceInterfaceVersion
, (m_featureLevel >> 12) & 0xf
, (m_featureLevel >> 8) & 0xf
, BGFX_API_VERSION
, BGFX_REV_NUMBER
);
const DXGI_ADAPTER_DESC& desc = m_dxgi.m_adapterDesc;

View File

@@ -4450,8 +4450,14 @@ namespace bgfx { namespace d3d9
tvm.clear();
uint16_t pos = 0;
tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x8c : 0x8f
, " %s / " BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME " "
, " %s / " BX_COMPILER_NAME
" / " BX_CPU_NAME
" / " BX_ARCH_NAME
" / " BX_PLATFORM_NAME
" / Version 1.%d.%d (commit: " BGFX_REV_SHA1 ")"
, getRendererName()
, BGFX_API_VERSION
, BGFX_REV_NUMBER
);
const D3DADAPTER_IDENTIFIER9& identifier = m_identifier;

View File

@@ -815,7 +815,7 @@ namespace bgfx { namespace gl
{ "EXT_unpack_subimage", false, true },
{ "EXT_sRGB", false, true }, // GLES2 extension.
{ "EXT_multisampled_render_to_texture", false, true }, // GLES2 extension.
{ "GOOGLE_depth_texture", false, true },
{ "IMG_multisampled_render_to_texture", false, true },
@@ -8216,9 +8216,16 @@ namespace bgfx { namespace gl
tvm.clear();
uint16_t pos = 0;
tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x8c : 0x8f
, " %s / " BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME " "
, " %s / " BX_COMPILER_NAME
" / " BX_CPU_NAME
" / " BX_ARCH_NAME
" / " BX_PLATFORM_NAME
" / Version 1.%d.%d (commit: " BGFX_REV_SHA1 ")"
, getRendererName()
, BGFX_API_VERSION
, BGFX_REV_NUMBER
);
tvm.printf(0, pos++, 0x8f, " Vendor: %s ", m_vendor);
tvm.printf(0, pos++, 0x8f, " Renderer: %s ", m_renderer);
tvm.printf(0, pos++, 0x8f, " Version: %s ", m_version);

View File

@@ -4761,8 +4761,14 @@ namespace bgfx { namespace mtl
tvm.clear();
uint16_t pos = 0;
tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x8c : 0x8f
, " %s / " BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME " "
, " %s / " BX_COMPILER_NAME
" / " BX_CPU_NAME
" / " BX_ARCH_NAME
" / " BX_PLATFORM_NAME
" / Version 1.%d.%d (commit: " BGFX_REV_SHA1 ")"
, getRendererName()
, BGFX_API_VERSION
, BGFX_REV_NUMBER
);
pos = 10;

View File

@@ -7100,8 +7100,14 @@ BX_UNUSED(presentMin, presentMax);
tvm.clear();
uint16_t pos = 0;
tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x8c : 0x8f
, " %s / " BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME " "
, " %s / " BX_COMPILER_NAME
" / " BX_CPU_NAME
" / " BX_ARCH_NAME
" / " BX_PLATFORM_NAME
" / Version 1.%d.%d (commit: " BGFX_REV_SHA1 ")"
, getRendererName()
, BGFX_API_VERSION
, BGFX_REV_NUMBER
);
const VkPhysicalDeviceProperties& pdp = m_deviceProperties;

View File

@@ -4798,8 +4798,14 @@ namespace bgfx { namespace webgpu
tvm.clear();
uint16_t pos = 0;
tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x8c : 0x8f
, " %s / " BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME " "
, " %s / " BX_COMPILER_NAME
" / " BX_CPU_NAME
" / " BX_ARCH_NAME
" / " BX_PLATFORM_NAME
" / Version 1.%d.%d (commit: " BGFX_REV_SHA1 ")"
, getRendererName()
, BGFX_API_VERSION
, BGFX_REV_NUMBER
);
pos = 10;