Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing _THREAD_SAFE_METHOD_ missing from RenderingDeviceVulkan submit and sync #79526

Merged
merged 1 commit into from
Jul 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions drivers/vulkan/rendering_device_vulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7780,6 +7780,8 @@ RenderingDevice::ComputeListID RenderingDeviceVulkan::compute_list_begin(bool p_
}

void RenderingDeviceVulkan::compute_list_bind_compute_pipeline(ComputeListID p_list, RID p_compute_pipeline) {
// Must be called within a compute list, the class mutex is locked during that time

ERR_FAIL_COND(p_list != ID_TYPE_COMPUTE_LIST);
ERR_FAIL_COND(!compute_list);

Expand Down Expand Up @@ -7844,6 +7846,8 @@ void RenderingDeviceVulkan::compute_list_bind_compute_pipeline(ComputeListID p_l
}

void RenderingDeviceVulkan::compute_list_bind_uniform_set(ComputeListID p_list, RID p_uniform_set, uint32_t p_index) {
// Must be called within a compute list, the class mutex is locked during that time

ERR_FAIL_COND(p_list != ID_TYPE_COMPUTE_LIST);
ERR_FAIL_COND(!compute_list);

Expand Down Expand Up @@ -8018,6 +8022,8 @@ void RenderingDeviceVulkan::compute_list_set_push_constant(ComputeListID p_list,
}

void RenderingDeviceVulkan::compute_list_dispatch(ComputeListID p_list, uint32_t p_x_groups, uint32_t p_y_groups, uint32_t p_z_groups) {
// Must be called within a compute list, the class mutex is locked during that time

ERR_FAIL_COND(p_list != ID_TYPE_COMPUTE_LIST);
ERR_FAIL_COND(!compute_list);

Expand Down Expand Up @@ -8161,6 +8167,8 @@ void RenderingDeviceVulkan::compute_list_dispatch_indirect(ComputeListID p_list,
}

void RenderingDeviceVulkan::compute_list_add_barrier(ComputeListID p_list) {
// Must be called within a compute list, the class mutex is locked during that time

uint32_t barrier_flags = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT;
uint32_t access_flags = VK_ACCESS_SHADER_READ_BIT;
_compute_list_add_barrier(BARRIER_MASK_COMPUTE, barrier_flags, access_flags);
Expand Down Expand Up @@ -8649,6 +8657,8 @@ void RenderingDeviceVulkan::swap_buffers() {
}

void RenderingDeviceVulkan::submit() {
_THREAD_SAFE_METHOD_

ERR_FAIL_COND_MSG(local_device.is_null(), "Only local devices can submit and sync.");
ERR_FAIL_COND_MSG(local_device_processing, "device already submitted, call sync to wait until done.");

Expand All @@ -8660,6 +8670,8 @@ void RenderingDeviceVulkan::submit() {
}

void RenderingDeviceVulkan::sync() {
_THREAD_SAFE_METHOD_

ERR_FAIL_COND_MSG(local_device.is_null(), "Only local devices can submit and sync.");
ERR_FAIL_COND_MSG(!local_device_processing, "sync can only be called after a submit");

Expand Down