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

WebGL: Improve error message when a webglcontextlost event occurs? #3679

Open
Tracked by #3674
sjinno opened this issue Apr 13, 2023 · 2 comments
Open
Tracked by #3674

WebGL: Improve error message when a webglcontextlost event occurs? #3679

sjinno opened this issue Apr 13, 2023 · 2 comments
Labels
api: gles Issues with GLES or WebGL area: validation Issues related to validation, diagnostics, and error handling type: enhancement New feature or request

Comments

@sjinno
Copy link
Contributor

sjinno commented Apr 13, 2023

Currently when WebGL2RenderingContext is lost, wgpu seems to panic with DeviceError::OutOfMemory that displays a message saying Not enough memory left.

It would be helpful if wgpu panicked with DeviceError::Lost or something more relevant to the webglcontextlost event if possible instead of DeviceError::OutOfMemory.


How to repro

I am not 100% certain about a consistent way to reproduce this issue, but for me (on macOS), changing screen resolution produces that error consistently.

Thank you!

@cwfitzgerald cwfitzgerald added type: enhancement New feature or request area: validation Issues related to validation, diagnostics, and error handling api: gles Issues with GLES or WebGL labels Apr 13, 2023
@Wumpf
Copy link
Member

Wumpf commented Sep 22, 2023

device loss is actually speced out by now a bit here https://www.w3.org/TR/webgpu/#lose-the-device
according to this we need to implement a lost promise/callback

@jimblandy
Copy link
Member

See also: #4163

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: gles Issues with GLES or WebGL area: validation Issues related to validation, diagnostics, and error handling type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants