summaryrefslogtreecommitdiffstats
path: root/drivers/vulkan
diff options
context:
space:
mode:
authorbitsawer <sawerduster@gmail.com>2023-07-24 12:56:55 +0300
committerbitsawer <sawerduster@gmail.com>2023-07-24 12:56:55 +0300
commit5d18e2ee001f1cecd544b23c29f96daae638adc8 (patch)
treeea87864033345623048a566dab1bfcb919ccc60b /drivers/vulkan
parent6588a4a29af1621086feac0117d5d4d37af957fd (diff)
downloadredot-engine-5d18e2ee001f1cecd544b23c29f96daae638adc8.tar.gz
Fix Vulkan multithreaded compute list and GPU particle processing
Diffstat (limited to 'drivers/vulkan')
-rw-r--r--drivers/vulkan/rendering_device_vulkan.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp
index a88ddd6b5a..91fe63aad1 100644
--- a/drivers/vulkan/rendering_device_vulkan.cpp
+++ b/drivers/vulkan/rendering_device_vulkan.cpp
@@ -7766,6 +7766,8 @@ void RenderingDeviceVulkan::draw_list_end(BitField<BarrierMask> 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.");