5d08a27530
Declaring max_vertices before invocations fails to adjust max_vertices when invocation support is not present. (It should be 4, not 2 in this case). Bug: skia:10827 Change-Id: Ief7af97eabf5414ea8363808fc1ad2e9c480fe10 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325664 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: John Stiles <johnstiles@google.com>
20 lines
484 B
GLSL
20 lines
484 B
GLSL
#version 400
|
|
int sk_InvocationID;
|
|
layout (points) in ;
|
|
layout (line_strip, max_vertices = 2) out ;
|
|
void _invoke() {
|
|
{
|
|
gl_Position = gl_in[0].gl_Position + vec4(0.5, 0.0, 0.0, float(sk_InvocationID));
|
|
EmitVertex();
|
|
}
|
|
|
|
gl_Position = gl_in[0].gl_Position + vec4(-0.5, 0.0, 0.0, float(sk_InvocationID));
|
|
EmitVertex();
|
|
}
|
|
void main() {
|
|
for (sk_InvocationID = 0;sk_InvocationID < 2; sk_InvocationID++) {
|
|
_invoke();
|
|
EndPrimitive();
|
|
}
|
|
}
|