1// defines built-in interfaces supported by SkSL compute shaders 2 3layout(builtin=24) in uint3 sk_NumWorkgroups; 4layout(builtin=26) in uint3 sk_WorkgroupID; 5layout(builtin=27) in uint3 sk_LocalInvocationID; 6layout(builtin=28) in uint3 sk_GlobalInvocationID; 7layout(builtin=29) in uint sk_LocalInvocationIndex; 8 9struct IndirectDispatchArgs { 10 int x, y, z; 11}; 12 13$pure half4 textureRead($readableTexture2D t, uint2 pos); 14void textureWrite($writableTexture2D t, uint2 pos, half4 color); 15 16$pure uint textureWidth($genTexture2D t); 17$pure uint textureHeight($genTexture2D t); 18 19// Control-barrier with memory-ordering constraints applied to 20// workgroup shared memory only. 21void workgroupBarrier(); 22 23// Control-barrier with memory-ordering constraints applied to 24// uniform and storage-buffer memory. 25void storageBarrier(); 26