Skip to content

Free textures after submitting queue instead of before with wgpu renderer#5226

Merged
emilk merged 2 commits intoemilk:masterfrom
Rusty-Cube:wgpu-texture-destroy-fix
Oct 6, 2024
Merged

Free textures after submitting queue instead of before with wgpu renderer#5226
emilk merged 2 commits intoemilk:masterfrom
Rusty-Cube:wgpu-texture-destroy-fix

Conversation

@Rusty-Cube
Copy link
Contributor

I'm unfamiliar with wgpu, so I'd like someone to confirm, that calling wgpu::Texture after wgpu::Queue::submit is in fact the right thing to do.

@lucasmerlin lucasmerlin added bug Something is broken egui-wgpu labels Oct 6, 2024
@github-actions
Copy link

github-actions bot commented Oct 6, 2024

Preview available at https://egui-pr-preview.github.io/pr/5226-wgpu-texture-destroy-fix
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

@lucasmerlin
Copy link
Collaborator

I'd like someone to confirm, that calling wgpu::Texture after wgpu::Queue::submit is in fact the right thing to do.

@Wumpf should be able to answer that question

Copy link
Collaborator

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

makes sense to me! 👍
I added a comment with some fineprint to further motivate the change

@Wumpf Wumpf marked this pull request as ready for review October 6, 2024 15:54
@emilk emilk added this to the Next Patch Release milestone Oct 6, 2024
@emilk emilk merged commit 7bd6f83 into emilk:master Oct 6, 2024
@Rusty-Cube Rusty-Cube deleted the wgpu-texture-destroy-fix branch October 6, 2024 21:55
hacknus pushed a commit to hacknus/egui that referenced this pull request Oct 30, 2024
…erer (emilk#5226)

* Closes emilk#5224

I'm unfamiliar with wgpu, so I'd like someone to confirm, that calling
`wgpu::Texture` _after_ `wgpu::Queue::submit` is in fact the right thing
to do.

---------

Co-authored-by: Andreas Reich <r_andreas2@web.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is broken egui-wgpu

Projects

None yet

Development

Successfully merging this pull request may close these issues.

eframe with wgpu panics when unloading texture in same frame as rendering it

4 participants