Commit Graph

441 Commits (master)

Author SHA1 Message Date
FlightlessMango b8bd09d638 More windows fixes 1 year ago
FlightlessMango 915a3babad Add preset param and allow for preset config 1 year ago
FlightlessMango 22d374cc13 steam deck: fix fan speed 1 year ago
FlightlessMango d84c85609a overlay: position: bottom center 1 year ago
FlightlessMango 175493c89c horizontal: default to max width 1 year ago
FlightlessMango 8cf92ff8a6 overlay: horizontal_separator func 1 year ago
Emil Velikov eecd451068 meson: build with -Werror=missing-declarations
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
1 year ago
Emil Velikov b714f54cd4 dbus: reshuffle HAVE_DBUS handling
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
1 year ago
FlightlessMango 3190778086 Don't update metrics if we're not logging and not displaying 1 year ago
FlightlessMango d6c7b3c101 logging: write to file while logging 1 year ago
Alessandro Toia f6d980696d Fix not finding wine binary, with 64bit only wine 1 year ago
Kurt Kartaltepe 1a3fa6e4ff overlay: Fixup device detection on intel GPUs
This resolves missing GPU names due to deviceID only being computed for
AMD gpus. It also filters out display adapters so there is less noise in
the logs when scanning cards.
1 year ago
FlightlessMango 7dee12a75a params: toggle_hud_position 1 year ago
Alessandro Toia 5bf4091cdf Add window padding if hud_compact = 0 1 year ago
FlightlessMango f8ca49f627 allow for compact hud layout 2 years ago
FlightlessMango e38413b2d8 use intel_gpu_top for gpu stats 2 years ago
FlightlessMango e6c5ff4a4b overlay.cpp: fixed renamed check metrics function 2 years ago
FlightlessMango d0a1c4ea07 horizontal view and hud_no_margin 2 years ago
jackun 05133ae3cd
When `pci_dev` is set, don't skip AMD gpu if device id doesn't match 2 years ago
jackun 61716494c1
Check if data logger is valid 2 years ago
jackun acfc62a434
Check if ImGui::BeginTable actually begun 2 years ago
Alessandro Toia 32cd485568 Remove uppercase MANGOHUD_LOG_LEVEL strings 2 years ago
Alessandro Toia f0c3d123f5 Simplify MANGOHUD_LOG_LEVEL TO SPDLOG_LEVEL 2 years ago
Alessandro Toia 6e2e1d3967 Add check for valid log_level when using MANGOHUD_LOG_LEVEL 2 years ago
Alessandro Toia c27de42465 use MANGOHUD_LOG_LEVEL env var to control SPDLOG_LEVEL 2 years ago
jackun 0916dadea6
Convert some "printfs" to spdlog 2 years ago
jackun f680c28f1f
Generalize control over socket so it works with OpenGL too 2 years ago
PMunkes 6a010d8eab Introduce FCAT overlay support
This introduces support to overlay FCAT markers on top of other HUD elements.
For more information about nVidia's FCAT tool see: https://nvidia.com/en-us/geforce/technologies/fcat/technology
This patch includes support for the existing parameter infrastructure and it is fully dynamic.

Squashed commit:

Refactor FCAT to use existing parameter handling infrastructure

With this patch the FCAT overlay should be hooked up into the normal
parameter handling infrastructure. This includes support for
configuration file options, which are also part of this commit.
2 years ago
Alessandro Toia a18cabb152 Move gamepad_update to update_hw_info 2 years ago
jackun 753dd96325
Use overlay_new/end_frame to push/pop custom ImGui styles 2 years ago
jackun f4cbb8b14b
When available (i.e. using vulkan), check vendor/device id and skip device if no match 2 years ago
jackun ac7c898ba7
Use uint32_t for device id etc 2 years ago
jackun d73932ad17
Clean up getAmdGpuInfo_actual 2 years ago
jackun bd2f7b24b8
Snapshot some paths so moving stuff around doesn't randomly break things 2 years ago
FlightlessMango 17d4c1dd4a amdgpu: use gtt_used for APUs 2 years ago
FlightlessMango 19fbd9bf9b Nvidia: only do throttling checks if enabled 2 years ago
FlightlessMango 5d6ebe2f38 Logging: use same data for benchmark and summary 2 years ago
FlightlessMango b30302c889 amdgpu: prefer hwmon over gpu_metrics for gpu temp
Co-authored-by: Martin Roukala <martin.roukala@mupuf.org>
2 years ago
FlightlessMango 350dca5d21 Dynamic width when fps_only 2 years ago
FlightlessMango 4f9d870c72 fan: add some checks 2 years ago
FlightlessMango 65e70c9cfb fan param 2 years ago
jackun 1f90b0b2aa
Revert "overlay: remove HUDElements.params setter"
This reverts commit 14ddc9563f.

