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/ccpr/GrCCPathProcessor.h b/src/gpu/ccpr/GrCCPathProcessor.h
index 394746b..4eb319a 100644
--- a/src/gpu/ccpr/GrCCPathProcessor.h
+++ b/src/gpu/ccpr/GrCCPathProcessor.h
@@ -101,12 +101,13 @@
SkMatrix fLocalMatrix;
static constexpr Attribute kInstanceAttribs[kNumInstanceAttribs] = {
- {"devbounds", kFloat4_GrVertexAttribType},
- {"devbounds45", kFloat4_GrVertexAttribType},
- {"dev_to_atlas_offset", kInt2_GrVertexAttribType},
- {"color", kUByte4_norm_GrVertexAttribType}
+ {"devbounds", kFloat4_GrVertexAttribType, kFloat4_GrSLType},
+ {"devbounds45", kFloat4_GrVertexAttribType, kFloat4_GrSLType},
+ {"dev_to_atlas_offset", kInt2_GrVertexAttribType, kInt2_GrSLType},
+ {"color", kUByte4_norm_GrVertexAttribType, kHalf4_GrSLType}
};
- static constexpr Attribute kEdgeNormsAttrib = {"edge_norms", kFloat4_GrVertexAttribType};
+ static constexpr Attribute kEdgeNormsAttrib = {"edge_norms", kFloat4_GrVertexAttribType,
+ kFloat4_GrSLType};
typedef GrGeometryProcessor INHERITED;
};