| 1 |
// defines built-in interfaces supported by SkSL compute shaders |
| 2 |
|
| 3 |
layout(builtin=24) in uint3 sk_NumWorkgroups; |
| 4 |
layout(builtin=26) in uint3 sk_WorkgroupID; |
| 5 |
layout(builtin=27) in uint3 sk_LocalInvocationID; |
| 6 |
layout(builtin=28) in uint3 sk_GlobalInvocationID; |
| 7 |
layout(builtin=29) in uint sk_LocalInvocationIndex; |
| 8 |
|
| 9 |
struct IndirectDispatchArgs { |
| 10 |
int x, y, z; |
| 11 |
}; |
| 12 |
|
| 13 |
$pure half4 textureRead($readableTexture2D t, uint2 pos); |
| 14 |
void 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. |
| 21 |
void workgroupBarrier(); |
| 22 |
|
| 23 |
// Control-barrier with memory-ordering constraints applied to |
| 24 |
// uniform and storage-buffer memory. |
| 25 |
void storageBarrier(); |