HUDElements.params gets stale. Needs a proper fix though.
2 years ago
jackun 3ee1048acf Check if amdgpu gpu_metrics can be read and do some sanity-checks 2 years ago
Emil Velikov 14ddc9563f
overlay: remove HUDElements.params setter
HUDElements.params is already set in the parse_overlay_config() call
before we even get here.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2 years ago
Emil Velikov 2b7db32f54
Const annotate overlay_params& across the board
Most of the API does not modify it, so annotate it as const.
This makes it earlier to reason what's happening.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2 years ago
Emil Velikov 9639377694
overlay: annotate render_benchmark() as static
Function is used solely within the compilation unit.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2 years ago
Emil Velikov 5a53ad010f
overlay: position_layer() takes an immutable window_size
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2 years ago
jackun f4ea65429e
No frame time for first frame
We don't know when it started to render, so...
2 years ago
jackun a13b041d1d
Fps limit: simplify converting frame time back to fps 2 years ago
jackun d2d6787568
Cleanup some header inclusions 2 years ago
jackun 73da29d4ad
Try to init spdlog a bit earlier 2 years ago
jackun 2f5efc320a
Move FpsLimiter to overlay.cpp 2 years ago
Emil Velikov 816d9f6b98 overlay: rework misleading gpu_busy_percent check
Above all, we really don't need the gpu_busy_percent node, if the GPU
exposes a gpu_metrics node,

Although looking closer, the gpu_busy_percent check is meant for
something else - to distinguish between the card node (cardX) and the
card output node (cardX-output-foo).

To top it all up, the check at the very end implies that we can get a
case where gpu_metrics and gpu_busy_perfect is missing ... that's not
possible.

So instead, drop the early gpu_busy_perfect check and properly mandate
it later on.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2 years ago
Emil Velikov 17bfd6ed08 Skip the standalone nodes, when gpu_metrics is present
Currently we open the standalone busy, temp, gpu/memory clock and
power_usage nodes, even if gpu_metrics is present.

At the same time, we correctly ignore them when doing the read-only.
So just avoid opening them all together.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2 years ago
Emil Velikov 5143229bd1 Fix gpu_stats logic check
Currently we can get the load and temp stats either from the standalone
nodes or from the gpu_metrics (binary) sysfs node.

Fix the next to handle that.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2 years ago
Emil Velikov a7e8ae9417 Remove dummy vendorID overwrite in init_gpu_stats()
We have already enforced that a few lines above just after parsing the
vendor node.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2 years ago
Emil Velikov 2aa49caf52 Remove find_folder() API
Can be trivially replaced with ls()

