aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/glsl/GrGLSLGeometryShaderBuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/glsl/GrGLSLGeometryShaderBuilder.cpp')
-rw-r--r--src/gpu/glsl/GrGLSLGeometryShaderBuilder.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/gpu/glsl/GrGLSLGeometryShaderBuilder.cpp b/src/gpu/glsl/GrGLSLGeometryShaderBuilder.cpp
index 01f223f4b3..ea8e73f7b8 100644
--- a/src/gpu/glsl/GrGLSLGeometryShaderBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLGeometryShaderBuilder.cpp
@@ -42,10 +42,6 @@ void GrGLSLGeometryBuilder::configure(InputType inputType, OutputType outputType
int numInvocations) {
SkASSERT(!this->isConfigured());
fNumInvocations = numInvocations;
- if (this->getProgramBuilder()->shaderCaps()->mustImplementGSInvocationsWithLoop()) {
- maxVertices *= numInvocations;
- numInvocations = 1;
- }
this->addLayoutQualifier(input_type_name(inputType), kIn_InterfaceQualifier);
this->addLayoutQualifier(SkStringPrintf("invocations = %i", numInvocations).c_str(),
kIn_InterfaceQualifier);
@@ -57,17 +53,4 @@ void GrGLSLGeometryBuilder::configure(InputType inputType, OutputType outputType
void GrGLSLGeometryBuilder::onFinalize() {
SkASSERT(this->isConfigured());
fProgramBuilder->varyingHandler()->getGeomDecls(&this->inputs(), &this->outputs());
- GrShaderVar sk_InvocationID("sk_InvocationID", kInt_GrSLType);
- this->declareGlobal(sk_InvocationID);
- SkASSERT(sk_InvocationID.getName() == SkString("sk_InvocationID"));
- if (this->getProgramBuilder()->shaderCaps()->mustImplementGSInvocationsWithLoop()) {
- SkString invokeFn;
- this->emitFunction(kVoid_GrSLType, "invoke", 0, nullptr, this->code().c_str(), &invokeFn);
- this->code().printf("for (sk_InvocationID = 0; sk_InvocationID < %i; ++sk_InvocationID) {"
- "%s();"
- "EndPrimitive();"
- "}", fNumInvocations, invokeFn.c_str());
- } else {
- this->codePrependf("sk_InvocationID = gl_InvocationID;");
- }
}