fix threading bug in vulkan rendering device

(cherry picked from commit c52fadbe75)
This commit is contained in:
Joe Marshall 2023-06-28 13:50:25 +01:00 committed by Yuri Sizov
parent cdeddffee7
commit fa6fb0ac70
1 changed files with 2 additions and 0 deletions

View File

@ -7470,6 +7470,7 @@ uint32_t RenderingDeviceVulkan::draw_list_get_current_pass() {
} }
RenderingDevice::DrawListID RenderingDeviceVulkan::draw_list_switch_to_next_pass() { RenderingDevice::DrawListID RenderingDeviceVulkan::draw_list_switch_to_next_pass() {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND_V(draw_list == nullptr, INVALID_ID); ERR_FAIL_COND_V(draw_list == nullptr, INVALID_ID);
ERR_FAIL_COND_V(draw_list_current_subpass >= draw_list_subpass_count - 1, INVALID_FORMAT_ID); ERR_FAIL_COND_V(draw_list_current_subpass >= draw_list_subpass_count - 1, INVALID_FORMAT_ID);
@ -7485,6 +7486,7 @@ RenderingDevice::DrawListID RenderingDeviceVulkan::draw_list_switch_to_next_pass
return int64_t(ID_TYPE_DRAW_LIST) << ID_BASE_SHIFT; return int64_t(ID_TYPE_DRAW_LIST) << ID_BASE_SHIFT;
} }
Error RenderingDeviceVulkan::draw_list_switch_to_next_pass_split(uint32_t p_splits, DrawListID *r_split_ids) { Error RenderingDeviceVulkan::draw_list_switch_to_next_pass_split(uint32_t p_splits, DrawListID *r_split_ids) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND_V(draw_list == nullptr, ERR_INVALID_PARAMETER); ERR_FAIL_COND_V(draw_list == nullptr, ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V(draw_list_current_subpass >= draw_list_subpass_count - 1, ERR_INVALID_PARAMETER); ERR_FAIL_COND_V(draw_list_current_subpass >= draw_list_subpass_count - 1, ERR_INVALID_PARAMETER);