protonscr

Question: retrieve framerate externally

dxvkclosed
doitsujin/dxvk#1223 · opened 2019-10-12 by DjebbZ · updated 2019-10-14 · 14 comments · github
DDjebbZ 2019-10-12 github

Hello,

I'd like to benchmark/fine tune my machine and was wondering if it's possible to retrieve the framerate (what DXVK_HUD=fps displays) from an external program while a game is running. Maybe written to a file ? To some Unix pipe ? Anything. I'd rather have the fps as data in real time rather than just observing the fps HUD with my eyes.

Thanks in advance!

Mmisyltoad 2019-10-12 github

This isn't what the DXVK HUD is intended for, and is very feature creepy.

There are probably some Vulkan layers out there that can do what you want.

DDjebbZ 2019-10-12 github

I know the dxvk_hud is just a graphical overlay. I was just wondering if
the framerate was accessible in another way. If not that's okay.

What do you mean other vulkan layers ? Are there other ways to translate
DirectX to Vulkan in wine?

On Sat, Oct 12, 2019, 2:19 PM JosBOOa Ashton [email protected]
wrote:

This isn't what the DXVK HUD is intended for, and is very feature creepy.

There are probably some Vulkan layers out there that can do what you want.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/doitsujin/dxvk/issues/1223?email_source=notifications&email_token=AAAS3XQ6QMZOMM5BJI52TGDQOG6GZA5CNFSM4JACUIGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBB6E6Y#issuecomment-541319803,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAS3XW2JE2QHHIG4KJTMGTQOG6GZANCNFSM4JACUIGA
.

DDjebbZ 2019-10-12 github

Or other applications that I could use to execute benchmarks?

On Sat, Oct 12, 2019, 5:02 PM Khalid Jebbari [email protected]
wrote:

I know the dxvk_hud is just a graphical overlay. I was just wondering if
the framerate was accessible in another way. If not that's okay.

What do you mean other vulkan layers ? Are there other ways to translate
DirectX to Vulkan in wine?

On Sat, Oct 12, 2019, 2:19 PM JosBOOa Ashton [email protected]
wrote:

This isn't what the DXVK HUD is intended for, and is very feature creepy.

There are probably some Vulkan layers out there that can do what you want.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/doitsujin/dxvk/issues/1223?email_source=notifications&email_token=AAAS3XQ6QMZOMM5BJI52TGDQOG6GZA5CNFSM4JACUIGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBB6E6Y#issuecomment-541319803,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAS3XW2JE2QHHIG4KJTMGTQOG6GZANCNFSM4JACUIGA
.

OOschowa 2019-10-12 github

You can use the Mesa vulkan overlay to log statistics to a file. (Yes, it also works with nvidia or any other vulkan driver)
https://gitlab.freedesktop.org/mesa/mesa/tree/master/src/vulkan/overlay-layer

KK0bin maintainer 2019-10-12 github

What do you mean other vulkan layers ? Are there other ways to translate
DirectX to Vulkan in wine?

Vulkan has a system called layers that allows for hooking Vulkan function calls. It can be used to build a HUD similar to the DXVK hud or something like RivaTuner on Windows. It's also what the Mesa Vulkan Overlay uses which is why that also works with Nvidia drivers. This has nothing to do with Wine or Direct3D.

DDjebbZ 2019-10-12 github

Your answers are deeply appreciated since I'm no 3d/gfx/c/c++ dev at all. If understand correctly, after installing mesa-overlay, and given a working installation of wine and dxvk I can run something like

VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay VK_LAYER_MESA_OVERLAY_CONFIG=fps,output_file=/path/to/file wine witcher3.exe

And get the framerate written to the file?

OOschowa 2019-10-12 github

Yes, that should work.

DDjebbZ 2019-10-12 github

Can't wait to test! Will report here (just need to to understand how to use
meson to build mesa-overlay since there's no package for my distribution
(Arch)...)

On Sat, Oct 12, 2019, 11:06 PM Oschowa [email protected] wrote:

Yes, that should work.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/doitsujin/dxvk/issues/1223?email_source=notifications&email_token=AAAS3XWJWJ2IJEIUWUCAUILQOI34XA5CNFSM4JACUIGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBCIKIY#issuecomment-541361443,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAS3XS4BJPTAIBYGERUYEDQOI34XANCNFSM4JACUIGA
.

OOschowa 2019-10-12 github
DDjebbZ 2019-10-13 github

I saw this package but since it's not named "mesa-overlay" I thought it was
something else. I hope to find time to test this today.

On Sun, Oct 13, 2019, 1:47 AM Oschowa [email protected] wrote:

There actually is a Arch package:
https://www.archlinux.org/packages/extra/x86_64/vulkan-mesa-layer/


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/doitsujin/dxvk/issues/1223?email_source=notifications&email_token=AAAS3XTCC73E23G2VMCGZTTQOJOYHA5CNFSM4JACUIGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBCKPFA#issuecomment-541370260,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAS3XQLMHVFLDBQGYN3Q7DQOJOYHANCNFSM4JACUIGA
.

GGuy1524 2019-10-13 github

Another solution would be to parse the output of +fps

DDjebbZ 2019-10-13 github

I'm happy to report that the command I wrote above works perfectly :) Thank you guys you rock.

Can I ask you about the file format? It looks like (truncated and added some comments)

> head code/etc/dxvk-fps/fps.txt
fps, frame_timing(us)
0.57, 3522743
# game menu, extremely high fps but doesn't matter
1340.50, 500559
1499.53, 500158
1448.54, 500503
# ... more of them
# loading screen, doesn't matter too
32.01, 531114
32.11, 529402
32.18, 528306
# ... more of them
# in-game data
61.45, 504513
60.82, 509711
61.53, 503853

I perfectly understand the 1st column it's the framerate, but what exactly is this frame_timing (us)? It doesn't look like the time it took to render the frame, because for 60fps each frame would be approximately 16.6ms, i.e. 16666 micro-seconds.

OOschowa 2019-10-14 github

Looks like the second value is the fps sampling period (0,5s) and not the frametime.

DDjebbZ 2019-10-14 github

Makes sense, it's always the same value for all lines (approximately half a
second).

Thanks everyone, your support is awesome, keep up the good work with dxvk
and long live open source!

On Mon, Oct 14, 2019, 11:09 AM Oschowa [email protected] wrote:

Looks like the second value is the fps sampling period (0,5s) and not the
frametime.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/doitsujin/dxvk/issues/1223?email_source=notifications&email_token=AAAS3XTKWOC25S3CHLHMTJTQOQZMBA5CNFSM4JACUIGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBD2VCQ#issuecomment-541567626,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAS3XS5BGR754CGT4QRX2LQOQZMBANCNFSM4JACUIGA
.

Launch options

Upstream links