Skip to content

Conversation

@afrdbaig7
Copy link

Fixes #3611

Problem

Graphite could crash with a WGPU out-of-memory error during normal usage.

The root cause was repeated allocation of overlay textures instead of reusing existing ones.
Each frame or update created new GPU textures, causing GPU memory usage to grow continuously until WGPU failed.

This resulted in:

GPU out-of-memory crashes

Increasing memory usage over time

Unstable rendering behavior during longer sessions

Solution

Overlay textures are now cached and reused instead of being recreated repeatedly.

By reusing existing GPU textures, unnecessary allocations are avoided and GPU memory usage remains stable.
The save behavior and rendering logic remain unchanged — only texture lifecycle management is corrected.

Changes

Introduced caching for overlay textures

Prevented repeated GPU texture allocations

Ensured existing textures are reused where appropriate

Testing

Built the project locally

Reproduced the out-of-memory crash before the fix

Verified GPU memory usage remains stable after the change

Confirmed no regressions in rendering behavior

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.

[Bug] Crash in desktop RC2 from basic use

1 participant