Specify CPU (buffer) and GPU (shader) types explicitly in Attribute
The CPU type is still specified using GrVertexAttribType.
The GPU type is specified directly using GrSLType.
kHalfX_GrVertexAttribType now really means half-float buffer
data, rather than float. (Caveat: The GL enum is only correct
with ES3/GL3 - ES2+extension needs a different value. Sigh.)
Bug: skia:
Change-Id: Ife101db68a5d4ea1ddc2f6c60fbec0c66d725c16
Reviewed-on: https://skia-review.googlesource.com/154628
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/src/gpu/ops/GrAAConvexPathRenderer.cpp b/src/gpu/ops/GrAAConvexPathRenderer.cpp
index 0f81897..1cbf5cf 100644
--- a/src/gpu/ops/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAAConvexPathRenderer.cpp
@@ -653,9 +653,12 @@
const Attribute& onVertexAttribute(int i) const override {
return IthAttribute(i, kInPosition, kInColor, kInQuadEdge);
}
- static constexpr Attribute kInPosition = {"inPosition", kFloat2_GrVertexAttribType};
- static constexpr Attribute kInColor = {"inColor", kUByte4_norm_GrVertexAttribType};
- static constexpr Attribute kInQuadEdge = {"inQuadEdge", kHalf4_GrVertexAttribType};
+ static constexpr Attribute kInPosition =
+ {"inPosition", kFloat2_GrVertexAttribType, kFloat2_GrSLType};
+ static constexpr Attribute kInColor =
+ {"inColor", kUByte4_norm_GrVertexAttribType, kHalf4_GrSLType};
+ static constexpr Attribute kInQuadEdge =
+ {"inQuadEdge", kFloat4_GrVertexAttribType, kHalf4_GrSLType};
SkMatrix fLocalMatrix;
bool fUsesLocalCoords;