v2: Move break where it's supposed to.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2 years ago
Emil Velikov 68ce8f81cc Remove libdrm_amdgpu metrics
There are two alternatives - hwmon entries and gpu_metrics sysfs file.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2 years ago
Emil Velikov 7ad24b4c0a Simplify cpu/mem/os/glxinfo parsing
Currently we pipeline a bunch of commands alike cat | grep | sed, there
we can do all that job with a single sed invocation - use that.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2 years ago
jackun 822bb66629
Fix confusing vendorID with deviceID
OpenGL still needs some work to select the actual render device >:(
2 years ago
jackun 8e21b52acf
Make `get_device_name` return GPU name 2 years ago
Emil Velikov 597f78cbee Fixup device/vendor node handling
Currently we readout the data as string only to convert it to hex. In
the error case, we leak the fd for the given nodes.

Read the data as hex directly, error out if that fails and avoid the
leaks.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2 years ago
FlightlessMango ae7c5f0f24 Fix hud benchmark 2 years ago
jackun a029dfaaf2
Don't hide gpu_metrics behind HAVE_LIBDRM_AMDGPU 2 years ago
FlightlessMango 93f389dd62 clean up frametime_data 2 years ago
FlightlessMango 3a667ab66b Revert FPS calc 2 years ago
jackun e555a942fb
Use single IO stats instance 2 years ago
FlightlessMango fa133940c8 Fix min/max frametime 2 years ago
FlightlessMango 316914da8d mangoapp: fixed mangoapp not respecting no_display 2 years ago
FlightlessMango c708b1a8a8 disable deviceid check for now 2 years ago
FlightlessMango 6983c2ec39 Use gpu_metrics instead of libdrm when available 2 years ago
FlightlessMango fb1cae9cc9 display min/max frametime for period 2 years ago
FlightlessMango 46730b572a permit starting a new log even if previous is rendering 2 years ago
flightlessmango 0f49c5796a
Merge pull request #671 from Joshua-Ashton/empty_crash
Fix crash when no frames were recorded
2 years ago
Joshua Ashton 437563fa77 Fix crash when no frames were recorded
This can happen with MangoApp + the Steam Deck UI as it doesn't commit when there is nothing going on
2 years ago
FlightlessMango 3d3916247a mangoapp: force benchmark underneath 2 years ago
flightlessmango 1f94e0af4d
Merge pull request #657 from ishitatsuyuki/quad
overlay: avoid quadratic behavior
2 years ago
FlightlessMango 37e18279e7 mangoapp: use amdgpu metrics 2 years ago
FlightlessMango 3366120364 Move calc benchmark into logger 2 years ago
FlightlessMango a1b7b55a54 Use hudelements params in logging 2 years ago
jackun 4a33838bcd
Add extra parentheses to make compiler happy 2 years ago
FlightlessMango 9758d2a286 Try to get correct amd gpu when multiple 2 years ago
FlightlessMango cfd802c063 Incorrect param used in calc benchmark 2 years ago
FlightlessMango 7212c79feb Logging: push param to benchmark calc 2 years ago
Tatsuyuki Ishi ada173e67f overlay: avoid quadratic behavior
Using a vector with erase(begin()) results in a copy of the full array
every time. This is inefficient and in the case of HUD graphs, was having
quadratic complexity which can noticeably affect performance.

This patch replaces most of the operations with an O(1) alternative,
keeping the total cost under a linear bound. While on this, also refactor
the size of graph array into a constant.
2 years ago
FlightlessMango ee7f3fbfd2 Mangoapp: frametime message queue 3 years ago
FlightlessMango 9434033083 Don't use read_line as it causes issue with splitgate 3 years ago
FlightlessMango 23ed317536 mangoapp: shm struct + gamescope engine 3 years ago
Stephan Lachnit 4983056600 fix regression in hw_info_updater
Calling std::unique_lock in update() will cause a delay if
update_hw_info() takes longer than the period when update() is called.
To fix this, a try_to_lock tag is added. update() will only update if
the lock is aquired, else the update call is skipped.

Signed-off-by: Stephan Lachnit <stephanlachnit@debian.org>
3 years ago
FlightlessMango 5fee3bc5e3 Change _params to pointer 3 years ago
FlightlessMango b001eb4714 Move _params init to overlay.cpp 3 years ago
FlightlessMango 4e3a40c6ef mangoapp + gamescope shm 3 years ago
jackun abf146f73c
Set correct swapchain_stats etc references for hw updater 3 years ago
jackun 9b6a39dfe9
sed s/gnu_linux/linux/g 3 years ago
jackun 90e48f95ca
Use unversioned `fmt::format_error` 3 years ago
jackun 6584f23a6c
Use `ghc::filesystem` to iterate over /proc/self/map_files 3 years ago
jackun c452609718
Fix hw update thread waiting for initial update signal 3 years ago
FlightlessMango 947f287a5e
Only create hw_info_thread once 3 years ago
jackun 729ccc83bd
Use spdlog's 'fmt' to format media player metadata
Usage:
  media_player_format={title};{artist};{album}

Semi-colon breaks to new line, might change.
3 years ago
FlightlessMango 3ac7772a55 Add universal param 3 years ago