summaryrefslogtreecommitdiffstats
path: root/drivers/vulkan/vulkan_context.cpp
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2021-08-12 14:24:54 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2021-08-12 14:25:15 +0300
commitd7957a2a2091a00c8ccdebb6900e5a0f21aa205d (patch)
tree86b99a97ef9540d46183ac9667c58cb124880821 /drivers/vulkan/vulkan_context.cpp
parent67fc611bda7b55b3eeab87f683a5c95ea0d0313f (diff)
downloadredot-engine-d7957a2a2091a00c8ccdebb6900e5a0f21aa205d.tar.gz
Use "volk" instead of statically linked Vulkan loader.
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;