23 lines
1.2 KiB
Plaintext
23 lines
1.2 KiB
Plaintext
|
|
// Valid declarations:
|
||
|
|
layout(wgsl, set=0, binding=0) uniform ubo1 { float a; }; // valid
|
||
|
|
layout(wgsl, set=0, binding=0) buffer ssbo { float b; }; // valid
|
||
|
|
layout(wgsl, set=0, texture=0) uniform texture2D texture1; // valid
|
||
|
|
layout(wgsl, set=0, texture=0, sampler=0) uniform sampler2D sampler1; // valid
|
||
|
|
|
||
|
|
// TODO(skia:14023): This should require 'texture' once the WGSL backend supports it
|
||
|
|
layout(wgsl, set=0, binding=0) uniform texture2D texture2; // valid
|
||
|
|
// TODO(skia:14023): This should require 'texture' and 'sampler' once the WGSL backend supports it
|
||
|
|
layout(wgsl, set=0, binding=0) uniform sampler2D sampler2; // valid
|
||
|
|
|
||
|
|
// Invalid declarations:
|
||
|
|
layout(wgsl, set=0, sampler=0) uniform texture2D texture3; // invalid
|
||
|
|
layout(wgsl, set=0, binding=0, texture=0, sampler=0) uniform sampler2D sampler3; // invalid
|
||
|
|
layout(wgsl, set=0, texture=0, sampler=0) uniform ubo2 { float c; }; // invalid
|
||
|
|
|
||
|
|
/*%%*
|
||
|
|
layout qualifier 'sampler' is not permitted here
|
||
|
|
'binding' modifier cannot coexist with 'texture'/'sampler'
|
||
|
|
layout qualifier 'texture' is not permitted here
|
||
|
|
layout qualifier 'sampler' is not permitted here
|
||
|
|
*%%*/
|