Skip to content

Conversation

@nikitalita
Copy link
Contributor

TextureStorage for the real renderers caches images in debug builds, and the dummy texture storage caches them in all builds. Thus, if GLTFDocument::serialize() is running on multiple threads and is serializing models that share the same material, we run the risk of a segfault when we modify the images during serializing materials.

@clayjohn suggested that we should duplicate the images when we modify them to avoid this. Thus, I have modified it such that whenever we decompress and/or modify an image, we duplicate the image first.

@nikitalita nikitalita requested a review from a team as a code owner December 26, 2025 20:57
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.

Looks great to me!

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.

4 participants