You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation on ownership states that users must call wgpuTextureRelease(surfaceTexture.texture), where surfaceTexture is the WGPUSurfaceTexture filled by wgpuSurfaceGetCurrentTexture(). The documentation on surfaces states that it can be called before wgpuSurfacePresent() (but presumably after calling wgpuTextureCreateView(), which increments the reference count). However, this breaks wgpu-native v24.0.3.1. It crashes or gives me blank surface, depending on when I release it. Dawn allows me to release it as soon as I create the texture view. If I release it as soon as I create the texture view, I get the following panic:
thread '<unnamed>' panicked at src/lib.rs:598:5:
Error in wgpuQueueSubmit: Validation Error
Caused by:
Texture with '<Surface Texture>' label has been destroyed
If I release it immediately before calling wgpuSurfacePresent(), I get a blank surface.