gpuweb / gpuweb

Where the GPU for the Web work happens!
http://webgpu.io
Other
4.68k stars 304 forks source link

bgra8unorm storage textures without bgra8unorm-storage, should generate WGSL error? #4711

Open greggman opened 1 week ago

greggman commented 1 week ago

if you have

@group(0) @binding(0) var tex: texture_storage_2d<bgra8unorm, read>;

But you have not requested the 'bgra8unorm-storage' feature, you don't get WGSL error at shader module creation time.

This seems inconsistent with the idea that in compat you do WGSL error for these

@group(0) @binding(0) var tex: texture_storage_2d<rg32float, read>;
@group(0) @binding(1) var tex: texture_storage_2d<rg32sint, read>;
@group(0) @binding(2) var tex: texture_storage_2d<rg32uint, read>;