summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2023-08-31 15:27:44 -0400
committerJonathan Bradley <jcb@pikum.xyz>2023-09-06 17:22:31 -0400
commit3c115e49721bd479ee04d7b8410897869a779258 (patch)
tree5ceac8700f26557adebdade124771eb456a449b5
parent4955f728f282e6730193e307a50f8ae174a432c3 (diff)
expose vkPhysicalDeviceProperties
-rw-r--r--src/window.cpp6
-rw-r--r--src/window.hpp1
2 files changed, 4 insertions, 3 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 63b18be..a4fc5a2 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -14,6 +14,7 @@ const bool VULKAN_DEBUG_REPORT = true;
GLFWwindow *window = nullptr;
VkInstance vkInstance = nullptr;
VkPhysicalDevice vkPhysicalDevice = nullptr;
+VkPhysicalDeviceProperties vkPhysicalDeviceProperties;
VkDevice vkDevice = nullptr;
VkQueue graphicsQueue = nullptr;
VkQueue presentQueue = nullptr;
@@ -299,9 +300,8 @@ void InitVulkan() {
}
vkPhysicalDevice = device;
- VkPhysicalDeviceProperties deviceProps;
- vkGetPhysicalDeviceProperties(vkPhysicalDevice, &deviceProps);
- printf("Selected VkPhysicalDevice: %s\n", deviceProps.deviceName);
+ vkGetPhysicalDeviceProperties(vkPhysicalDevice, &vkPhysicalDeviceProperties);
+ printf("Selected VkPhysicalDevice: %s\n", vkPhysicalDeviceProperties.deviceName);
break;
}
assert(vkPhysicalDevice != nullptr && "Failed to find suitable physical device");
diff --git a/src/window.hpp b/src/window.hpp
index d9fc23f..6dc690b 100644
--- a/src/window.hpp
+++ b/src/window.hpp
@@ -20,6 +20,7 @@ const unsigned int MAX_FRAMES_IN_FLIGHT = 2;
extern GLFWwindow *window;
extern VkInstance vkInstance;
extern VkPhysicalDevice vkPhysicalDevice;
+extern VkPhysicalDeviceProperties vkPhysicalDeviceProperties;
extern VkSurfaceKHR vkSurfaceKHR;
extern VkDevice vkDevice;