aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGeometryProcessor.h
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2017-05-31 12:51:23 -0600
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-31 20:40:20 +0000
commit1d6163577c8a4f1372208e2c9e03b1a69906d385 (patch)
treefdacaa2e860d507bafca16cef0cb6e6e7861a1aa /src/gpu/GrGeometryProcessor.h
parentfa6d865215b48fac4ee24c120736e500d418f641 (diff)
Add support for instanced draws
Adds an instance buffer to GrMesh and instance attribs to GrPrimitiveProcessor. Implements support in GL and Vulkan. Adds unit tests for instanced rendering with GrMesh. Bug: skia: Change-Id: If1a9920feb9366f346b8c37cf914713c49129b3a Reviewed-on: https://skia-review.googlesource.com/16200 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'src/gpu/GrGeometryProcessor.h')
-rw-r--r--src/gpu/GrGeometryProcessor.h17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/gpu/GrGeometryProcessor.h b/src/gpu/GrGeometryProcessor.h
index e5222bf80a..086d9baa53 100644
--- a/src/gpu/GrGeometryProcessor.h
+++ b/src/gpu/GrGeometryProcessor.h
@@ -40,23 +40,6 @@ public:
}
protected:
- /**
- * Subclasses call this from their constructor to register vertex attributes. Attributes
- * will be padded to the nearest 4 bytes for performance reasons.
- * TODO After deferred geometry, we should do all of this inline in GenerateGeometry alongside
- * the struct used to actually populate the attributes. This is all extremely fragile, vertex
- * attributes have to be added in the order they will appear in the struct which maps memory.
- * The processor key should reflect the vertex attributes, or there lack thereof in the
- * GrGeometryProcessor.
- */
- const Attribute& addVertexAttrib(const char* name, GrVertexAttribType type,
- GrSLPrecision precision = kDefault_GrSLPrecision) {
- precision = (kDefault_GrSLPrecision == precision) ? kMedium_GrSLPrecision : precision;
- fAttribs.emplace_back(name, type, precision);
- fVertexStride += fAttribs.back().fOffset;
- return fAttribs.back();
- }
-
void setWillUseGeoShader() { fWillUseGeoShader = true; }
/**