Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose stats of all GPUs #532

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open

Conversation

Zakhrov
Copy link

@Zakhrov Zakhrov commented May 26, 2021

This is #531 rebased against develop.

@jackun
Copy link
Collaborator

jackun commented May 26, 2021

Next time just do git push -f to same branch, no need for new PR ;) Of course if it is in a feature branch and not in master etc

@Zakhrov
Copy link
Author

Zakhrov commented May 26, 2021

Next time just do git push -f to same branch, no need for new PR ;) Of course if it is in a feature branch and not in master etc

Yeah well I had it in master

@@ -65,12 +65,18 @@ void update_hw_info(struct swapchain_stats& sw_stats, struct overlay_params& par
// Save data for graphs
if (graph_data.size() > 50)
graph_data.erase(graph_data.begin());
graph_data.push_back(currentLogData);
#ifdef _WIN32
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This chunk is pointless it seems

src/vulkan.cpp Outdated
@@ -614,11 +638,11 @@ void init_system_info(){
const char* mangohud_recursion = getenv("MANGOHUD_RECURSION");
if (!mangohud_recursion) {
setenv("MANGOHUD_RECURSION", "1", 1);
driver = exec("glxinfo -B | grep 'OpenGL version' | sed 's/^.*: //' | sed 's/([^()]*)//g' | tr -s ' '");
driver = exec("glxinfo -B | grep 'OpenGL version' | sed 's/^.*: //' | cut -d' ' --output-delimiter=$'\n' -f1- | grep -v '(' | grep -v ')' | tr '\n' ' ' | cut -c 1-");
Copy link
Collaborator

@jackun jackun May 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated change from rebasing?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I guess those are left over from merge conflict resolution

src/vulkan.cpp Outdated
trim(driver);
unsetenv("MANGOHUD_RECURSION");
} else {
driver = "MangoHud glxinfo recursion detected";
driver = "MangoHud glxinfo recurssion detected";
Copy link
Collaborator

@jackun jackun May 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated change from rebasing

ImGui::TableNextRow(); ImGui::TableNextColumn();
const char* gpu_text;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for turning it into std::string instead?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was concatenating the name of the GPU. I've since put that on a separate hud element but we could keep it as a std::string in case we need to add GPU indices (GPU 1,GPU 2 etc)

@jackun
Copy link
Collaborator

jackun commented Sep 18, 2021

Thought going with a bit more cpp-ish way, check https://github.com/flightlessmango/MangoHud/tree/libdrm-radeon
I've added a show_all_gpus (can has better name?) option to force drawing all gpus' stats.

@jackun
Copy link
Collaborator

jackun commented Jul 13, 2022

Is this way enough? https://github.com/flightlessmango/MangoHud/tree/multi-gpu
Probably needs some checking before merge that it selects correct gpu for single mode and maybe add some gpu selection options, not just all or single :P

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.

3 participants