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
Description
On web, attempting to create a texture with TextureFormat::Bgra8Unorm will result in wgpu attempting to call glTexSubImage2D with glow::BGRA:
On Chrome, this logs WebGL: INVALID_ENUM: texSubImage2D: invalid format to the console
Repro steps
Create a texture with TextureFormat::Bgra8Unorm on the webgl backend.
Expected vs observed behavior
wgpu should produce a validation error when attempting to create a texture with a format that the backend doesn't support (e.g. Bgra8Unorm on webgl). Currently, no indication is given to Rust code that the texture creation failed.
Extra materials
Platform
wgpu v0.15.1
The text was updated successfully, but these errors were encountered:
Description
On web, attempting to create a texture with
TextureFormat::Bgra8Unorm
will result in wgpu attempting to callglTexSubImage2D
withglow::BGRA
:wgpu/wgpu-hal/src/gles/conv.rs
Line 35 in c51edd3
However, the MDN documents don't list this as a valid
format
value: https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/texSubImage2DOn Chrome, this logs
WebGL: INVALID_ENUM: texSubImage2D: invalid format
to the consoleRepro steps
Create a texture with
TextureFormat::Bgra8Unorm
on the webgl backend.Expected vs observed behavior
wgpu should produce a validation error when attempting to create a texture with a format that the backend doesn't support (e.g.
Bgra8Unorm
on webgl). Currently, no indication is given to Rust code that the texture creation failed.Extra materials
Platform
wgpu v0.15.1
The text was updated successfully, but these errors were encountered: