1// Valid declarations: 2layout(webgpu, set=0, binding=0) uniform ubo1 { float a; }; // valid 3layout(webgpu, set=0, binding=0) buffer ssbo { float b; }; // valid 4layout(webgpu, rgba32f, set=0, texture=0) readonly texture2D rtexture1; // valid 5layout(webgpu, rgba32f, set=0, texture=0) writeonly texture2D wtexture1; // valid 6layout(webgpu, set=0, texture=0, sampler=0) sampler2D sampler1; // valid 7 8// TODO(skia:14023): This should require 'texture' once the WGSL backend supports it 9layout(webgpu, rgba32f, set=0, binding=0) readonly texture2D rtexture2; // valid 10layout(webgpu, rgba32f, set=0, binding=0) writeonly texture2D wtexture2; // valid 11// TODO(skia:14023): This should require 'texture' and 'sampler' once the WGSL backend supports it 12layout(webgpu, set=0, binding=0) sampler2D sampler2; // valid 13 14// Invalid declarations: 15layout(webgpu, rgba32f, set=0, sampler=0) readonly texture2D rtexture3; // invalid (has sampler) 16layout(webgpu, rgba32f, set=0, sampler=0) writeonly texture2D wtexture3; // invalid (has sampler) 17layout(webgpu, set=0, texture=0) readonly texture2D rtexture4; // invalid (no pixformat) 18layout(webgpu, set=0, texture=0) writeonly texture2D wtexture4; // invalid (no pixformat) 19layout(webgpu, set=0, binding=0, texture=0, sampler=0) sampler2D sampler3; // invalid 20layout(webgpu, set=0, texture=0, sampler=0) uniform ubo2 { float c; }; // invalid 21 22/*%%* 23layout qualifier 'sampler' is not permitted here 24layout qualifier 'sampler' is not permitted here 25storage textures must declare a pixel format 26storage textures must declare a pixel format 27'binding' modifier cannot coexist with 'texture'/'sampler' 28layout qualifier 'texture' is not permitted here 29layout qualifier 'sampler' is not permitted here 30*%%*/ 31