diff options
Diffstat (limited to 'drivers/vulkan')
-rw-r--r-- | drivers/vulkan/SCsub | 8 | ||||
-rw-r--r-- | drivers/vulkan/rendering_device_vulkan.cpp | 2 | ||||
-rw-r--r-- | drivers/vulkan/vulkan_context.cpp | 22 |
3 files changed, 19 insertions, 13 deletions
diff --git a/drivers/vulkan/SCsub b/drivers/vulkan/SCsub index 2576f68f92..85a5ae8d26 100644 --- a/drivers/vulkan/SCsub +++ b/drivers/vulkan/SCsub @@ -49,6 +49,14 @@ if env['builtin_vulkan']: 'FALLBACK_DATA_DIRS=\\"%s\\"' % '/usr/local/share:/usr/share', 'FALLBACK_CONFIG_DIRS=\\"%s\\"' % '/etc/xdg' ]) + elif env['platform'] == "iphone": + env_thirdparty.AppendUnique(CPPDEFINES=[ + 'VK_USE_PLATFORM_IOS_MVK', + 'VULKAN_NON_CMAKE_BUILD', + 'SYSCONFDIR=\\"%s\\"' % '/etc', + 'FALLBACK_DATA_DIRS=\\"%s\\"' % '/usr/local/share:/usr/share', + 'FALLBACK_CONFIG_DIRS=\\"%s\\"' % '/etc/xdg' + ]) elif env['platform'] == "x11": env_thirdparty.AppendUnique(CPPDEFINES=[ 'VK_USE_PLATFORM_XLIB_KHR', diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp index 7f7c787da2..2bf8a16091 100644 --- a/drivers/vulkan/rendering_device_vulkan.cpp +++ b/drivers/vulkan/rendering_device_vulkan.cpp @@ -5977,7 +5977,7 @@ void RenderingDeviceVulkan::draw_list_draw(DrawListID p_list, bool p_use_indices if (p_procedural_vertices > 0) { #ifdef DEBUG_ENABLED - ERR_FAIL_COND_MSG(dl->validation.pipeline_vertex_format == INVALID_ID, + ERR_FAIL_COND_MSG(dl->validation.pipeline_vertex_format != INVALID_ID, "Procedural vertices requested, but pipeline expects a vertex array."); #endif to_draw = p_procedural_vertices; diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp index 72acedb88f..7c691340ca 100644 --- a/drivers/vulkan/vulkan_context.cpp +++ b/drivers/vulkan/vulkan_context.cpp @@ -29,17 +29,19 @@ /*************************************************************************/ #include "vulkan_context.h" + #include "core/engine.h" #include "core/project_settings.h" #include "core/ustring.h" #include "core/version.h" + #include "vk_enum_string_helper.h" + #include <stdio.h> #include <stdlib.h> #include <string.h> #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) -#define VULKAN_DEBUG(m_text) print_line(m_text) #define APP_SHORT_NAME "GodotEngine" VKAPI_ATTR VkBool32 VKAPI_CALL VulkanContext::_debug_messenger_callback(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, @@ -47,16 +49,20 @@ VKAPI_ATTR VkBool32 VKAPI_CALL VulkanContext::_debug_messenger_callback(VkDebugU const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData, void *pUserData) { - //This error needs to be ignored because the AMD allocator will mix up memory types on IGP processors + // This error needs to be ignored because the AMD allocator will mix up memory types on IGP processors. if (strstr(pCallbackData->pMessage, "Mapping an image with layout") != NULL && strstr(pCallbackData->pMessage, "can result in undefined behavior if this memory is used by the device") != NULL) { return VK_FALSE; } - // This needs to be ignored because Validator is wrong here + // This needs to be ignored because Validator is wrong here. if (strstr(pCallbackData->pMessage, "SPIR-V module not valid: Pointer operand") != NULL && strstr(pCallbackData->pMessage, "must be a memory object") != NULL) { return VK_FALSE; } + // Workaround for Vulkan-Loader usability bug: https://github.com/KhronosGroup/Vulkan-Loader/issues/262. + if (strstr(pCallbackData->pMessage, "wrong ELF class: ELFCLASS32") != NULL) { + return VK_FALSE; + } if (strstr(pCallbackData->pMessageIdName, "UNASSIGNED-CoreValidation-DrawState-ClearCmdBeforeDraw") != NULL) { return VK_FALSE; } @@ -394,16 +400,12 @@ Error VulkanContext::_create_physical_device() { if (!strcmp(VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME, device_extensions[i].extensionName)) { extension_names[enabled_extension_count++] = VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME; VK_KHR_incremental_present_enabled = true; - VULKAN_DEBUG("VK_KHR_incremental_present extension enabled\n"); } if (enabled_extension_count >= MAX_EXTENSIONS) { free(device_extensions); ERR_FAIL_V_MSG(ERR_BUG, "Enabled extension count reaches MAX_EXTENSIONS, BUG"); } } - if (!VK_KHR_incremental_present_enabled) { - VULKAN_DEBUG("VK_KHR_incremental_present extension NOT AVAILABLE\n"); - } } if (VK_GOOGLE_display_timing_enabled) { @@ -416,16 +418,12 @@ Error VulkanContext::_create_physical_device() { if (!strcmp(VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME, device_extensions[i].extensionName)) { extension_names[enabled_extension_count++] = VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME; VK_GOOGLE_display_timing_enabled = true; - VULKAN_DEBUG("VK_GOOGLE_display_timing extension enabled\n"); } if (enabled_extension_count >= MAX_EXTENSIONS) { free(device_extensions); ERR_FAIL_V_MSG(ERR_BUG, "Enabled extension count reaches MAX_EXTENSIONS, BUG"); } } - if (!VK_GOOGLE_display_timing_enabled) { - VULKAN_DEBUG("VK_GOOGLE_display_timing extension NOT AVAILABLE\n"); - } } free(device_extensions); @@ -1137,7 +1135,7 @@ Error VulkanContext::initialize() { if (err) { return err; } - print_line("Vulkan physical device creation success o_O"); + return OK; } |