Skip to content

Texture Format Depth24unormStencil8 not exist in WebGPU #2942

@sseanwang

Description

@sseanwang

Description
error[E0599]: no variant or associated item named Depth24unormStencil8 found for enum GpuTextureFormat in the current scope
--> wgpu-0.13.1\src\backend\web.rs:553:52
|
553 | TextureFormat::Depth24UnormStencil8 => tf::Depth24unormStencil8,
| ^^^^^^^^^^^^^^^^^^^^
| |
| variant or associated item not found in GpuTextureFormat
| help: there is a variant with a similar name: Depth24plusStencil8

For more information about this error, try rustc --explain E0599.
error: could not compile wgpu due to previous error

Repro steps
There is no "depth24unorm-stencil8" in webgpu based on the https://www.w3.org/TR/webgpu/ , it will cause compile error when trying to use any texture format when target is wasm32 and using webgpu. (not webgl feature)

Expected vs observed behavior
Remove TextureFormat::Depth24UnormStencil8 in web.rs

TextureFormat::Depth24UnormStencil8 => tf::Depth24unormStencil8,

Platform
Windows 11
version wgpu-0.13.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions