1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +00:00

Use "volk" instead of statically linked Vulkan loader.

This commit is contained in:
bruvzg
2021-08-12 14:24:54 +03:00
parent 67fc611bda
commit d7957a2a20
91 changed files with 151190 additions and 121748 deletions

View File

@@ -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;