Commit Graph

791 Commits

Author SHA1 Message Date
FlightlessMango
848b296477 Display vulkan driver
Co-authored-by: Georg Lehmann <dadschoorse@gmail.com>
2020-05-10 02:22:44 +02:00
FlightlessMango
f3422af562 Param gpu_name 2020-05-10 02:21:39 +02:00
FlightlessMango
1ddcc531ff Get device name from pci.ids and display it 2020-05-10 01:43:08 +02:00
FlightlessMango
ed62155310 Parse pci.ids
Co-authored-by: jackun <jack.un@gmail.com>
2020-05-10 01:40:56 +02:00
FlightlessMango
a2cc14f738 Get deviceID 2020-05-10 01:36:09 +02:00
jackun
beee2b08c7
[OpenGL] Add glXSwapBuffersMscOML and disable XGetGeometry 2020-05-08 22:53:33 +03:00
jackun
9d1b548f69
Merge branch 'master' into develop 2020-05-05 12:01:13 +03:00
FlightlessMango
3f4949f593 Added top-center overlay position 2020-05-04 06:54:25 +02:00
FlightlessMango
03c9d1cd90 We don't need two vk_enum_to_str in shared_library 2020-05-02 23:24:54 +02:00
FlightlessMango
70d7ea4948 Add mangohud_version to shared_library 2020-05-02 23:18:25 +02:00
FlightlessMango
9cf6c502d2 Missing brackets for versions in render_imgui 2020-05-02 20:20:10 +02:00
FlightlessMango
e170e64f9c [Params] Version option 2020-05-02 18:39:39 +02:00
FlightlessMango
0eaba7bb6c Removed obsolete license from params 2020-05-02 17:14:14 +02:00
FlightlessMango
5ee573730a Removed obsolete license from meson.build files 2020-05-02 17:13:04 +02:00
jackun
0ab53a1c06
Move MANGOHUD_PCI_DEV to config file param 'pci_dev'
Relax format requirements as long as it loosely resembles 'domain🚌slot.func' format.
2020-05-02 17:40:05 +03:00
FlightlessMango
bff9958284 Changed pthreads to std::thread 2020-05-01 23:55:21 +02:00
Sporif
c61d25da04 Simplify 'is_blacklisted' function 2020-04-30 16:49:40 +03:00
Sporif
1e1dcd3a98 Fix vulkan driver version shown for Nvidia and Intel on Windows 2020-04-30 14:38:22 +01:00
jackun
8b13f8db7c
Blacklist Final Fantasy XIV launchers 2020-04-28 23:27:52 +03:00
jackun
29e5c4e460
Show device's name and vulkan driver version 2020-04-28 18:06:39 +03:00
jackun
8b855e3251
Fix mul/div order when normalizing io stats to sample per second as fps_sampling_period is also an integer. 2020-04-28 17:25:34 +03:00
jackun
d8264c485f
[OpenGL] Fixed version check mistakenly testing for GL 4.0+ instead of 3.2+ to enable ImGuiBackendFlags_RendererHasVtxOffset, leaving 3.2 contexts without it. (ocornut#3119, ocornut#2866, ocornut#2852) 2020-04-25 21:17:58 +03:00
jackun
22ee56def5
[OpenGL] Use 32bit font texture until someone figures out why 8-bit looks worse 2020-04-25 13:13:05 +03:00
jackun
0271aa6368
[OpenGL] Track threads with context, but might as well ignore glXMakeCurrent(NULL, NULL) calls probably 2020-04-21 20:57:13 +03:00
jackun
79e4c5223a
In C-only apps, std::cerr and friends can be uninitialized 2020-04-21 17:19:12 +03:00
jackun
934dc31e44
Add utility lib with dlsym hooking 2020-04-21 17:05:37 +03:00
jackun
ebdaa901b9
Merge pull request #131 from Sporif/blacklist_v2
Blacklist: Add OpenGL and fix `mangohud steam`
2020-04-21 16:58:46 +03:00
Danilo Spinella
b6340c832a Add include for dlopen flags, fix build on musl
RTLD_DEEPBIND is not defined on musl based systems, add a check
before using it.
2020-04-21 15:51:12 +03:00
Danilo Spinella
fb64b2ae0e Add __ELF_NATIVE_CLASS to musl systems 2020-04-21 15:50:19 +03:00
Danilo Spinella
728fc9fe56 dbus: Add missing include 2020-04-21 15:47:21 +03:00
jackun
86f8ebed30
Trying to find XNVCtrl's display by iterating through 16 displays. 2020-04-20 22:51:55 +03:00
jackun
6caa4a5173
Try load XNVCtrl as "libXNVCtrl.so.0"
Seems not all distro symlink also to libXNVCtrl.so
2020-04-18 20:34:06 +03:00
Sporif
61ef9244e9 Disable dlsym hooking by default and fix LD_PRELOAD propagation to new processes
This allows `mangohud steam` to work
2020-04-18 17:53:41 +01:00
Sporif
d1e90b5bec [OpenGL] Add blacklist functionality 2020-04-18 17:53:41 +01:00
Sporif
c4a00704cf Separate out blacklist implementation 2020-04-18 17:53:41 +01:00
Georg Lehmann
1eca184157
Vulkan Overlay: Don't try to change the image layout to present twice
The render pass already does the transition.
The pipeline barrier is still needed to transfer the queue family ownership.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3740>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3740>
2020-04-18 18:37:27 +03:00
jackun
efed107af6
[meson] check void* size once and better-ish xnvctrl checks 2020-04-15 19:45:59 +03:00
jackun
cf5eb9e9a5
ifdef-guard dbus_info.h include 2020-04-15 19:12:56 +03:00
jackun
ad0f010951
Don't print that nvmlDeviceGetHandleByPciBusId failed if it wasn't even called 2020-04-14 00:54:44 +03:00
jackun
723c6bedeb
Fix init_x11 return value and X11/XNVCtrl logic checks 2020-04-14 00:26:23 +03:00
jackun
88188ee1da
[dbus] Generalize a bit more but still give Spotify special treatment, keep track of 'org.mpris.MediaPlayer2' service providers
Keeps and draws spotify's and other player's metadata separately.
Keep track of 'org.mpris.MediaPlayer2' service providers so when
a player that was the last metadata sender quits, we can stop
showing its metadata on overlay.
2020-04-13 03:02:52 +03:00
jackun
7e5afe96bb
Add dbus_message_get_sender to dbus loader 2020-04-13 02:52:36 +03:00
jackun
bb4b78ada0
[OpenGL] Spam terminal a little less with version strings 2020-04-12 16:38:28 +03:00
jackun
f35e49defa
[OpenGL] Merge "shared" files back to imgui_hud.cpp 2020-04-12 16:25:46 +03:00
jackun
b40fb95a04
[OpenGL] Better version parsing and fix gl version checks for vertex arrays 2020-04-12 16:25:35 +03:00
FlightlessMango
d6314da8b2 Merge branch 'master' into develop 2020-04-11 22:49:50 +02:00
jackun
2383ba26fc
Tell GCC to stop exporting static library functions
Should fix crashes where games using Dear ImGui link to ours.
2020-04-11 13:05:53 +03:00
flightlessmango
0f695d76c7
Merge pull request #119 from andrealmeid/log_to_mem
Write log in a memory buffer and periodically write it in disk
2020-04-11 01:49:22 +02:00
jackun
6576a0a09c
Print NVML return code as string 2020-04-11 01:08:20 +03:00
jackun
a9311bb578
Allow to specify gpu with pci bus id by setting env var MANGOHUD_PCI_DEV=xxxx:xx:xx:x where x's are "domain🚌slot.function" 2020-04-11 00:34:33 +03:00
jackun
e5a256bfc0
Move DBus init to overlay_params so it can be enabled/disabled on the fly from a single place 2020-04-10 22:39:43 +03:00
jackun
d81dc7936a
[OpenGL] Use glXQueryDrawable if XGetGeometry fails 2020-04-10 22:39:43 +03:00
jackun
ff3c58c9c5
[OpenGL] Change glXMakeCurrent return type to int just in case and convert missed #ifdefs 2020-04-10 22:35:07 +03:00
Stephan Lachnit
f860418e7e
Allow system NVML to be used
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-04-10 11:33:58 +02:00
André Almeida
f07aea54b6 logging: check if duration is enabled before checking if it has expired
If we check if log_duration is enabled before checking if it has expired
we can save some math and comparison instructions on every log write.
2020-04-09 15:58:05 -03:00
André Almeida
0a942512e9 logging: don't sleep if time is over 2020-04-09 15:50:39 -03:00
André Almeida
0303f8de28 logging: write log to a memory buffer
Instead of writing every line of the log to the file (and, consequently,
to the disk), write to a memory buffer first and after the log finishes
flush from memory to disk. This improve the performance of the tool, since
it avoids making the program blocked by disk IO.
2020-04-09 15:50:39 -03:00
jackun
f3f04f3f78
Print dlerror() in lib loaders 2020-04-09 21:26:00 +03:00
jackun
780ea7c89b
[OpenGL] Use GLAD instead on gl3w and hook EGL 2020-04-09 21:24:37 +03:00
jackun
772ab6aa5b
[OpenGL] Don't exit if function is not found, it probably isn't catastrophic 2020-04-09 11:30:51 +03:00
André Almeida
4830268a11 logging: fix indentation 2020-04-08 15:14:13 -03:00
jackun
a6bfa712e3
Do a sanity check for XNVCtrl and GLX headers 2020-04-05 16:11:29 +03:00
FlightlessMango
d454ff43a2 Hide all hud elements on no_display 2020-04-05 13:20:15 +02:00
jackun
e95a96d9f0
If used for other things than just reading sysfs files, xfs/jfs need stat() for inode type 2020-04-05 14:02:15 +03:00
jackun
0db804aa01
Don't free DBusError if it was never inited because dbus_error_free() is nullptr too 2020-04-05 13:56:14 +03:00
jackun
421146b822
Don't reinit dbus manager 2020-04-05 13:48:16 +03:00
jackun
0a27e0a447
Clear all metadata strings in case other mpris-compatible media players don't have them all 2020-04-05 00:12:01 +03:00
jackun
8024736253
Add DBus loader, combined ticker for Spotify metadata 2020-04-04 23:50:57 +03:00
FlightlessMango
d975278396
Dbus with spotify 2020-04-04 20:51:53 +03:00
jackun
cbb46fa21b
Also call default constructor for libnvctrl_loader 2020-04-04 20:46:54 +03:00
Stephan Lachnit
0998d33d72
Use Vulkan-Headers module via wrap
This commit replaces the git submodule for the Vulkan headers with meson subproject using wrap.

Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-04-04 17:49:02 +03:00
jackun
8cd3172335
[OpenGL] Separate GLX out from shareable code so wayland sessions can just use EGL, hopefully 2020-04-02 03:09:49 +03:00
jackun
2f034c6d1e
Use X11 loader functions instead of linking to X11 libs 2020-04-02 03:09:49 +03:00
jackun
71b37906da
Shared X11 intialization functions 2020-04-02 03:08:53 +03:00
jackun
329b5d66c2
Add X11 loader 2020-04-01 22:54:48 +03:00
jackun
108bca7d4f
Don't include X11 headers in overlay_params.h 2020-04-01 15:37:42 +03:00
jackun
bd9d9650a0
Move dlsym hook out from inject_glx.cpp 2020-04-01 15:37:19 +03:00
jackun
0a36578adf
[OpenGL] Rename GLX loader functions 2020-04-01 15:37:08 +03:00
jackun
b2e6727b25
[OpenGL] Rename loader_gl.* to loader_glx.* 2020-04-01 15:16:44 +03:00
jackun
2e7d92e068
Move real_dlsym files out from gl subdir 2020-04-01 14:39:51 +03:00
jackun
e750173b51
[OpenGL] Check if X11 is enabled 2020-04-01 11:46:08 +03:00
Danilo Spinella
0373383581
Add x11/wayland feature switches, rename 'use_xnvctrl' to 'with_xnvctrl' 2020-04-01 11:39:57 +03:00
jackun
59113b3ae2
[OpenGL] Move ImGui functions to separate file 2020-04-01 11:28:16 +03:00
jackun
c3e50db2f4
[OpenGL] Import glXQueryDrawable just in case 2020-04-01 11:27:27 +03:00
jackun
accac3a015
[OpenGL] Import XGetGeometry 2020-04-01 11:27:27 +03:00
jackun
ebe23d3431
[OpenGL] Rename inject.cpp to inject_glx.cpp in preparation for separating X11 related functions 2020-04-01 11:27:04 +03:00
jackun
042267f26b
Update API version to 1.2.135 in manifest 2020-03-31 00:13:53 +03:00
jackun
049e960589
Add 'use_xnvctrl' feature to allow building without libXNVCtrl support 2020-03-30 22:48:56 +03:00
jackun
5afbe10005
[OpenGL] Restore ImGui's context to previously saved one, duh 2020-03-29 01:54:57 +02:00
jackun
6eb2c9bc09
[OpenGL] Explicitly set ImGui's context and treat global context as foreign
Apps might be using Dear ImGui so keep our stuff separate from theirs.

Issue #107
2020-03-29 01:47:24 +02:00
jackun
f5e3f3b73b
[config] Add MANGOHUD_CONFIGFILE envvar for specific configuration file
Issue #104
2020-03-29 00:05:52 +02:00
jackun
f8cc3bbf06
[config] Allow fps_limit=0 or commenting it out to disable fps limit 2020-03-28 23:38:33 +02:00
jackun
49742e1cea
[config] Load config changes to local copy of overlay_params so it does not block rendering thread while parsing 2020-03-28 23:32:58 +02:00
FlightlessMango
0d53d7d39d Fixed typo in nvctrl 2020-03-28 14:39:41 +01:00
FlightlessMango
85291d25ef Added warning messages for nvctrl 2020-03-28 14:28:12 +01:00
Lionel Landwerlin
1fc94600e9
vulkan/overlay: Add a workaround semaphore for application presenting without one
When an application calls vkQueuePresent() on a different queue than
the one we run our drawing on and it doesn't give a semaphore to wait
on, let's insert our own semaphore so that we don't race the
application's drawing.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2540
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3893>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3893>
2020-03-27 02:24:54 +02:00
jackun
32ae051434
Add Bethesda launcher to blacklist 2020-03-25 22:51:21 +02:00
Sporif
c24d9015cd
Blacklist support
Initial blacklist: Battle.net.exe, EpicGamesLauncher.exe, IGOProxy.exe, IGOProxy64.exe, Origin.exe, Steam.exe

Signed-off-by: jackun <jack.un@gmail.com>
2020-03-25 17:11:33 +02:00
jackun
25b0adfbf9
Move Wine exe name code from config.cpp to get_wine_exe_name(...) 2020-03-25 17:11:29 +02:00
jackun
cf17f70dab
Remove unused statistics related code 2020-03-24 21:38:08 +02:00
jackun
d3f895cbef
[config] keep pthread_t pointers in notify_thread struct for MT safety 2020-03-24 00:51:30 +02:00
jackun
1b192c4910
[config] join notifier thread just to be sure 2020-03-24 00:10:03 +02:00
jackun
e72a7bdd76
[config] Try to set notifier file descriptor to non-blocking mode; add start/stop_notifier functions
If setting to non-blocking fails, just closing the fd should kill it anyway
2020-03-24 00:02:42 +02:00
jackun
841d76c6af
Quit config watcher thread if it fails to init and clean up 2020-03-23 23:22:22 +02:00
jackun
2ab386d70a
Fix double definition 2020-03-23 21:19:03 +02:00
FlightlessMango
a84f5ef178 Show mangohud arch in hud 2020-03-23 20:12:11 +01:00
FlightlessMango
23adda92b7 Added param 'arch' 2020-03-23 20:11:53 +01:00
FlightlessMango
c9558eec50 Merge branch 'xnvctrl' into develop 2020-03-23 18:05:13 +01:00
jackun
ae3a155e22
Keep engine name per vulkan instance 2020-03-23 18:59:39 +02:00
jackun
053a07d83c
[OpenGL] Don't set display size to scissor box if its size is just 1 by 1 2020-03-23 01:26:40 +02:00
jackun
f92a2a07db
GiB not GB 2020-03-21 21:47:50 +02:00
jackun
fbae1dfcc0
More checks for XNVCtrl support. Favor NVML but fallback to XNVCtrl if supported. 2020-03-20 16:36:00 +02:00
jackun
b059fa26bc
xnvctrl: parse tokenized attributes 2020-03-20 15:26:37 +02:00
jackun
c16f4b4275
try_stoi: spam in debug build only 2020-03-20 15:25:45 +02:00
FlightlessMango
79add746b5 Removed debugging messages 2020-03-20 13:23:39 +01:00
FlightlessMango
f2b770abac Use XNVCTRLQueryTargetAttribute64 instead 2020-03-20 13:23:24 +01:00
FlightlessMango
2c979e52e6 Set nvmlSuccess to false if NVML gpu load is unsupported 2020-03-20 13:06:24 +01:00
FlightlessMango
e7b5a18d87 If NVML fails fallback to NVctrl 2020-03-20 12:54:54 +01:00
FlightlessMango
f81af99ee5 NVCtrl meson build 2020-03-20 12:54:20 +01:00
FlightlessMango
aaaf30b807 NVctrl fetching 2020-03-20 12:54:08 +01:00
FlightlessMango
8ee0ec2c3f NVCtrl loader 2020-03-20 12:53:43 +01:00
jackun
1915352c86
Draw versions after table so they don't get clipped 2020-03-18 18:55:51 +02:00
jackun
c7bee1a99d
[OpenGL] Compare if viewport or scissor box size changed with window resizing and use that for display size 2020-03-17 15:06:58 +02:00
jackun
6ad6bffade
Use ImGui's DisplaySize so display size for layer positioning etc can be set the same way for vulkan and OpenGL 2020-03-17 15:00:20 +02:00
jackun
3d46ccafe1
Show OpenGL version below engine name too to avoid it getting clipped 2020-03-17 14:58:27 +02:00
jackun
8aa0783b4a
Show vulkan/opengl version
OpenGL glGetIntegerv(GL_[MAJOR|MINOR]_VERSION) don't work on versions < 3.0 though
2020-03-17 00:24:04 +02:00
jackun
bb3aba9080
[OpenGL] Use elfhacks to load real OpenGL functions 2020-03-16 22:37:42 +02:00
jackun
85801bcc17
[OpenGL] Add elfhacks
https://github.com/ienorand/elfhacks
2020-03-16 22:37:42 +02:00
FlightlessMango
8fb13e23e4 Resize window when reloading config 2020-03-16 18:41:48 +01:00
jackun
5bdfcd493d
[config] Add config file change notifier to OpenGL 2020-03-16 19:35:46 +02:00
jackun
a0f5cb56a2
[config] Guard overlay_params from the thread with mutex 2020-03-16 18:52:03 +02:00
jackun
34184abf2e
[config] loop in the notifier thread and reload configuration file if it is changed 2020-03-16 18:35:01 +02:00
jackun
341aa21b87
[config] Move options map and config_file_path to overlay_params 2020-03-16 18:32:48 +02:00
FlightlessMango
c5dad16612 Listen for modify on config file 2020-03-16 16:48:12 +01:00
jackun
b0f36fad31
Expand paths only 2020-03-15 18:52:14 +02:00
FlightlessMango
b0e1fe9321 [params] set targetFrameTime in params.cpp 2020-03-15 17:09:03 +01:00
FlightlessMango
71b602751d [meson] option to include_doc 2020-03-15 16:01:08 +01:00
jackun
6e40f9bdd5
Expand tilde to home dir if string param start with ~ 2020-03-15 16:57:49 +02:00
jackun
f7a7256374
Clear options map so reloading config files actually has an effect 2020-03-15 14:37:42 +02:00
jackun
6b4103eae9
[config] Parse Wine application name without absolute path 2020-03-15 13:09:51 +02:00
jackun
abef561573
Disable CPU stat(s) if it failed to initialize 2020-03-14 23:15:03 +02:00
jackun
712590befe
Check if CPU sensor file handle is valid 2020-03-14 23:14:48 +02:00
FlightlessMango
64a42df047 forgot to include functional 2020-03-14 19:27:25 +01:00
FlightlessMango
cbb58ab79c make sure Xdisplay is closed on shutdown 2020-03-14 19:18:41 +01:00
FlightlessMango
b3286cbe48 check if opengl/vulkan with is_vulkan bool 2020-03-14 18:29:43 +01:00
jackun
13e57578c3
Fix update_hud_info indentation 2020-03-14 19:11:34 +02:00
jackun
154380e056
Don't update time if not enabled 2020-03-14 19:10:38 +02:00
jackun
9a7a4d99e0
Don't update CPU freq/temp if not enabled 2020-03-14 18:48:04 +02:00
jackun
6bbc89a9cc
Don't update CPU stats if not enabled 2020-03-14 18:41:50 +02:00
jackun
16552b25e3 Don't update RAM/IO stats if not enabled 2020-03-14 18:38:18 +02:00
jackun
c850507314
[OpenGL] Initialize MangoHud from glXSwapBuffers even if glXMakeCurrent is skipped for some reason 2020-03-14 18:32:27 +02:00
jackun
fa41e6f882
Always configure vulkan json 2020-03-14 13:22:17 +02:00
jackun
ad64bf345d
Update build scripts, again
Install to $prefix$libdir/mangohud by default.
2020-03-14 12:59:43 +02:00
jackun
50cef9621b
Remove ~/.local/share/MangoHud/MangoHud.conf support 2020-03-13 18:37:55 +02:00
jackun
57f3b3470d
Remove param_unit() 2020-03-13 18:25:22 +02:00
jackun
2e3f8077cb
Remove parse_output_file 2020-03-13 18:24:21 +02:00
jackun
da9120f971
Add parse_signed() for gl_sync 2020-03-13 18:05:03 +02:00
jackun
125dbc1403
[OpenGL] Allow swap interval of -1 for adaptive sync, if supported 2020-03-13 17:54:36 +02:00
FlightlessMango
e24f5dfc8b added log_duration param and updated readme 2020-03-13 16:27:45 +01:00
FlightlessMango
b4cd837328 [OpenGL] custom font file 2020-03-13 16:18:59 +01:00
FlightlessMango
8641392ca7 added MANGOHUD_FONT to params as font_file 2020-03-13 16:18:47 +01:00
FlightlessMango
d1bdf71580 added MANGOHUD_OUTPUT to params as output_file 2020-03-13 16:06:57 +01:00
jackun
4adb6ed25f
Convert tabs to spaces in cpu.cpp/cpu.h 2020-03-13 16:35:11 +02:00
jackun
72d7f6ef71
Print also a reason for skipping a config file 2020-03-13 16:14:58 +02:00
jackun
31a651133c
[OpenGL] Cleanup stderr output a little 2020-03-13 16:08:36 +02:00
jackun
bbfad2e073
[OpenGL] Parse and initialize configuration just once 2020-03-13 16:08:36 +02:00
jackun
a52dce875f
[OpenGL] Keep glClipControl local to imgui_impl_opengl3.cpp 2020-03-13 16:08:36 +02:00
jackun
05d61ee77e
Init CPUStats just once 2020-03-13 16:08:36 +02:00
FlightlessMango
e68dd48f3f forgot one refresh_config 2020-03-13 15:07:44 +01:00
FlightlessMango
fe69ec2955 changed refresh_config to reload_cfg 2020-03-13 14:57:11 +01:00
FlightlessMango
501d7d74d2 install example config with meson 2020-03-13 12:41:22 +01:00
jackun
5caeb10882
[OpenGL] Apply swap interval from glXMakeCurrent 2020-03-13 10:05:41 +02:00
jackun
297b44bfe6
[OpenGL] Force-load libGL.so.1 with dlopen() if dlsym fails to find functions 2020-03-13 09:35:14 +02:00
jackun
e0ce0493f7
[OpenGL] Set swap interval (vsync) with gl_vsync param 2020-03-12 12:12:21 +02:00
FlightlessMango
8133048e9c Add blank configuration for project_name and layer_suffix with build.sh 2020-03-12 09:20:22 +01:00
FlightlessMango
8153e29eb3 forgot to add '/' to end of path 2020-03-12 08:31:33 +01:00
FlightlessMango
8599484032 configure .json files with meson 2020-03-12 08:24:37 +01:00
jackun
37e34335ae
Sprinkle NDEBUG over gl debug prints 2020-03-11 18:57:21 +02:00
jackun
ad598f7ec4
[OpenGL] Fix double-free with ImGui context 2020-03-11 18:56:31 +02:00
jackun
f99129f9de
Libdirs: once more, with feeling 2020-03-11 18:11:35 +02:00
jackun
4761078133
Fix small font for gl 2020-03-11 12:23:39 +02:00
jackun
c88b930a37
Match gl PushPopStyle count with vulkan's 2020-03-11 12:16:53 +02:00
jackun
bc7db582bd
Single ImGui context for OpenGL
Seems only VAO is not shareable between OpenGL context
but that gets recreated every render anyway.
2020-03-11 12:15:44 +02:00
jackun
373bba5fcf
Keep time outside the table or it gets clipped if using too fancy a format 2020-03-11 12:11:16 +02:00
FlightlessMango
8bf8723ad5 added param text_color 2020-03-11 06:20:18 +01:00
FlightlessMango
77b3033cc7 Removed frametime_alpha and replace it with an overall alpha for text and frametime 2020-03-11 06:07:41 +01:00
FlightlessMango
a1eafc3403 Install .so into subdirectory in libdir 2020-03-11 05:19:48 +01:00
jackun
a64b6cada2
Build/install scripts: verbose tar output and set files' owner/group to root 2020-03-10 23:41:55 +02:00
FlightlessMango
8558d038d7 refactored the install process 2020-03-10 13:39:52 +01:00
FlightlessMango
ccf870e630 changed offset_x/y to int so it can be negative 2020-03-10 10:18:59 +01:00
FlightlessMango
88ad5de2ab Fix so preloading doesn't break vulkan layer 2020-03-10 08:27:27 +01:00
FlightlessMango
163c76bea7 added param background_color 2020-03-10 07:48:04 +01:00
FlightlessMango
28e765a6a3 added param frametime_alpha 2020-03-10 07:27:28 +01:00
FlightlessMango
906a8cde23 added param frametime_color 2020-03-10 06:30:37 +01:00
FlightlessMango
a2735693ba Merge opengl into develop 2020-03-10 06:19:18 +01:00
FlightlessMango
755558ecb9 added param io_color 2020-03-10 05:01:31 +01:00
FlightlessMango
d8b3c3c81f params for changing color of cpu, gpu, vram, ram and engine text 2020-03-10 04:51:27 +01:00
jackun
5e4bd7b8c8
Keep time outside the table or it gets clipped if using too fancy a format 2020-03-07 14:10:52 +02:00
jackun
b4f1402461 Right align value texts 2020-03-07 02:08:01 +01:00
jackun
e881a1538a Pre-convert crosshair's color to ImGui's format 2020-03-07 02:08:01 +01:00
jackun
1a8b98e09d Divide memory sizes by 1024 byte chunks 2020-03-07 02:08:01 +01:00
FlightlessMango
857dcf7fb8 use hmwon freq1/2 instead for amdgpu core/mem clocks 2020-03-07 02:08:01 +01:00
FlightlessMango
274b3e67ca don't extend hud width if gpu_stats is disabled 2020-03-07 02:08:01 +01:00
FlightlessMango
4d5f62386b added gpu mem and core clocks to hud 2020-03-07 02:08:01 +01:00
jackun
f8398c3e7a Add I/O stats
Using /proc/self/io 'read_bytes' and 'write_bytes' fields which count only
reads/writes that hit the storage (i.e no cached reads).
2020-03-07 02:07:24 +01:00
FlightlessMango
534ca9416d Spruced up iostats and change to bool from custom 2020-03-07 02:06:40 +01:00
FlightlessMango
4847cb8e31 Using table for hud layout 2020-03-07 02:06:40 +01:00
jackun
2472e69205
Check if pApplicationInfo is null 2020-03-07 02:29:31 +02:00
jackun
ea8f0ad666
Includes cleanup 2020-03-06 23:07:28 +02:00
jackun
fad35b9540
Just check hwmon sysfs folder for cpu temp sensors 2020-03-05 09:52:14 +02:00
jackun
6bf37f8510
Add "time_format" parameter; update time string every "fps_sampling_period" interval
See std::put_time docs for supported formatting
2020-03-02 22:53:43 +02:00
jackun
9a4c9033fa
Support escaping delimiters in MANGOHUD_CONFIG 2020-03-02 22:53:42 +02:00
jackun
417b1aac8d
config: trim only surrounding whitespace 2020-03-02 22:53:29 +02:00
FlightlessMango
58c7831d5c hud width correction 2020-02-29 01:38:40 +01:00
FlightlessMango
80cff1ac86 Fixed hud width not applying 2020-02-29 01:16:41 +01:00
FlightlessMango
12ba4f9ea5 No need to set hud height manually anymore 2020-02-28 22:01:04 +01:00
jackun
8a348ffbf0
Disable gpu_timing for now
Issue #44
2020-02-20 23:08:09 +02:00
jackun
b91be85ff9
Use std::unordered_map and std::mutex instead for object mapping and related cleanups 2020-02-20 01:03:35 +02:00
jackun
54950853b5
Remove redundant 'no_display' code 2020-02-18 15:36:20 +02:00
jackun
d78622a322
Don't enable 'read_cfg' too when 'full' is set in MANGOHUD_CONFIG
Could use OVERLAY_PARAM_INTERNAL or something similar but currently
less code to just save the boolean and reset.
2020-02-18 15:13:22 +02:00
jackun
8f66bd7d87
Set stats window height to ImGui::GetCursorPosY() 2020-02-18 14:35:58 +02:00
jackun
2fb0453e28
Create ImGui fonts per swapchain 2020-02-18 14:21:22 +02:00
FlightlessMango
099082affc Refresh config keybind 2020-02-18 12:04:59 +01:00
FlightlessMango
7593582f4a Fixed parsing crosshair color function 2020-02-18 11:44:45 +01:00
jackun
9053b63142
Allocate instance_data with "new" 2020-02-18 11:49:09 +02:00
jackun
68e880a101
config: rename param to "read_cfg" 2020-02-18 11:47:58 +02:00
jackun
ad2ed4a99a
config: load highest priority config available only 2020-02-18 09:32:45 +02:00
jackun
80f29aad9d
Allow MANGOHUD_CONFIG to override configuration files' settings.
Use `MANGOHUD_CONFIG=some_setting=1` to skip reading the configuration files
and just use the settings specified with MANGOHUD_CONFIG.

Use `MANGOHUD_CONFIG=read_configs,...` to read configuration files too and
add other settings that you would like to override.
2020-02-18 09:24:22 +02:00
jackun
f7e7146883
config: find_last_of can search for multiple characters, doh 2020-02-18 00:59:56 +02:00
jackun
6a45ac84b3
config: sometimes wine exe has forward-slashes instead 2020-02-17 13:52:10 +02:00
jackun
65b90fc01b
config file: respect XDG dirs
Other half of #37
2020-02-15 13:23:18 +02:00
jackun
67eab673d8
Override previous setting, std::unordered_map::insert() does not. 2020-02-14 08:45:22 +02:00
jackun
70d0e81c36
Clone vulkan headers if needed 2020-02-13 23:53:56 +02:00
Danilo Spinella
18edd4eb50 meson: Add option to use system vulkan headers 2020-02-13 21:47:50 +02:00
jackun
5c4816efa5
Unused instance_data 2020-02-13 20:54:17 +02:00
jackun
69cf83d3bc
config file: print that config file is skipped if we failed to open it 2020-02-13 15:19:42 +02:00
jackun
3e0eda559d
print if done parsing config file 2020-02-13 13:48:29 +02:00
jackun
6086a6b9ab
config file: try to detect Wine executable's path 2020-02-13 13:45:33 +02:00
jackun
169d5ff99a
Search configs in ~/.config/MangoHud 2020-02-12 23:10:19 +02:00
jackun
08debe5d09
Add per-executable config file support
* executable's name + ".conf" in config dir
* "MangoHud.conf" in executable's folder
2020-02-12 23:00:33 +02:00
jackun
90a93fd2fc
Add "get executable's path" function 2020-02-12 22:59:00 +02:00
jackun
74c9803087
config file: if parameter line has no equal sign, default value to 1 2020-02-12 22:27:00 +02:00
jackun
27848bd253
Don't crash if there's nothing to draw 2020-02-12 19:58:01 +02:00
FlightlessMango
d8783d3002 Added time param 2020-02-12 18:24:00 +01:00
FlightlessMango
29bacea97f Add param option full 2020-02-12 16:52:54 +01:00
jackun
b9ae979a05
Don't interpolate fps limit sleep overhead
Random hiccups and game pauses can make it go crazy otherwise.
2020-02-12 13:58:13 +02:00
FlightlessMango
dba31e6a11 Set background alpha color to 1.0 2020-02-12 12:43:46 +01:00
FlightlessMango
e947dae9ed Fixed fps limiter accuracy 2020-02-12 05:59:18 +01:00
FlightlessMango
c73df54166 Added background_alpha param 2020-02-12 04:51:08 +01:00
jackun
60763420eb
Use defines instead of magic numbers for HUD hotkeys' 2020-02-11 21:50:29 +02:00
FlightlessMango
e81fa5776e Added crosshair_color param 2020-02-11 09:21:23 +01:00
FlightlessMango
d79d06271f Repurposed no_display param 2020-02-11 06:10:10 +01:00
FlightlessMango
50cff923e8 Changed vram to display GB from MB 2020-02-11 02:50:33 +01:00
FlightlessMango
3c4fcda623 Added offset x/y in params 2020-02-10 17:37:37 +01:00
FlightlessMango
2590426ef6 Merge branch 'config' 2020-02-10 17:13:45 +01:00
FlightlessMango
a8e4ac84f9 Merge branch 'crosshair' 2020-02-10 17:08:15 +01:00
FlightlessMango
69ed9db4c1 Merge branch 'limiter' 2020-02-10 17:01:03 +01:00
FlightlessMango
f56c53c152 Removed unused header 2020-02-10 16:59:49 +01:00
FlightlessMango
2003ae93c9 Continue parsing overlay params without env 2020-02-10 14:57:22 +01:00
jackun
1fc94f6db5
Remove unused histogram's get_stat() 2020-02-10 12:42:44 +02:00
Georg Lehmann
7a4ffe8206
Vulkan overlay: use the corresponding image index for each swapchain
pImageIndices should be a pointer to the current image index
otherwise every swapchain but the first one could have a wrong image index
2020-02-10 12:38:05 +02:00
jackun
b2f20f02d2
Prefix check links too 2020-02-10 12:37:24 +02:00
FlightlessMango
5a62a1b0de Cleaning up 2020-02-10 11:03:39 +01:00
FlightlessMango
33f48c91be Apply params from config file 2020-02-10 10:32:22 +01:00
FlightlessMango
ebc49ae8c5 Basic parse config 2020-02-10 09:37:19 +01:00
FlightlessMango
d578d612d4 Renamed overlay_param.c to .cpp 2020-02-09 14:02:40 +01:00
FlightlessMango
47f293a722 Change param keybind vars to KeySym 2020-02-09 12:26:56 +01:00
FlightlessMango
784cb427ff Use params for keybinds 2020-02-09 12:26:41 +01:00
FlightlessMango
25f4c88175 Change param keybind vars to KeySym 2020-02-09 12:26:19 +01:00
FlightlessMango
e5341dd86b Use params for keybinds 2020-02-09 12:25:23 +01:00
FlightlessMango
9d8fbe561d Keybind params for toggle hud and log 2020-02-09 12:13:54 +01:00
FlightlessMango
1a523a735f Keybind params for toggle hud and log 2020-02-09 12:10:41 +01:00
FlightlessMango
e359058430 Fixed hud being wider than intended 2020-02-09 09:25:00 +01:00
jackun
5f6c3c9190
Fix ImGui::PopStyleColor() being in wrong place 2020-02-08 20:32:33 +02:00
FlightlessMango
c5ea98a243 Added a crosshair and params for it 2020-02-08 03:55:39 +01:00
FlightlessMango
be8dc8929d Don't use fps limiter unless limit is set 2020-02-08 01:59:26 +01:00
FlightlessMango
148d19422d Added vsync option 2020-02-07 13:12:58 +01:00
FlightlessMango
cd131e0c39 Add fps_limit param 2020-02-07 12:14:59 +01:00
FlightlessMango
a99720f311 Change to nanoseconds 2020-02-07 12:01:20 +01:00
FlightlessMango
f38389b967 FPS limiter 2020-02-07 11:46:12 +01:00
FlightlessMango
4be6d4c748 Added frametime ms next to frametime graph 2020-02-07 00:00:40 +01:00
FlightlessMango
bd4c402824 Added Frametime label 2020-02-06 23:58:45 +01:00
FlightlessMango
c6d7fdd110 Fixed some issue with calculating hud height 2020-02-06 23:57:32 +01:00
telans
1bc513f572
remove nvidiaSmiThread 2020-02-06 18:45:32 +13:00
jackun
97fcafd030
Check if amdgpu file handles are valid 2020-02-05 22:37:03 +02:00
Georg Lehmann
908d46d6ea
Correctly wait in the fragment stage until all semaphores are signaled
This fixes two issues:
- a crash if the application uses more than one semaphore for presenting because the driver expects one stage per semaphore
- the swapchain image could be not ready yet if the semaphores aren't signaled, \#946[1] is possible related

[1] https://gitlab.freedesktop.org/mesa/mesa/issues/946

Signed-off-by: jackun <jack.un@gmail.com>
2020-02-05 22:37:03 +02:00
jackun
3c8376588a
Init gpu stats when VkDevice gets created 2020-02-05 22:37:03 +02:00
FlightlessMango
1e475ac02c removed unused nvctrl 2020-02-05 13:23:08 +01:00
jackun
46d8a03b50
Use PRId64 for int64_t string format 2020-02-05 14:19:16 +02:00
FlightlessMango
36eba167d8
use nvml for nvidia gpu memory instead of nvctrl 2020-02-05 14:16:16 +02:00
FlightlessMango
35d8f7c829
add ram/vram param options 2020-02-05 14:16:16 +02:00
FlightlessMango
beaac191d1
Displaying used ram and vram on the hud 2020-02-05 14:16:16 +02:00
FlightlessMango
6affdb8c51
fetch nvidia vram used from nvctrl 2020-02-05 14:16:16 +02:00
FlightlessMango
23280e0e78
fetching vram for amd gpus 2020-02-05 14:16:16 +02:00
FlightlessMango
d97719e3d6
get nvidia vram from nvml 2020-02-05 14:16:16 +02:00
FlightlessMango
5201a26d95
detach memory thread when done 2020-02-05 14:16:15 +02:00
FlightlessMango
e3b380b970
changed mem color 2020-02-05 14:16:15 +02:00
FlightlessMango
14ad1e015a
Display memory stats on the hud 2020-02-05 14:16:15 +02:00
FlightlessMango
8ab7cd0f20
Basic memory fetching 2020-02-05 14:16:06 +02:00
FlightlessMango
d20a92a0c4 Write system info to log file 2020-02-05 07:07:23 +01:00
FlightlessMango
68599a02a3 param options for cpu_stats and gpu_stats 2020-02-05 01:06:10 +01:00
jackun
bba8702ff3
Check if engine name is set 2020-02-05 00:43:32 +02:00
jackun
bf45bd9a02
Don't increment cpuData index inline 2020-02-04 23:33:36 +02:00
jackun
6d3d869586
Fix system info and stats parsing 2020-02-04 23:23:01 +02:00
jackun
217b65f0e9
Some cpu/gpu stats parsing fixes 2020-02-04 23:23:01 +02:00
jackun
b5bfd437a6
Add file and string utility functions 2020-02-04 23:23:01 +02:00
jackun
f559730d2f
Return bool from checkNvidia() 2020-02-04 23:23:00 +02:00
telans
539e1bb4dc
saturate the colors a little 2020-02-04 20:58:35 +13:00
jackun
ca0462f817
Revert "Fix Get*ProcAddr functions' exports"
This reverts commit 3f036dd3a0.
2020-02-03 02:58:43 +02:00
jackun
7f6bc9434a
Fix nvml loader's ctor 2020-02-03 00:15:58 +02:00
FlightlessMango
dcb0dcd441 Merge branch 'dynamic_nvml' 2020-02-02 02:57:48 +01:00
FlightlessMango
3d711005d4 Merge branch 'cpu' 2020-02-02 02:53:58 +01:00
FlightlessMango
3d49422325 cleaning up 2020-02-02 02:21:00 +01:00
jackun
90416278e0
Total cpu periods 2020-02-02 02:14:08 +02:00
FlightlessMango
c9e9c2feaf bring back cpu temp 2020-02-02 01:09:45 +01:00
FlightlessMango
1a60999243 New cpu implementation 2020-02-02 00:55:24 +01:00
jackun
3f036dd3a0
Fix Get*ProcAddr functions' exports 2020-02-01 23:41:15 +02:00
FlightlessMango
ac719b2ffd Check if nvml is avaible on intel vendorID 2020-02-01 22:09:35 +01:00
FlightlessMango
af17b20bd7 Use vendorID instead of deviceName to detect GPU 2020-02-01 22:07:19 +01:00
FlightlessMango
3e2f33ba1d nvmlSuccess default false 2020-02-01 02:47:25 +01:00
FlightlessMango
a93eb906e9 Don't increase size if frame_timing is false 2020-02-01 02:45:31 +01:00
FlightlessMango
1b00d29792 Removed unused histogram 2020-02-01 02:45:10 +01:00
FlightlessMango
8cdd9f19cf Dynamically load nvml library 2020-02-01 02:28:31 +01:00
FlightlessMango
a045ae3b64
Don't build with nvml for non-nvidia 2020-01-30 21:23:47 +02:00
FlightlessMango
a3fb14c0d6
Check nvmlInit() once 2020-01-30 21:23:47 +02:00
FlightlessMango
369b18eb07
Use nvml to display gpu values in hud 2020-01-30 21:23:47 +02:00
FlightlessMango
ef0b3d429e
Basic nvml implementation 2020-01-30 21:23:40 +02:00
jackun
b28e0d2606
Remove unused pipeline stats counters 2020-01-30 11:19:25 +02:00
telans
b67a2aad16
Merge branch 'telans'
Remove unused python file
Fix includes
Add package build.sh option
2020-01-29 18:40:26 +00:00
FlightlessMango
d3a588b0b0 Removed unused variables and fixed compiler warnings 2020-01-29 16:37:41 +01:00
telans
678207f052
remove unused mesa-overlay-control.py 2020-01-29 23:25:16 +13:00
telans
e82e3721b7
update header location & duration_env 2020-01-29 23:24:46 +13:00
telans
0287920776
remove unused git_sha1.h 2020-01-29 21:35:09 +13:00
telans
ae08d0cc21
Merge branch 'gui-color' 2020-01-28 23:29:16 +00:00
FlightlessMango
e3008126f3 We don't need to push the default font 2020-01-28 12:59:09 +01:00
FlightlessMango
af99e711b5 Reduced ImGui ItemSpacing 2020-01-28 12:58:18 +01:00
telans
f3bedf3bce
add build script "build.sh" 2020-01-28 20:20:23 +13:00
jackun
ca78a59d54 Removed graph background, plotlines color to green 2020-01-28 09:03:24 +02:00
jackun
64fd81a471 Add Unispace as default font or load a font from file specified by envvar MANGOHUD_FONT
Could make built-in font configurable by including some other source file with font data instead of src/font_unispace.c
2020-01-28 08:58:04 +02:00
FlightlessMango
f434f627fa MangoHud implicit layer manifest 2020-01-28 05:32:37 +01:00
FlightlessMango
dd78c02ed8 MangoHud Standalone
Co-authored-by: jackun <jack.un@gmail.com>
Co-authored-by: telans <telans@protonmail.com>
2020-01-28 05:11:05 +01:00