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 a CVulkanCmdBuffer leak that could result in screenshot request f… #1603

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

lostgoat
Copy link
Collaborator

…ailures

CVulkanDevice::resetCmdBuffers expects m_pendingCmdBufs to be sorted. Using an unordered_map can result in cases where we eagerly exit out of the loop without fully cleaning all the relevant resources. This will result in leaking the command buffer and any resources it transitively references.

This can be a problem for screenshots as there are only two screenshot image slots available. If we leak references to these images, at some point we won't be able to allocate new images for screenshot capture and the operation will fail.

…ailures

CVulkanDevice::resetCmdBuffers expects m_pendingCmdBufs to be sorted.
Using an unordered_map can result in cases where we eagerly exit out of
the loop without fully cleaning all the relevant resources. This will
result in leaking the command buffer and any resources it transitively
references.

This can be a problem for screenshots as there are only two screenshot
image slots available. If we leak references to these images, at some
point we won't be able to allocate new images for screenshot capture and
the operation will fail.
@misyltoad misyltoad merged commit 7dd1bcd into ValveSoftware:master Oct 29, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants