skia2/src/sksl/sksl_geom.sksl
Brian Osman 68c1d4069c Declare sk_InvocationID programmatically
This lets us declare it correctly depending on caps, rather than editing
the modifiers of a (shared) global variable.

Change-Id: Ifcdc5e0a8e9b852685ee03a46b537b986b5d35de
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325623
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-10-13 16:41:41 +00:00

20 lines
654 B
Plaintext

// defines built-in interfaces supported by SkiaSL geometry shaders
layout(builtin=10002) in sk_PerVertex {
layout(builtin=0) float4 sk_Position;
layout(builtin=1) float sk_PointSize;
} sk_in[];
layout(builtin=10007) out sk_PerVertex {
layout(builtin=0) float4 sk_Position;
layout(builtin=1) float sk_PointSize;
};
// sk_InvocationID exists, but is declared programmatically (to support a workaround)
// layout(builtin=8) in int sk_InvocationID;
sk_has_side_effects void EmitStreamVertex(int stream);
sk_has_side_effects void EndStreamPrimitive(int stream);
sk_has_side_effects void EmitVertex();
sk_has_side_effects void EndPrimitive();