summaryrefslogtreecommitdiff
path: root/drivers/vulkan/vulkan_context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/vulkan/vulkan_context.cpp')
-rw-r--r--drivers/vulkan/vulkan_context.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp
index a9d0fb6fed..87749450c4 100644
--- a/drivers/vulkan/vulkan_context.cpp
+++ b/drivers/vulkan/vulkan_context.cpp
@@ -681,6 +681,10 @@ Error VulkanContext::_create_physical_device() {
inst_initialized = true;
+#ifdef USE_VOLK
+ volkLoadInstance(inst);
+#endif
+
/* Make initial call to query gpu_count, then second call for gpu info*/
err = vkEnumeratePhysicalDevices(inst, &gpu_count, nullptr);
ERR_FAIL_COND_V(err, ERR_CANT_CREATE);
@@ -1669,6 +1673,11 @@ Error VulkanContext::_update_swap_chain(Window *window) {
}
Error VulkanContext::initialize() {
+#ifdef USE_VOLK
+ if (volkInitialize() != VK_SUCCESS) {
+ return FAILED;
+ }
+#endif
Error err = _create_physical_device();
if (err) {
return err;