Skip to content

Conversation

@wouterlucas
Copy link
Contributor

Warning change in behaviour

Previously texture that couldn't be uploaded due to doNotExceedCriticalThreshold: true would be re-added in the queue, resulting in "stuck" textures.

This change will put textures to failed if they can't be uploaded due to doNotExceedCriticalThreshold: true. This will allow the engine/application to handle the failure and re-attempt to upload the texture (or apply fallback logic in the app).

The setting doNotExceedCriticalThreshold should only be used when the memory is extremely tight, otherwise setting it to false and a lower threshold to have a little headroom will mimick the same behaviour as Lightning 2.

Other changes:

  • Doing a sort to then break at the first renderable is inefficient, its faster to just filter once and only clean whats passed in the filter
  • Add initial to a transitional state, so that freshly created textures won't get deleted.
  • Set textures that we can't upload to failed if doNotExceedCriticalThreshold: true

Copy link
Contributor

@michielvandergeest michielvandergeest left a comment

Choose a reason for hiding this comment

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

LGTM!

@wouterlucas wouterlucas added this pull request to the merge queue Aug 8, 2025
Merged via the queue into main with commit 8476f0e Aug 8, 2025
2 checks 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.

3 participants