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

Add Capability::EXTRA_STORAGE_TEXTURES_FORMATS #4412

Closed
teoxoy opened this issue Dec 8, 2022 · 1 comment
Closed

Add Capability::EXTRA_STORAGE_TEXTURES_FORMATS #4412

teoxoy opened this issue Dec 8, 2022 · 1 comment
Labels
area: validation Issues related to validation, diagnostics, and error handling naga Shader Translator

Comments

@teoxoy
Copy link
Member

teoxoy commented Dec 8, 2022

This is quite a broad Capability, however since wgpu might enable more storage texture formats via Features::TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES, we should allow the extra ones that the WGSL spec doesn't mandate.

The WGSL Spec mandates the following formats:

r32float
r32sint
r32uint
rg32float
rg32sint
rg32uint
rgba16float
rgba16sint
rgba16uint
rgba32float
rgba32sint
rgba32uint
rgba8sint
rgba8snorm
rgba8uint
rgba8unorm

from https://gpuweb.github.io/gpuweb/wgsl/#recursive-descent-syntax-texel_format

So, we need to gate the others we support behind a Capability:

r8unorm
r8snorm
r8uint
r8sint
r16uint
r16sint
r16float
rg8unorm
rg8snorm
rg8uint
rg8sint
rg16uint
rg16sint
rg16float
rgb10a2uint
rgb10a2unorm
rg11b10ufloat
r16unorm
r16snorm
rg16unorm
rg16snorm
rgba16unorm
rgba16snorm

We can later decide to break down the Capability into finer-grained ones.

@teoxoy teoxoy added the area: validation Issues related to validation, diagnostics, and error handling label Dec 8, 2022
@cwfitzgerald cwfitzgerald transferred this issue from gfx-rs/naga Oct 25, 2023
@cwfitzgerald cwfitzgerald added the naga Shader Translator label Oct 25, 2023
@teoxoy teoxoy modified the milestone: WebGPU Specification V1 Nov 3, 2023
@teoxoy
Copy link
Member Author

teoxoy commented Nov 3, 2023

gpuweb/gpuweb#3837 will expose those texel formats, we shouldn't need a new capability.

@teoxoy teoxoy closed this as not planned Won't fix, can't repro, duplicate, stale Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: validation Issues related to validation, diagnostics, and error handling naga Shader Translator
Projects
None yet
Development

No branches or pull requests

2 participants