xref: /aosp_15_r20/external/skia/resources/sksl/errors/InvalidBackendBindingFlagsMetal.sksl (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1*c8dee2aaSAndroid Build Coastguard Worker// Valid declarations:
2*c8dee2aaSAndroid Build Coastguard Workerlayout(metal, binding=0) uniform ubo1 { float a; };               // valid
3*c8dee2aaSAndroid Build Coastguard Workerlayout(metal, binding=0) buffer ssbo { float b; };                // valid
4*c8dee2aaSAndroid Build Coastguard Workerlayout(metal, rgba32f, texture=0) readonly texture2D rtexture1;   // valid
5*c8dee2aaSAndroid Build Coastguard Workerlayout(metal, rgba32f, texture=0) writeonly texture2D wtexture1;  // valid
6*c8dee2aaSAndroid Build Coastguard Workerlayout(metal, texture=0, sampler=0) sampler2D sampler1;           // valid
7*c8dee2aaSAndroid Build Coastguard Worker
8*c8dee2aaSAndroid Build Coastguard Worker// TODO(skia:14023): This should require 'texture' once the metal backend supports it
9*c8dee2aaSAndroid Build Coastguard Workerlayout(metal, rgba32f, binding=0) readonly texture2D rtexture2;   // valid
10*c8dee2aaSAndroid Build Coastguard Workerlayout(metal, rgba32f, binding=0) writeonly texture2D wtexture2;  // valid
11*c8dee2aaSAndroid Build Coastguard Workerlayout(metal, binding=0) sampler2D sampler2;                      // valid
12*c8dee2aaSAndroid Build Coastguard Worker
13*c8dee2aaSAndroid Build Coastguard Worker// Invalid declarations:
14*c8dee2aaSAndroid Build Coastguard Workerlayout(metal, rgba32f, sampler=0) readonly texture2D rtexture3;            // invalid (has sampler)
15*c8dee2aaSAndroid Build Coastguard Workerlayout(metal, rgba32f, sampler=0) writeonly texture2D wtexture3;           // invalid (has sampler)
16*c8dee2aaSAndroid Build Coastguard Workerlayout(metal, rgba32f, texture=0, sampler=0) readonly texture2D rtexture4; // invalid (has sampler)
17*c8dee2aaSAndroid Build Coastguard Workerlayout(metal, rgba32f, texture=0, sampler=0) writeonly texture2D wtexture4;// invalid (has sampler)
18*c8dee2aaSAndroid Build Coastguard Workerlayout(metal, texture=0) readonly texture2D rtexture5;                     // invalid (no pixformat)
19*c8dee2aaSAndroid Build Coastguard Workerlayout(metal, texture=0) writeonly texture2D wtexture5;                    // invalid (no pixformat)
20*c8dee2aaSAndroid Build Coastguard Workerlayout(metal, binding=0, texture=0, sampler=0) sampler2D sampler3;         // invalid (has binding)
21*c8dee2aaSAndroid Build Coastguard Workerlayout(metal, texture=0, sampler=0) ubo2 { float c; };                     // invalid (has tex/samp)
22*c8dee2aaSAndroid Build Coastguard Workerlayout(metal, set=0, binding=0) ubo3 { float d; };                         // invalid (has set)
23*c8dee2aaSAndroid Build Coastguard Worker
24*c8dee2aaSAndroid Build Coastguard Worker/*%%*
25*c8dee2aaSAndroid Build Coastguard Workerlayout qualifier 'sampler' is not permitted here
26*c8dee2aaSAndroid Build Coastguard Workerlayout qualifier 'sampler' is not permitted here
27*c8dee2aaSAndroid Build Coastguard Workerlayout qualifier 'sampler' is not permitted here
28*c8dee2aaSAndroid Build Coastguard Workerlayout qualifier 'sampler' is not permitted here
29*c8dee2aaSAndroid Build Coastguard Workerstorage textures must declare a pixel format
30*c8dee2aaSAndroid Build Coastguard Workerstorage textures must declare a pixel format
31*c8dee2aaSAndroid Build Coastguard Worker'binding' modifier cannot coexist with 'texture'/'sampler'
32*c8dee2aaSAndroid Build Coastguard Workerlayout qualifier 'texture' is not permitted here
33*c8dee2aaSAndroid Build Coastguard Workerlayout qualifier 'sampler' is not permitted here
34*c8dee2aaSAndroid Build Coastguard Workerlayout qualifier 'set' is not permitted here
35*c8dee2aaSAndroid Build Coastguard Worker*%%*/
36