diff --git a/README.md b/README.md index 846cad15..3ac2dc86 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,7 @@ The `DXVK_HUD` environment variable controls a HUD which can display the framera - `drawcalls`: Shows the number of draw calls and render passes per frame. - `pipelines`: Shows the total number of graphics and compute pipelines. - `memory`: Shows the amount of device memory allocated and used. +- `version`: Shows DXVK version. Additionally, `DXVK_HUD=1` has the same effect as `DXVK_HUD=devinfo,fps`. diff --git a/src/dxvk/hud/dxvk_hud.cpp b/src/dxvk/hud/dxvk_hud.cpp index f7e43605..176fa5c9 100644 --- a/src/dxvk/hud/dxvk_hud.cpp +++ b/src/dxvk/hud/dxvk_hud.cpp @@ -1,6 +1,7 @@ -#include "dxvk_hud.h" - #include +#include + +#include "dxvk_hud.h" namespace dxvk::hud { @@ -83,6 +84,14 @@ namespace dxvk::hud { void Hud::renderHudElements(const Rc& ctx) { HudPos position = { 8.0f, 24.0f }; + if (m_config.elements.test(HudElement::DxvkVersion)) { + m_renderer.drawText(ctx, 16.0f, + { position.x, position.y }, + { 1.0f, 1.0f, 1.0f, 1.0f }, + "DXVK " DXVK_VERSION); + position.y += 24.0f; + } + if (m_config.elements.test(HudElement::DeviceInfo)) { position = m_hudDeviceInfo.render( ctx, m_renderer, position); diff --git a/src/dxvk/hud/dxvk_hud_config.cpp b/src/dxvk/hud/dxvk_hud_config.cpp index 1c0108df..601349a8 100644 --- a/src/dxvk/hud/dxvk_hud_config.cpp +++ b/src/dxvk/hud/dxvk_hud_config.cpp @@ -12,6 +12,7 @@ namespace dxvk::hud { { "submissions", HudElement::StatSubmissions }, { "pipelines", HudElement::StatPipelines }, { "memory", HudElement::StatMemory }, + { "version", HudElement::DxvkVersion }, }}; diff --git a/src/dxvk/hud/dxvk_hud_config.h b/src/dxvk/hud/dxvk_hud_config.h index 77516dc8..1fc2f248 100644 --- a/src/dxvk/hud/dxvk_hud_config.h +++ b/src/dxvk/hud/dxvk_hud_config.h @@ -18,6 +18,7 @@ namespace dxvk::hud { StatSubmissions = 4, StatPipelines = 5, StatMemory = 6, + DxvkVersion = 7, }; using HudElements = Flags;