Dxvk: Feature enhancement : DXVK HUD place and DXVK version reporting in DXVK HUD 1 option

Created on 8 Jul 2018  路  12Comments  路  Source: doitsujin/dxvk

Hi , i wish i could help you with that request but i'm just an end-user. So these are just suggestions actually.

1-) DXVK hud appears on top left on screen , that makes some info pop up-s on games ( GTA5 ) nearly invisible. Due to i'm a new GTA5 user and still need guidance on some missions , yet i have also a bad habit like checking fps always that situation makes also gaming and checking fps unbearable.

2-) I sometimes grab screenshots at some certain areas with games. I'm also a member of a local Linux community site and planning to inform about " What is DXVK and how you can use it simply ? " to help some people who are willing to use Linux but can't stop dual booting because of Windows only games that runs really slow with WineGL. I'm planning to keep that topic up-to-date just like our native Linux games topic.

So i'm gonna report every new release with performance improvements etc. As you can guess , people have short attention span usually. So reporting visually makes it more visible rather than text.

I know you have lot of tasks going on , maybe you can consider them in future.

Thanks.

Most helpful comment

@Leopard1907 The DXVK HUD mostly exists for debugging and performance testing purposes. It isn't meant to be a particularly end user-friendly solution with all sorts of configuration options and ways to look fancy, and I really don't want any feature creep in there.

This whole HUD discussion came up in the past (see #105), and as I mentioned there, such a thing would best be implemented as a separate project in the form of a Vulkan layer, which would make it useful for all Vulkan games, not just DXVK.

I do agree that logging and showing the DXVK version is somewhat useful, see the discussion in #490. Changing size/position/colors/whatever, not so much.

All 12 comments

Can the commit version be shown even in the HUD? I was pretty sure DXVK is completely unaware of what version or commit it is.

It would be nice if it could say Build: 0.61+ (xxcommitxx) but I doubt it's easy to do.
_(there is a binary version number in the readme btw, but not useful for bug reporting since you need to know which commit it is)_

It's actually pretty easy to do, the only thing needed is line in HUD and -D-variable from build system.

Simplified variant (prints e.g. DXVK: d91041f):

diff --git a/meson.build b/meson.build
index 5349c64..03b7dc6 100644
--- a/meson.build
+++ b/meson.build
@@ -5,6 +5,10 @@ cpu_family = target_machine.cpu_family()
 dxvk_compiler = meson.get_compiler('cpp')
 dxvk_cpp_std  = 'c++1z'

+# DXVK version
+dxvk_ver = run_command('git', 'rev-parse', '--short', 'HEAD').stdout().strip()
+add_project_arguments('-DDXVK_VERSION="' + dxvk_ver + '"', language : 'cpp')
+
 # MSVC
 if dxvk_compiler.get_id() == 'msvc'
   add_project_arguments('-DNOMINMAX', language : 'cpp')

diff --git a/src/dxvk/hud/dxvk_hud_devinfo.cpp b/src/dxvk/hud/dxvk_hud_devinfo.cpp
index 4b1604d..964784f 100644
--- a/src/dxvk/hud/dxvk_hud_devinfo.cpp
+++ b/src/dxvk/hud/dxvk_hud_devinfo.cpp
@@ -13,6 +13,9 @@ namespace dxvk::hud {
       VK_VERSION_MAJOR(props.apiVersion), ".",
       VK_VERSION_MINOR(props.apiVersion), ".",
       VK_VERSION_PATCH(props.apiVersion));
+#ifdef DXVK_VERSION
+    m_dxvkVer   = str::format("DXVK:   ", std::string(DXVK_VERSION));
+#endif
   }


@@ -40,7 +43,17 @@ namespace dxvk::hud {
       { 1.0f, 1.0f, 1.0f, 1.0f },
       m_vulkanVer);

+#ifdef DXVK_VERSION
+    renderer.drawText(context, 16.0f,
+      { position.x, position.y + 64 },
+      { 1.0f, 1.0f, 1.0f, 1.0f },
+      m_dxvkVer);
+
+    return HudPos { position.x, position.y + 88 };
+#else
     return HudPos { position.x, position.y + 68 };
+#endif
+
   }

 }
\ No newline at end of file
diff --git a/src/dxvk/hud/dxvk_hud_devinfo.h b/src/dxvk/hud/dxvk_hud_devinfo.h
index 43da890..d609b02 100644
--- a/src/dxvk/hud/dxvk_hud_devinfo.h
+++ b/src/dxvk/hud/dxvk_hud_devinfo.h
@@ -27,6 +27,7 @@ namespace dxvk::hud {
     std::string m_deviceName;
     std::string m_driverVer;
     std::string m_vulkanVer;
+    std::string m_dxvkVer;

   };

@pchome Thanks , hope that gets accepted.

Anyway to place DXVK HUD at the other corners of screen , just like Steam Overlay did?

@Leopard1907 The DXVK HUD mostly exists for debugging and performance testing purposes. It isn't meant to be a particularly end user-friendly solution with all sorts of configuration options and ways to look fancy, and I really don't want any feature creep in there.

This whole HUD discussion came up in the past (see #105), and as I mentioned there, such a thing would best be implemented as a separate project in the form of a Vulkan layer, which would make it useful for all Vulkan games, not just DXVK.

I do agree that logging and showing the DXVK version is somewhat useful, see the discussion in #490. Changing size/position/colors/whatever, not so much.

@doitsujin Sure , that was just a suggestion like i said.

DXVK version reporting is going to be really helpful , at least for my use case. Also can be helpful for DXVK Youtube people. Thanks for considering it.

I had a quick look at Vulkan Layer Factory several month ago, and wanted to try combine DXVK HUD code with this. But I have no idea is mixing DXVK and Vulkan licenses legal. And who will support this.

It looks like not so hard to create such layer, there is memory usage stats example and fps counter example (Monitor layer prints FPS in application title bar).

As far as the DXVK license goes, you can do almost anything you want with it

Implemented in latest master. Enable with DXVK_HUD=version.

@doitsujin Thanks but feel free to correct me:

DXVK_HUD=version also has same features included in DXVK_HUD=1 or not and just shows version?

Version only. Just set it to version,devinfo,fps to get the other two as well.

@doitsujin Got it , thanks again.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pingubot picture pingubot  路  112Comments

oangelo picture oangelo  路  53Comments

SveSop picture SveSop  路  133Comments

shmerl picture shmerl  路  90Comments

doitsujin picture doitsujin  路  236Comments