From 7d76bcbac6e687d026a920de9a2a319e1b2708e9 Mon Sep 17 00:00:00 2001 From: bitsawer Date: Mon, 24 Jul 2023 12:56:55 +0300 Subject: [PATCH] Fix Vulkan multithreaded compute list and GPU particle processing (cherry picked from commit 5d18e2ee001f1cecd544b23c29f96daae638adc8) --- drivers/vulkan/rendering_device_vulkan.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp index 517f2b78a82..d06a78f0494 100644 --- a/drivers/vulkan/rendering_device_vulkan.cpp +++ b/drivers/vulkan/rendering_device_vulkan.cpp @@ -7731,6 +7731,8 @@ void RenderingDeviceVulkan::draw_list_end(BitField p_post_barrier) /***********************/ RenderingDevice::ComputeListID RenderingDeviceVulkan::compute_list_begin(bool p_allow_draw_overlap) { + _THREAD_SAFE_METHOD_ + ERR_FAIL_COND_V_MSG(!p_allow_draw_overlap && draw_list != nullptr, INVALID_ID, "Only one draw list can be active at the same time."); ERR_FAIL_COND_V_MSG(compute_list != nullptr, INVALID_ID, "Only one draw/compute list can be active at the same time.");