From e878147cf9a747a70977cc58c8ce09a3d051eaa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Mon, 5 Oct 2020 19:45:22 -0700 Subject: [PATCH] Added version info to debug stats. --- src/bgfx.cpp | 1 - src/bgfx_p.h | 1 + src/renderer_d3d11.cpp | 10 ++++++++-- src/renderer_d3d12.cpp | 8 +++++++- src/renderer_d3d9.cpp | 8 +++++++- src/renderer_gl.cpp | 11 +++++++++-- src/renderer_mtl.mm | 8 +++++++- src/renderer_vk.cpp | 8 +++++++- src/renderer_webgpu.cpp | 8 +++++++- 9 files changed, 53 insertions(+), 10 deletions(-) diff --git a/src/bgfx.cpp b/src/bgfx.cpp index 15a703150..2c5d117c4 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -11,7 +11,6 @@ #include #include "topology.h" -#include "version.h" #if BX_PLATFORM_OSX || BX_PLATFORM_IOS # include diff --git a/src/bgfx_p.h b/src/bgfx_p.h index 17f0a1aa6..475ee6cf9 100644 --- a/src/bgfx_p.h +++ b/src/bgfx_p.h @@ -131,6 +131,7 @@ namespace bgfx #include #include "shader.h" #include "vertexlayout.h" +#include "version.h" #define BGFX_CHUNK_MAGIC_TEX BX_MAKEFOURCC('T', 'E', 'X', 0x0) diff --git a/src/renderer_d3d11.cpp b/src/renderer_d3d11.cpp index 34b6c1836..d63a3bc7e 100644 --- a/src/renderer_d3d11.cpp +++ b/src/renderer_d3d11.cpp @@ -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; diff --git a/src/renderer_d3d12.cpp b/src/renderer_d3d12.cpp index 0d7a18667..afd6a2e42 100644 --- a/src/renderer_d3d12.cpp +++ b/src/renderer_d3d12.cpp @@ -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; diff --git a/src/renderer_d3d9.cpp b/src/renderer_d3d9.cpp index 68754a6ef..ce725a147 100644 --- a/src/renderer_d3d9.cpp +++ b/src/renderer_d3d9.cpp @@ -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; diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index 3cf94a8e8..880e9ecff 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -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); diff --git a/src/renderer_mtl.mm b/src/renderer_mtl.mm index d01ae17b7..6cf5fd705 100644 --- a/src/renderer_mtl.mm +++ b/src/renderer_mtl.mm @@ -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; diff --git a/src/renderer_vk.cpp b/src/renderer_vk.cpp index de37b6bc1..a8ab37f2d 100644 --- a/src/renderer_vk.cpp +++ b/src/renderer_vk.cpp @@ -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; diff --git a/src/renderer_webgpu.cpp b/src/renderer_webgpu.cpp index 76a9deb05..8e9475bbf 100644 --- a/src/renderer_webgpu.cpp +++ b/src/renderer_webgpu.cpp @@ -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;