Index: include/gpu/GrTypesPriv.h |
diff --git a/include/gpu/GrTypesPriv.h b/include/gpu/GrTypesPriv.h |
index 83d85612b91b94133700e83b6ffd6b80f1643259..2a8d4c3255ae0642653c302773e5d0b49d9b9247 100644 |
--- a/include/gpu/GrTypesPriv.h |
+++ b/include/gpu/GrTypesPriv.h |
@@ -39,6 +39,24 @@ enum GrShaderType { |
static const int kGrShaderTypeCount = kLastkFragment_GrShaderType + 1; |
/** |
+ * Precisions of shader language variables. Not all shading languages support precisions or actually |
+ * vary the internal precision based on the qualifiers. |
+ */ |
+enum GrSLPrecision { |
+ kLow_GrSLPrecision, |
+ kMedium_GrSLPrecision, |
+ kHigh_GrSLPrecision, |
+ |
+ // Default precision is medium. This is because on OpenGL ES 2 highp support is not |
+ // guaranteed. On (non-ES) OpenGL the specifiers have no effect on precision. |
+ kDefault_GrSLPrecision = kMedium_GrSLPrecision, |
+ |
+ kLast_GrSLPrecision = kHigh_GrSLPrecision |
+}; |
+ |
+static const int kGrSLPrecisionCount = kLast_GrSLPrecision + 1; |
+ |
+/** |
* Gets the vector size of the SLType. Returns -1 for void, matrices, and samplers. |
*/ |
static inline int GrSLTypeVectorCount(GrSLType type) { |