From 80bee4959cf61e83e7c90d84511ae2922b5a9b10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sat, 11 Jul 2026 21:07:10 -0700 Subject: [PATCH] Added example name to title bar. Added WebGPU vendor info. (#3820) --- examples/common/entry/entry.cpp | 7 +++++++ src/renderer_webgpu.cpp | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/examples/common/entry/entry.cpp b/examples/common/entry/entry.cpp index 35009c18e..6eba5c428 100644 --- a/examples/common/entry/entry.cpp +++ b/examples/common/entry/entry.cpp @@ -539,6 +539,13 @@ BX_PRAGMA_DIAGNOSTIC_POP(); { setWindowSize(kDefaultWindowHandle, s_width, s_height); + bx::FilePath fp(_argv[0]); + char title[bx::kMaxFilePath]; + const bx::StringView exeName(fp.getBaseName() ); + + bx::snprintf(title, BX_COUNTOF(title), "%S - %s", &exeName, _app->getName() ); + setWindowTitle(kDefaultWindowHandle, title); + _app->init(_argc, _argv, s_width, s_height); bgfx::frame(); diff --git a/src/renderer_webgpu.cpp b/src/renderer_webgpu.cpp index 1a3c34022..a5942b97f 100644 --- a/src/renderer_webgpu.cpp +++ b/src/renderer_webgpu.cpp @@ -1305,6 +1305,10 @@ WGPU_IMPORT BX_TRACE("\t VendorId: %x", adapterInfo.vendorID); BX_TRACE("\t DeviceId: %x", adapterInfo.deviceID); + m_webgpuInfo.set(toStringView(adapterInfo.architecture) ); + m_webgpuInfo.append(" / "); + m_webgpuInfo.append(s_backendType[bx::min(adapterInfo.backendType, BX_COUNTOF(s_backendType)-1)]); + BX_TRACE("\tBackend type (%x): %s" , adapterInfo.backendType , s_backendType[bx::min(adapterInfo.backendType, BX_COUNTOF(s_backendType)-1)] @@ -3355,7 +3359,8 @@ WGPU_IMPORT OcclusionQueryWGPU m_occlusionQuery; ChunkedScratchBufferWGPU m_uniformScratchBuffer; - WGPULimits m_limits; + bx::FixedString256 m_webgpuInfo; + WGPULimits m_limits; uint32_t m_maxFrameLatency; CommandQueueWGPU m_cmd; @@ -6689,6 +6694,8 @@ m_resolution.formatColor = TextureFormat::BGRA8; , BGFX_API_VERSION , BGFX_REV_NUMBER ); + const bx::StringView str = m_webgpuInfo; + tvm.printf(0, pos++, 0x8f, " WebGPU vendor info: %S ", &str); pos = 10; tvm.printf(10, pos++, 0x8b, " Frame: % 7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS "