Skip to content

Use next's GPU metrics implementation for GPU_fdinfo class#2085

Merged
flightlessmango merged 6 commits into
flightlessmango:masterfrom
17314642:gpu-fdinfo-use-next
Jul 24, 2026
Merged

Use next's GPU metrics implementation for GPU_fdinfo class#2085
flightlessmango merged 6 commits into
flightlessmango:masterfrom
17314642:gpu-fdinfo-use-next

Conversation

@17314642

@17314642 17314642 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Every driver except for amdgpu and nvidia will now use gpu metrics from mangohud-next

I tested that it works on Intel ARC A770 using both 64-bit and 32-bit builds and mangoapp in gamescope.
proc_vram using fdinfo from mangohud-next for amdgpu also works

I implemented it using opaque pointer technique to not expose any headers from next to legacy and also making as little changes as possible to the mangohud-next's codebase.

@flightlessmango

Copy link
Copy Markdown
Owner

Could you squash or reorder e16441d and a5b77df so the amdgpu fdinfo path is not broken on bisect?

../../src/gpu_fdinfo.cpp:23:15: error: base operand of ‘->’ has non-pointer type ‘LegacyGPUWrapper’
   23 |     return gpu->get_process_vram_used(pid);
      |               ^~
ninja: build stopped: subcommand failed.```

@17314642
17314642 force-pushed the gpu-fdinfo-use-next branch from d2503f3 to a26c1f5 Compare July 6, 2026 18:12
@17314642

17314642 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Sure thing, done!

@17314642

Copy link
Copy Markdown
Contributor Author

@flightlessmango since #2073 is closed (msm metrics are fixed in this pr), this is fully ready!

17314642 added 5 commits July 23, 2026 20:10
and replace using GPU_fdinfo in amdgpu for proc_vram to FDInfo
Quote from cppreference:
regex_match - attempts to match a regular expression to an ENTIRE character sequence
regex_search -  attempts to match a regular expression to ANY PART of a character sequence

in this case we want partial matches instead of full matches
if we want full match, we should specify it in regex expression
@17314642
17314642 force-pushed the gpu-fdinfo-use-next branch from 0803f4a to 9ac55f8 Compare July 23, 2026 17:14
@flightlessmango
flightlessmango merged commit a36e3ce into flightlessmango:master Jul 24, 2026
2 checks passed
@17314642
17314642 deleted the gpu-fdinfo-use-next branch July 24, 2026 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants