Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix some samples releasing a null surface texture #315

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

radgeRayden
Copy link
Contributor

No description provided.

@rajveermalviya rajveermalviya merged commit a004228 into gfx-rs:trunk Nov 10, 2023
16 checks passed
@almarklein
Copy link
Collaborator

Out of curiosity, what happened before this change? Did it lead to a panic?

@rajveermalviya

This comment was marked as outdated.

@rajveermalviya
Copy link
Collaborator

Looking through the implementation of wgpuSurfaceGetCurrentTexture & in wgpu-core, library will return null for all of these three cases (timeout, outdated, lost). So, the texture release there is not needed at all. Or we can conform to be consistent with all other functions which never return null for a wgpu object.

@radgeRayden
Copy link
Contributor Author

Out of curiosity, what happened before this change? Did it lead to a panic?

In the C samples resizing the window would cause the application to hang. On my non C application for whatever reason I got the proper panic.

@almarklein
Copy link
Collaborator

In the C samples resizing the window would cause the application to hang. On my non C application for whatever reason I got the proper panic.

Hey, this sounds a lot like pygfx/wgpu-py#352 cc @Korijn

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