Race condition in shader object layer?
qbojj opened this issue · 3 comments
In UpdateDrawState
CommandBufferData& data
is guaranteed to be externally-synchronized and it owns the FullDrawStateData *state_data
.
What worries me is that Shader *vertex_or_mesh_shader
taken from state_data->GetShader(...)
is not and Shader::pipelines
does not use mutexes. I haven't found anything that makes accesses to different Shader
s synchronized.
So is it a race condition or is access to VkShaderEXT
(being bound to a command buffer) externally-synchronized or something else?
Vulkan-ExtensionLayer/layers/shader_object.cpp
Lines 2436 to 2442 in ace98ff
You are correct, this is a bug. Thank you for reporting the issue
Reopening because @qbojj wrote the following:
There's still a problem.
If a pipeline was created in another thread during locking of data for writing, that pipeline should be bound, but in current implementation VK_NULL_HANDLE is bound.
Vulkan-ExtensionLayer/layers/shader_object.cpp
Lines 2488 to 2498 in 6282367
nevermind, the new problem is now in #282