Show device's name and vulkan driver version

pull/139/head
jackun 4 years ago
parent 8b855e3251
commit 29e5c4e460
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -96,6 +96,7 @@ void imgui_create(void *ctx)
sw_stats.version_gl.is_gles);
deviceName = (char*)glGetString(GL_RENDERER);
sw_stats.deviceName = deviceName;
if (deviceName.find("Radeon") != std::string::npos
|| deviceName.find("AMD") != std::string::npos){
vendorID = 0x1002;

@ -1290,6 +1290,9 @@ void render_imgui(swapchain_stats& data, struct overlay_params& params, ImVec2&
"%d.%d%s", data.version_gl.major, data.version_gl.minor,
data.version_gl.is_gles ? " ES" : "");
}
ImGui::SameLine();
ImGui::TextColored(engine_color,
"/ %s", data.deviceName.c_str());
if (params.enabled[OVERLAY_PARAM_ENABLED_arch]){
ImGui::Dummy(ImVec2(0.0,5.0f));
ImGui::TextColored(engine_color, "%s", "" MANGOHUD_ARCH);
@ -2283,6 +2286,14 @@ static VkResult overlay_CreateSwapchainKHR(
swapchain_data->sw_stats.engineName = device_data->instance->engineName;
swapchain_data->sw_stats.engineVersion = device_data->instance->engineVersion;
std::stringstream ss;
ss << device_data->properties.deviceName;
ss << " (" << VK_VERSION_MAJOR(device_data->properties.driverVersion);
ss << "." << VK_VERSION_MINOR(device_data->properties.driverVersion);
ss << "." << VK_VERSION_PATCH(device_data->properties.driverVersion);
ss << ")";
swapchain_data->sw_stats.deviceName = ss.str();
return result;
}

@ -35,6 +35,7 @@ struct swapchain_stats {
} version_vk;
std::string engineName;
std::string engineVersion;
std::string deviceName;
};
struct fps_limit {
@ -55,4 +56,4 @@ void init_cpu_stats(overlay_params& params);
void check_keybinds(struct overlay_params& params);
void init_system_info(void);
void FpsLimiter(struct fps_limit& stats);
void imgui_custom_style(struct overlay_params& params);
void imgui_custom_style(struct overlay_params& params);

Loading…
Cancel
Save