Skip to content

Don't always duplicate the image when validating the format. - #121020

Open
tdaven wants to merge 1 commit into
godotengine:masterfrom
tdaven:validate-texture-no-duplicate
Open

Don't always duplicate the image when validating the format.#121020
tdaven wants to merge 1 commit into
godotengine:masterfrom
tdaven:validate-texture-no-duplicate

Conversation

@tdaven

@tdaven tdaven commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

This commit removes the image duplication that was present when validating a texture format. In most cases, the texture format is already compatible and supported so the duplication is unnecessary.

Now the duplication is only performed when the texture format is not supported and needs to be converted to a supported format.

This technically changes behavior a bit. If any of the callers depended on always getting a duplicate they would no longer get one. It didn't look like that was the case to me but I could have missed it.

This was a case I noticed while profiling my texture streaming pr (#113429).

This commit removes the image duplication that was present when
validating a texture format.  In most cases, the texture format
is already compatible and supported so the duplication is unnessary.

Now the duplication is only performed when the texture format is not
supported and needs to be converted to a supported format.
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.

2 participants