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

hello-triangle tries to configure with zero size on web #4593

Closed
Tracked by #3674
kpreid opened this issue Oct 27, 2023 · 1 comment · Fixed by #4634
Closed
Tracked by #3674

hello-triangle tries to configure with zero size on web #4593

kpreid opened this issue Oct 27, 2023 · 1 comment · Fixed by #4634
Labels
area: ecosystem Help the connected projects grow and prosper type: bug Something isn't working

Comments

@kpreid
Copy link
Contributor

kpreid commented Oct 27, 2023

Description
When hello-triangle starts up under wasm, it configures the surface with window.inner_size(), but that size is zero. Furthermore, the WebGPU backend does not catch this validation error.

Repro steps

cargo xtask run-wasm --bin hello-triangle
cargo xtask run-wasm --bin hello-triangle --features webgl

Expected vs observed behavior

  • The example should not configure with zero size. (Is this a winit bug that the canvas size is incorrectly reported?)

  • This should be a validation error on all backends, or succeed on all backends. Instead, on WebGPU this does not produce a wgpu validation error, but produces a validation error from the underlying WebGPU, and rendering then succeeds later.

    The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
    at ValidateTextureDescriptor (../../third_party/dawn/src/dawn/native/Texture.cpp:478)
    

    On WebGL it panics with a validation error inside wgpu.

Platform

  • Chrome 118.0.5993.88
  • macOS x86_64-apple-darwin
  • wgpu trunk b6fa2c5
@cwfitzgerald cwfitzgerald added type: bug Something isn't working area: ecosystem Help the connected projects grow and prosper labels Oct 28, 2023
@cwfitzgerald
Copy link
Member

The WebGPU issue is #3675

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ecosystem Help the connected projects grow and prosper type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants