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 use-after-free of texture handles #8302

Merged
merged 1 commit into from
Dec 7, 2024

Conversation

pixelflinger
Copy link
Collaborator

Because ColorPassDescriptorSet is used for both the color pass and the picking/ssr/structure passes, the texture it holds can be stale.

In this CL we fix this by reseting the offending textures when preparing the picking/ssr/structure passes. This has a side effect of recreating the descriptor-set internally. A better fix would be to use separate descriptor-sets for these two cases and rely on the texture cache to avoid recreation from a frame to the next.

BUGS=[376705346]

Because ColorPassDescriptorSet is used for both the color pass and the
picking/ssr/structure passes, the texture it holds can be stale.

In this CL we fix this by reseting the offending textures when preparing
the picking/ssr/structure passes. This has a side effect of recreating
the descriptor-set internally. A better fix would be to use separate
descriptor-sets for these two cases and rely on the texture cache
to avoid recreation from a frame to the next.

BUGS=[376705346]
@pixelflinger pixelflinger added the internal Issue/PR does not affect clients label Dec 6, 2024
@pixelflinger pixelflinger merged commit 6b7080e into main Dec 7, 2024
13 checks passed
@pixelflinger pixelflinger deleted the ma/shadowmap-use-after-free branch December 7, 2024 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Issue/PR does not affect clients
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants