1 /* 2 * Copyright 2011 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 #ifndef GrGLSL_DEFINED 9 #define GrGLSL_DEFINED 10 11 #include "include/private/GrTypesPriv.h" 12 13 class GrShaderCaps; 14 15 // Limited set of GLSL versions we build shaders for. Caller should round 16 // down the GLSL version to one of these enums. 17 enum GrGLSLGeneration { 18 /** 19 * Desktop GLSL 1.10 and ES2 shading language (based on desktop GLSL 1.20) 20 */ 21 k110_GrGLSLGeneration, 22 /** 23 * Desktop GLSL 1.30 24 */ 25 k130_GrGLSLGeneration, 26 /** 27 * Desktop GLSL 1.40 28 */ 29 k140_GrGLSLGeneration, 30 /** 31 * Desktop GLSL 1.50 32 */ 33 k150_GrGLSLGeneration, 34 /** 35 * Desktop GLSL 3.30, and ES GLSL 3.00 36 */ 37 k330_GrGLSLGeneration, 38 /** 39 * Desktop GLSL 4.00 40 */ 41 k400_GrGLSLGeneration, 42 /** 43 * Desktop GLSL 4.20 44 */ 45 k420_GrGLSLGeneration, 46 /** 47 * ES GLSL 3.10 only TODO Make GLSLCap objects to make this more granular 48 */ 49 k310es_GrGLSLGeneration, 50 /** 51 * ES GLSL 3.20 52 */ 53 k320es_GrGLSLGeneration, 54 }; 55 56 const char* GrGLSLTypeString(GrSLType); 57 58 #endif 59