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

RenderingDeviceVulkan: Make draw command labels thread safe #73057

Merged

Conversation

sakrel
Copy link
Contributor

@sakrel sakrel commented Feb 10, 2023

This PR fixes the following thread safety validation errors triggered during the TPS demo loading screen:

UNASSIGNED-Threading-MultipleThreads(ERROR / SPEC): msgNum: 337425955 - Validation Error: [ UNASSIGNED-Threading-MultipleThreads ] Object 0: handle = 0x2382a729190, type = VK_OBJECT_TYPE_COMMAND_POOL; | MessageID = 0x141cb623 | THREADING ERROR : vkCmdBeginDebugUtilsLabelEXT(): object of type VkCommandPool is simultaneously used in thread 5064 and thread 16372

UNASSIGNED-Threading-MultipleThreads(ERROR / SPEC): msgNum: 337425955 - Validation Error: [ UNASSIGNED-Threading-MultipleThreads ] Object 0: handle = 0x2382ab2e5f0, type = VK_OBJECT_TYPE_COMMAND_POOL; | MessageID = 0x141cb623 | THREADING ERROR : vkCmdPipelineBarrier(): object of type VkCommandPool is simultaneously used in thread 16372 and thread 5064

Thread 16372 is the main thread
Thread 5064 is a resource loader thread

threads2

Bugsquad edit: Fixes #51955

@sakrel sakrel requested a review from a team as a code owner February 10, 2023 20:47
@akien-mga akien-mga added this to the 4.0 milestone Feb 10, 2023
Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch! These should definitely be made thread safe as they can get called from many different places and so are bound to be called from multiple threads

@akien-mga akien-mga merged commit db60704 into godotengine:master Feb 11, 2023
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash (segfault) when opening/creating project due to Vulkan debug utils [Mesa Haswell]
3 participants