Created
June 13, 2021 16:59
-
-
Save gort818/d00483cde2274377a10b5fc6d628f1c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/gl/imgui_hud.cpp b/src/gl/imgui_hud.cpp | |
index f835c65..769253e 100644 | |
--- a/src/gl/imgui_hud.cpp | |
+++ b/src/gl/imgui_hud.cpp | |
@@ -83,8 +83,8 @@ void imgui_init() | |
sw_stats.engineName = "WineD3D"; | |
else | |
sw_stats.engineName = "OpenGL"; | |
- if (engineName == "ZINK") | |
- sw_stats.engineName = engineName; | |
+ if (zink == 1) | |
+ sw_stats.engineName = "ZINK"; | |
is_blacklisted(true); | |
notifier.params = ¶ms; | |
start_notifier(notifier); | |
diff --git a/src/overlay.h b/src/overlay.h | |
index 27c8a34..b92f61a 100644 | |
--- a/src/overlay.h | |
+++ b/src/overlay.h | |
@@ -85,7 +85,7 @@ extern struct benchmark_stats benchmark; | |
extern ImVec2 real_font_size; | |
extern std::string wineVersion; | |
extern std::vector<logData> graph_data; | |
-extern string engineName; | |
+extern bool zink; | |
void position_layer(struct swapchain_stats& data, struct overlay_params& params, ImVec2 window_size); | |
void render_imgui(swapchain_stats& data, struct overlay_params& params, ImVec2& window_size, bool is_vulkan); | |
diff --git a/src/vulkan.cpp b/src/vulkan.cpp | |
index 6fca9f2..2075309 100644 | |
--- a/src/vulkan.cpp | |
+++ b/src/vulkan.cpp | |
@@ -66,7 +66,8 @@ | |
#include "pci_ids.h" | |
#include "timing.hpp" | |
-string gpuString,wineVersion,wineProcess,engineName; | |
+string gpuString,wineVersion,wineProcess; | |
+bool zink; | |
float offset_x, offset_y, hudSpacing; | |
int hudFirstRow, hudSecondRow; | |
VkPhysicalDeviceDriverProperties driverProps = {}; | |
@@ -2137,7 +2138,7 @@ static VkResult overlay_CreateInstance( | |
VkLayerInstanceCreateInfo *chain_info = | |
get_instance_chain_info(pCreateInfo, VK_LAYER_LINK_INFO); | |
- std::string engineVersion; | |
+ std::string engineVersion,engineName; | |
if (!is_blacklisted(true)) { | |
const char* pEngineName = nullptr; | |
if (pCreateInfo->pApplicationInfo) | |
@@ -2148,15 +2149,16 @@ static VkResult overlay_CreateInstance( | |
int engineVer = pCreateInfo->pApplicationInfo->engineVersion; | |
engineVersion = to_string(VK_VERSION_MAJOR(engineVer)) + "." + to_string(VK_VERSION_MINOR(engineVer)) + "." + to_string(VK_VERSION_PATCH(engineVer)); | |
} | |
- | |
if (engineName != "DXVK" && engineName != "vkd3d" && engineName != "Feral3D" && engineName != "Damavand" && engineName != "mesa zink") | |
engineName = "VULKAN"; | |
if (engineName == "vkd3d") | |
engineName = "VKD3D"; | |
- | |
- if (engineName == "mesa zink") | |
+ | |
+ if (engineName == "mesa zink") { | |
engineName = "ZINK"; | |
+ zink=1; | |
+ } | |
} | |
assert(chain_info->u.pLayerInfo); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment