diff options
Diffstat (limited to 'drivers/vulkan/vulkan_context.cpp')
-rw-r--r-- | drivers/vulkan/vulkan_context.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp index 9471b4604c..875ace32a5 100644 --- a/drivers/vulkan/vulkan_context.cpp +++ b/drivers/vulkan/vulkan_context.cpp @@ -49,7 +49,6 @@ VKAPI_ATTR VkBool32 VKAPI_CALL VulkanContext::_debug_messenger_callback( VkDebugUtilsMessageTypeFlagsEXT messageType, const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData, void *pUserData) { - // 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") != nullptr && strstr(pCallbackData->pMessage, "can result in undefined behavior if this memory is used by the device") != nullptr) { @@ -163,7 +162,6 @@ VkBool32 VulkanContext::_check_layers(uint32_t check_count, const char **check_n } Error VulkanContext::_create_validation_layers() { - VkResult err; const char *instance_validation_layers_alt1[] = { "VK_LAYER_KHRONOS_validation" }; const char *instance_validation_layers_alt2[] = { "VK_LAYER_LUNARG_standard_validation" }; @@ -218,7 +216,6 @@ Error VulkanContext::_create_validation_layers() { } Error VulkanContext::_initialize_extensions() { - VkResult err; uint32_t instance_extension_count = 0; @@ -275,7 +272,6 @@ Error VulkanContext::_initialize_extensions() { } Error VulkanContext::_create_physical_device() { - /* Look for validation layers */ if (use_validation_layers) { _create_validation_layers(); @@ -513,7 +509,6 @@ Error VulkanContext::_create_physical_device() { } Error VulkanContext::_create_device() { - VkResult err; float queue_priorities[1] = { 0.0 }; VkDeviceQueueCreateInfo queues[2]; @@ -552,7 +547,6 @@ Error VulkanContext::_create_device() { } Error VulkanContext::_initialize_queues(VkSurfaceKHR surface) { - // Iterate over each queue to learn whether it supports presenting: VkBool32 *supportsPresent = (VkBool32 *)malloc(queue_family_count * sizeof(VkBool32)); for (uint32_t i = 0; i < queue_family_count; i++) { @@ -705,7 +699,6 @@ Error VulkanContext::_create_semaphores() { } Error VulkanContext::_window_create(DisplayServer::WindowID p_window_id, VkSurfaceKHR p_surface, int p_width, int p_height) { - ERR_FAIL_COND_V(windows.has(p_window_id), ERR_INVALID_PARAMETER); if (!queues_initialized) { @@ -766,7 +759,6 @@ void VulkanContext::window_destroy(DisplayServer::WindowID p_window_id) { } Error VulkanContext::_clean_up_swap_chain(Window *window) { - if (!window->swapchain) { return OK; } @@ -1136,7 +1128,6 @@ Error VulkanContext::_update_swap_chain(Window *window) { } Error VulkanContext::initialize() { - Error err = _create_physical_device(); if (err) { return err; @@ -1150,7 +1141,6 @@ void VulkanContext::set_setup_buffer(const VkCommandBuffer &pCommandBuffer) { } void VulkanContext::append_command_buffer(const VkCommandBuffer &pCommandBuffer) { - if (command_buffer_queue.size() <= command_buffer_count) { command_buffer_queue.resize(command_buffer_count + 1); } @@ -1160,14 +1150,12 @@ void VulkanContext::append_command_buffer(const VkCommandBuffer &pCommandBuffer) } void VulkanContext::flush(bool p_flush_setup, bool p_flush_pending) { - // ensure everything else pending is executed vkDeviceWaitIdle(device); //flush the pending setup buffer if (p_flush_setup && command_buffer_queue[0]) { - //use a fence to wait for everything done VkSubmitInfo submit_info; submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; @@ -1186,7 +1174,6 @@ void VulkanContext::flush(bool p_flush_setup, bool p_flush_pending) { } if (p_flush_pending && command_buffer_count > 1) { - //use a fence to wait for everything done VkSubmitInfo submit_info; @@ -1208,7 +1195,6 @@ void VulkanContext::flush(bool p_flush_setup, bool p_flush_pending) { } Error VulkanContext::prepare_buffers() { - if (!queues_initialized) { return OK; } @@ -1220,7 +1206,6 @@ Error VulkanContext::prepare_buffers() { vkResetFences(device, 1, &fences[frame_index]); for (Map<int, Window>::Element *E = windows.front(); E; E = E->next()) { - Window *w = &E->get(); if (w->swapchain == VK_NULL_HANDLE) { @@ -1256,7 +1241,6 @@ Error VulkanContext::prepare_buffers() { } Error VulkanContext::swap_buffers() { - if (!queues_initialized) { return OK; } @@ -1551,7 +1535,6 @@ VkDevice VulkanContext::local_device_get_vk_device(RID p_local_device) { } void VulkanContext::local_device_push_command_buffers(RID p_local_device, const VkCommandBuffer *p_buffers, int p_count) { - LocalDevice *ld = local_device_owner.getornull(p_local_device); ERR_FAIL_COND(ld->waiting); @@ -1582,7 +1565,6 @@ void VulkanContext::local_device_push_command_buffers(RID p_local_device, const } void VulkanContext::local_device_sync(RID p_local_device) { - LocalDevice *ld = local_device_owner.getornull(p_local_device); ERR_FAIL_COND(!ld->waiting); @@ -1591,7 +1573,6 @@ void VulkanContext::local_device_sync(RID p_local_device) { } void VulkanContext::local_device_free(RID p_local_device) { - LocalDevice *ld = local_device_owner.getornull(p_local_device); vkDestroyDevice(ld->device, nullptr); local_device_owner.free(p_local_device); |