dxvk icon indicating copy to clipboard operation
dxvk copied to clipboard

[hud] Display build time on dirty working trees

Open AlpyneDreams opened this issue 3 years ago • 3 comments

Due to popular request, here's a simple single commit to make debugging DXVK substantially easier based on what I'm currently doing in D8VK. If the working tree is dirty ('+' in the version on the HUD), the compile date and time of the current frontend are shown on the HUD. This helps us check if builds installed correctly and how long builds took, among other things.

Here is an example (looks similar for other APIs on DXVK 2.0): image

This also allows changing the D3D9 API name if desired, which is useful for D3D8 and lower. It is included simply to avoid merge conflicts and because there are many use cases (9Ex vs. 9, DXVK Native, D3D8, etc.).

AlpyneDreams avatar Nov 11 '22 18:11 AlpyneDreams

Exposing the API name thing is fine, but having date/time is bad because it breaks reproducible builds.

misyltoad avatar Nov 12 '22 09:11 misyltoad

I recommend exposing the API name thing the same way we do for DX10.

misyltoad avatar Nov 12 '22 09:11 misyltoad

Exposing the API name thing is fine, but having date/time is bad because it breaks reproducible builds.

I recommend exposing the API name thing the same way we do for DX10.

I have modified it so that the date and timestamp is only included if the working tree is dirty. I removed the SetAPIName thing from D3D9 as that was a leftover from d8vk.

AlpyneDreams avatar Nov 12 '22 14:11 AlpyneDreams

I have modified it so that the date and timestamp is only included if the working tree is dirty.

Hey Alpyne, I think removing the date/timestamp for dirty trees too, that didn't seem interesting, for I agree with what Josh said it breaks reproducible builds.

ViNi-Arco avatar Nov 14 '22 01:11 ViNi-Arco

I have modified it so that the date and timestamp is only included if the working tree is dirty.

Hey Alpyne, I think removing the date/timestamp for dirty trees too, that didn't seem interesting, for I agree with what Josh said it breaks reproducible builds.

Non-timestamped builds can be reproduced by building with a non-dirty tree or by adding && 0 to line 5 of version.h.in. As far as I know there aren't usually cases where dirty tree builds have needed to be reproduced precisely, but correct me if I'm wrong.

If people want I can add a meson option for timestamping that's off by default too, or I can just close this PR. Up to the maintainers. I only made this PR at @K0bin's suggestion, otherwise I would probably have left it downstream in d8vk.

AlpyneDreams avatar Nov 14 '22 10:11 AlpyneDreams

I think it's useful but I'm not overly attached to the idea.

K0bin avatar Nov 14 '22 10:11 K0bin

If people want I can add a meson option for timestamping that's off by default

Good idea, I like it, an option for that, I think I would even use :relaxed:

ViNi-Arco avatar Nov 14 '22 11:11 ViNi-Arco

Added as an option :)

Run meson configure -Dbuild_date=true <build dir> to enable it or set it to always if you don't care if the working tree is dirty (although at that point you can just go by commit ID).

AlpyneDreams avatar Nov 14 '22 12:11 AlpyneDreams

Sup @AlpyneDreams, did you build the DXVK with this modification you made?

GCC-Mingw and CLANG-Mingw do not build DXVK with your Patch..

GCC-Mingw: GCC dxvk hud patch

CLANG-Mingw: patch HUD fail clang

And you will have to Bump the required meson version to >=0.55 Aviso Meson DXVK

ViNi-Arco avatar Nov 20 '22 05:11 ViNi-Arco