diff options
author | Chris Dalton <csmartdalton@google.com> | 2017-10-06 11:57:51 -0600 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-06 18:43:06 +0000 |
commit | f1b47bb299e72456d70cf3eae8086a5e01766c67 (patch) | |
tree | 5c5181d2f88a5a80c53a0806d8d448b8073f2e75 /tests/SkSLGLSLTest.cpp | |
parent | 1fbb07a5c0e0b1c4dd3ca7172908d637e4098f4b (diff) |
Add a cap for geometry shader invocations
Bug: skia:7116
Change-Id: I3cc2ce7b2e5123c9adfd9781b2a5a8553747dfa5
Reviewed-on: https://skia-review.googlesource.com/56000
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'tests/SkSLGLSLTest.cpp')
-rw-r--r-- | tests/SkSLGLSLTest.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/SkSLGLSLTest.cpp b/tests/SkSLGLSLTest.cpp index 3845b8b438..28d5039121 100644 --- a/tests/SkSLGLSLTest.cpp +++ b/tests/SkSLGLSLTest.cpp @@ -1434,7 +1434,7 @@ DEF_TEST(SkSLInvocations, r) { "sk_Position = sk_in[0].sk_Position + float4(-0.5, 0, 0, sk_InvocationID);" "EmitVertex();" "}", - *SkSL::ShaderCapsFactory::MustImplementGSInvocationsWithLoop(), + *SkSL::ShaderCapsFactory::NoGSInvocationsSupport(), "#version 400\n" "int sk_InvocationID;\n" "layout (points) in ;\n" @@ -1454,6 +1454,27 @@ DEF_TEST(SkSLInvocations, r) { " }\n" "}\n", SkSL::Program::kGeometry_Kind); + test(r, + "layout(points, invocations = 2) in;" + "layout(invocations = 3) in;" + "layout(line_strip, max_vertices = 2) out;" + "void main() {" + "sk_Position = sk_in[0].sk_Position + float4(-0.5, 0, 0, sk_InvocationID);" + "EmitVertex();" + "EndPrimitive();" + "}", + *SkSL::ShaderCapsFactory::GSInvocationsExtensionString(), + "#version 400\n" + "#extension GL_ARB_gpu_shader5 : require\n" + "layout (points, invocations = 2) in ;\n" + "layout (invocations = 3) in ;\n" + "layout (line_strip, max_vertices = 2) out ;\n" + "void main() {\n" + " gl_Position = gl_in[0].gl_Position + vec4(-0.5, 0.0, 0.0, float(gl_InvocationID));\n" + " EmitVertex();\n" + " EndPrimitive();\n" + "}\n", + SkSL::Program::kGeometry_Kind); } DEF_TEST(SkSLTypePrecision, r) { |