Commit Graph

346 Commits (59d021f7d5a9d957bd54cb42791c44f2f76a7251)

Author SHA1 Message Date
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>
4 years ago
jackun 32ae051434
Add Bethesda launcher to blacklist 4 years ago
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>
4 years ago
jackun 25b0adfbf9
Move Wine exe name code from config.cpp to get_wine_exe_name(...) 4 years ago
jackun cf17f70dab
Remove unused statistics related code 4 years ago
jackun d3f895cbef
[config] keep pthread_t pointers in notify_thread struct for MT safety 4 years ago
jackun 1b192c4910
[config] join notifier thread just to be sure 4 years ago
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
4 years ago
jackun 841d76c6af
Quit config watcher thread if it fails to init and clean up 4 years ago
jackun 2ab386d70a
Fix double definition 4 years ago
FlightlessMango a84f5ef178 Show mangohud arch in hud 4 years ago
FlightlessMango 23adda92b7 Added param 'arch' 4 years ago
FlightlessMango c9558eec50 Merge branch 'xnvctrl' into develop 4 years ago
jackun ae3a155e22
Keep engine name per vulkan instance 4 years ago
jackun 053a07d83c
[OpenGL] Don't set display size to scissor box if its size is just 1 by 1 4 years ago
jackun f92a2a07db
GiB not GB 4 years ago
jackun fbae1dfcc0
More checks for XNVCtrl support. Favor NVML but fallback to XNVCtrl if supported. 4 years ago
jackun b059fa26bc
xnvctrl: parse tokenized attributes 4 years ago
jackun c16f4b4275
try_stoi: spam in debug build only 4 years ago
FlightlessMango 79add746b5 Removed debugging messages 4 years ago
FlightlessMango f2b770abac Use XNVCTRLQueryTargetAttribute64 instead 4 years ago
FlightlessMango 2c979e52e6 Set nvmlSuccess to false if NVML gpu load is unsupported 4 years ago
FlightlessMango e7b5a18d87 If NVML fails fallback to NVctrl 4 years ago
FlightlessMango f81af99ee5 NVCtrl meson build 4 years ago
FlightlessMango aaaf30b807 NVctrl fetching 4 years ago
FlightlessMango 8ee0ec2c3f NVCtrl loader 4 years ago
jackun 1915352c86
Draw versions after table so they don't get clipped 4 years ago
jackun c7bee1a99d
[OpenGL] Compare if viewport or scissor box size changed with window resizing and use that for display size 4 years ago
jackun 6ad6bffade
Use ImGui's DisplaySize so display size for layer positioning etc can be set the same way for vulkan and OpenGL 4 years ago
jackun 3d46ccafe1
Show OpenGL version below engine name too to avoid it getting clipped 4 years ago
jackun 8aa0783b4a
Show vulkan/opengl version
OpenGL glGetIntegerv(GL_[MAJOR|MINOR]_VERSION) don't work on versions < 3.0 though
4 years ago
jackun bb3aba9080
[OpenGL] Use elfhacks to load real OpenGL functions 4 years ago
jackun 85801bcc17
[OpenGL] Add elfhacks
https://github.com/ienorand/elfhacks
4 years ago
FlightlessMango 8fb13e23e4 Resize window when reloading config 4 years ago
jackun 5bdfcd493d
[config] Add config file change notifier to OpenGL 4 years ago
jackun a0f5cb56a2
[config] Guard overlay_params from the thread with mutex 4 years ago
jackun 34184abf2e
[config] loop in the notifier thread and reload configuration file if it is changed 4 years ago
jackun 341aa21b87
[config] Move options map and config_file_path to overlay_params 4 years ago
FlightlessMango c5dad16612 Listen for modify on config file 4 years ago
jackun b0f36fad31
Expand paths only 4 years ago
FlightlessMango b0e1fe9321 [params] set targetFrameTime in params.cpp 4 years ago
FlightlessMango 71b602751d [meson] option to include_doc 4 years ago
jackun 6e40f9bdd5
Expand tilde to home dir if string param start with `~` 4 years ago
jackun f7a7256374
Clear options map so reloading config files actually has an effect 4 years ago
jackun 6b4103eae9
[config] Parse Wine application name without absolute path 4 years ago
jackun abef561573
Disable CPU stat(s) if it failed to initialize 4 years ago
jackun 712590befe
Check if CPU sensor file handle is valid 4 years ago
FlightlessMango 64a42df047 forgot to include functional 4 years ago
FlightlessMango cbb58ab79c make sure Xdisplay is closed on shutdown 4 years ago
FlightlessMango b3286cbe48 check if opengl/vulkan with is_vulkan bool 4 years ago
jackun 13e57578c3
Fix update_hud_info indentation 4 years ago
jackun 154380e056
Don't update time if not enabled 4 years ago
jackun 9a7a4d99e0
Don't update CPU freq/temp if not enabled 4 years ago
jackun 6bbc89a9cc
Don't update CPU stats if not enabled 4 years ago
jackun 16552b25e3 Don't update RAM/IO stats if not enabled 4 years ago
jackun c850507314
[OpenGL] Initialize MangoHud from glXSwapBuffers even if glXMakeCurrent is skipped for some reason 4 years ago
jackun fa41e6f882
Always configure vulkan json 4 years ago
jackun ad64bf345d
Update build scripts, again
Install to $prefix$libdir/mangohud by default.
4 years ago
jackun 50cef9621b
Remove ~/.local/share/MangoHud/MangoHud.conf support 4 years ago
jackun 57f3b3470d
Remove param_unit() 4 years ago
jackun 2e3f8077cb
Remove parse_output_file 4 years ago
jackun da9120f971
Add parse_signed() for gl_sync 4 years ago
jackun 125dbc1403
[OpenGL] Allow swap interval of -1 for adaptive sync, if supported 4 years ago
FlightlessMango e24f5dfc8b added log_duration param and updated readme 4 years ago
FlightlessMango b4cd837328 [OpenGL] custom font file 4 years ago
FlightlessMango 8641392ca7 added MANGOHUD_FONT to params as font_file 4 years ago
FlightlessMango d1bdf71580 added MANGOHUD_OUTPUT to params as output_file 4 years ago
jackun 4adb6ed25f
Convert tabs to spaces in cpu.cpp/cpu.h 4 years ago
jackun 72d7f6ef71
Print also a reason for skipping a config file 4 years ago
jackun 31a651133c
[OpenGL] Cleanup stderr output a little 4 years ago
jackun bbfad2e073
[OpenGL] Parse and initialize configuration just once 4 years ago
jackun a52dce875f
[OpenGL] Keep glClipControl local to imgui_impl_opengl3.cpp 4 years ago
jackun 05d61ee77e
Init CPUStats just once 4 years ago
FlightlessMango e68dd48f3f forgot one refresh_config 4 years ago
FlightlessMango fe69ec2955 changed refresh_config to reload_cfg 4 years ago
FlightlessMango 501d7d74d2 install example config with meson 4 years ago
jackun 5caeb10882
[OpenGL] Apply swap interval from glXMakeCurrent 4 years ago
jackun 297b44bfe6
[OpenGL] Force-load libGL.so.1 with dlopen() if dlsym fails to find functions 4 years ago
jackun e0ce0493f7
[OpenGL] Set swap interval (vsync) with `gl_vsync` param 4 years ago
FlightlessMango 8133048e9c Add blank configuration for project_name and layer_suffix with build.sh 4 years ago
FlightlessMango 8153e29eb3 forgot to add '/' to end of path 4 years ago
FlightlessMango 8599484032 configure .json files with meson 4 years ago
jackun 37e34335ae
Sprinkle NDEBUG over gl debug prints 4 years ago
jackun ad598f7ec4
[OpenGL] Fix double-free with ImGui context 4 years ago
jackun f99129f9de
Libdirs: once more, with feeling 4 years ago
jackun 4761078133
Fix small font for gl 4 years ago
jackun c88b930a37
Match gl PushPopStyle count with vulkan's 4 years ago
jackun bc7db582bd
Single ImGui context for OpenGL
Seems only VAO is not shareable between OpenGL context
but that gets recreated every render anyway.
4 years ago
jackun 373bba5fcf
Keep time outside the table or it gets clipped if using too fancy a format 4 years ago
FlightlessMango 8bf8723ad5 added param text_color 4 years ago
FlightlessMango 77b3033cc7 Removed frametime_alpha and replace it with an overall alpha for text and frametime 4 years ago
FlightlessMango a1eafc3403 Install .so into subdirectory in libdir 4 years ago
jackun a64b6cada2
Build/install scripts: verbose tar output and set files' owner/group to root 4 years ago
FlightlessMango 8558d038d7 refactored the install process 4 years ago
FlightlessMango ccf870e630 changed offset_x/y to int so it can be negative 4 years ago
FlightlessMango 88ad5de2ab Fix so preloading doesn't break vulkan layer 4 years ago
FlightlessMango 163c76bea7 added param background_color 4 years ago
FlightlessMango 28e765a6a3 added param frametime_alpha 4 years ago
FlightlessMango 906a8cde23 added param frametime_color 4 years ago
FlightlessMango a2735693ba Merge opengl into develop 4 years ago
FlightlessMango 755558ecb9 added param io_color 4 years ago
FlightlessMango d8b3c3c81f params for changing color of cpu, gpu, vram, ram and engine text 4 years ago
jackun 5e4bd7b8c8
Keep time outside the table or it gets clipped if using too fancy a format 4 years ago
jackun b4f1402461 Right align value texts 4 years ago
jackun e881a1538a Pre-convert crosshair's color to ImGui's format 4 years ago
jackun 1a8b98e09d Divide memory sizes by 1024 byte chunks 4 years ago
FlightlessMango 857dcf7fb8 use hmwon freq1/2 instead for amdgpu core/mem clocks 4 years ago
FlightlessMango 274b3e67ca don't extend hud width if gpu_stats is disabled 4 years ago
FlightlessMango 4d5f62386b added gpu mem and core clocks to hud 4 years ago
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).
4 years ago
FlightlessMango 534ca9416d Spruced up iostats and change to bool from custom 4 years ago
FlightlessMango 4847cb8e31 Using table for hud layout 4 years ago
jackun 2472e69205
Check if pApplicationInfo is null 4 years ago
jackun ea8f0ad666
Includes cleanup 4 years ago
jackun fad35b9540
Just check hwmon sysfs folder for cpu temp sensors 4 years ago
jackun 6bf37f8510
Add "time_format" parameter; update time string every "fps_sampling_period" interval
See std::put_time docs for supported formatting
4 years ago
jackun 9a4c9033fa
Support escaping delimiters in MANGOHUD_CONFIG 4 years ago
jackun 417b1aac8d
config: trim only surrounding whitespace 4 years ago
FlightlessMango 58c7831d5c hud width correction 4 years ago
FlightlessMango 80cff1ac86 Fixed hud width not applying 4 years ago
FlightlessMango 12ba4f9ea5 No need to set hud height manually anymore 4 years ago
jackun 8a348ffbf0
Disable gpu_timing for now
Issue #44
4 years ago
jackun b91be85ff9
Use std::unordered_map and std::mutex instead for object mapping and related cleanups 4 years ago
jackun 54950853b5
Remove redundant 'no_display' code 4 years ago
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.
4 years ago
jackun 8f66bd7d87
Set stats window height to ImGui::GetCursorPosY() 4 years ago
jackun 2fb0453e28
Create ImGui fonts per swapchain 4 years ago
FlightlessMango 099082affc Refresh config keybind 4 years ago
FlightlessMango 7593582f4a Fixed parsing crosshair color function 4 years ago
jackun 9053b63142
Allocate instance_data with "new" 4 years ago
jackun 68e880a101
config: rename param to "read_cfg" 4 years ago
jackun ad2ed4a99a
config: load highest priority config available only 4 years ago
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.
4 years ago
jackun f7e7146883
config: find_last_of can search for multiple characters, doh 4 years ago
jackun 6a45ac84b3
config: sometimes wine exe has forward-slashes instead 4 years ago
jackun 65b90fc01b
config file: respect XDG dirs
Other half of #37
4 years ago
jackun 67eab673d8
Override previous setting, std::unordered_map::insert() does not. 4 years ago
jackun 70d0e81c36
Clone vulkan headers if needed 4 years ago
Danilo Spinella 18edd4eb50 meson: Add option to use system vulkan headers 4 years ago
jackun 5c4816efa5
Unused instance_data 4 years ago
jackun 69cf83d3bc
config file: print that config file is skipped if we failed to open it 4 years ago
jackun 3e0eda559d
print if done parsing config file 4 years ago
jackun 6086a6b9ab
config file: try to detect Wine executable's path 4 years ago
jackun 169d5ff99a
Search configs in ~/.config/MangoHud 4 years ago
jackun 08debe5d09
Add per-executable config file support
* executable's name + ".conf" in config dir
* "MangoHud.conf" in executable's folder
4 years ago
jackun 90a93fd2fc
Add "get executable's path" function 4 years ago
jackun 74c9803087
config file: if parameter line has no equal sign, default value to 1 4 years ago
jackun 27848bd253
Don't crash if there's nothing to draw 4 years ago
FlightlessMango d8783d3002 Added time param 4 years ago
FlightlessMango 29bacea97f Add param option full 4 years ago