Remove (unused) geometry shader support
Bug: skia:8451 skia:10827
Change-Id: I5b38a1d72cd4558f8e2a92aaf9b12f05efce0923
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/442683
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
diff --git a/src/gpu/GrGeometryProcessor.cpp b/src/gpu/GrGeometryProcessor.cpp
index d87ee46..05057d0 100644
--- a/src/gpu/GrGeometryProcessor.cpp
+++ b/src/gpu/GrGeometryProcessor.cpp
@@ -69,7 +69,7 @@
GrShaderVar positionVar = gpArgs.fPositionVar;
// skia:12198
- if (args.fGeomProc.willUseGeoShader() || args.fGeomProc.willUseTessellationShaders()) {
+ if (args.fGeomProc.willUseTessellationShaders()) {
positionVar = {};
}
FPCoordsMap transformMap = this->collectTransforms(args.fVertBuilder,
@@ -86,38 +86,13 @@
}
GrGLSLVertexBuilder* vBuilder = args.fVertBuilder;
- if (!args.fGeomProc.willUseGeoShader()) {
- // Emit the vertex position to the hardware in the normalized window coordinates it expects.
- SkASSERT(kFloat2_GrSLType == gpArgs.fPositionVar.getType() ||
- kFloat3_GrSLType == gpArgs.fPositionVar.getType());
- vBuilder->emitNormalizedSkPosition(gpArgs.fPositionVar.c_str(),
- gpArgs.fPositionVar.getType());
- if (kFloat2_GrSLType == gpArgs.fPositionVar.getType()) {
- args.fVaryingHandler->setNoPerspective();
- }
- } else {
- // Since we have a geometry shader, leave the vertex position in Skia device space for now.
- // The geometry Shader will operate in device space, and then convert the final positions to
- // normalized hardware window coordinates under the hood, once everything else has finished.
- // The subclass must call setNoPerspective on the varying handler, if applicable.
- vBuilder->codeAppendf("sk_Position = float4(%s", gpArgs.fPositionVar.c_str());
- switch (gpArgs.fPositionVar.getType()) {
- case kFloat_GrSLType:
- vBuilder->codeAppend(", 0");
- [[fallthrough]];
- case kFloat2_GrSLType:
- vBuilder->codeAppend(", 0");
- [[fallthrough]];
- case kFloat3_GrSLType:
- vBuilder->codeAppend(", 1");
- [[fallthrough]];
- case kFloat4_GrSLType:
- vBuilder->codeAppend(");");
- break;
- default:
- SK_ABORT("Invalid position var type");
- break;
- }
+ // Emit the vertex position to the hardware in the normalized window coordinates it expects.
+ SkASSERT(kFloat2_GrSLType == gpArgs.fPositionVar.getType() ||
+ kFloat3_GrSLType == gpArgs.fPositionVar.getType());
+ vBuilder->emitNormalizedSkPosition(gpArgs.fPositionVar.c_str(),
+ gpArgs.fPositionVar.getType());
+ if (kFloat2_GrSLType == gpArgs.fPositionVar.getType()) {
+ args.fVaryingHandler->setNoPerspective();
}
return transformMap;
}