浏览代码

Merge pull request #79849 from bitsawer/fix_particles_and_compute_threading

Fix Vulkan multithreaded compute list and GPU particle processing
Yuri Sizov 2 年之前
父节点
当前提交
21524e26e0
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/vulkan/rendering_device_vulkan.cpp

+ 2 - 0
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) {
 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(!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.");
 	ERR_FAIL_COND_V_MSG(compute_list != nullptr, INVALID_ID, "Only one draw/compute list can be active at the same time.");