1 /* 2 * Copyright 2021 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 SkSLGLSL_DEFINED 9 #define SkSLGLSL_DEFINED 10 11 namespace SkSL { 12 13 // Limited set of GLSL versions we build shaders for. Caller should round 14 // down the GLSL version to one of these enums. 15 enum class GLSLGeneration { 16 /** 17 * Desktop GLSL 1.10 and ES2 shading language (based on desktop GLSL 1.20) 18 */ 19 k110, 20 /** 21 * Desktop GLSL 1.30 22 */ 23 k130, 24 /** 25 * Desktop GLSL 1.40 26 */ 27 k140, 28 /** 29 * Desktop GLSL 1.50 30 */ 31 k150, 32 /** 33 * Desktop GLSL 3.30, and ES GLSL 3.00 34 */ 35 k330, 36 /** 37 * Desktop GLSL 4.00 38 */ 39 k400, 40 /** 41 * Desktop GLSL 4.20 42 */ 43 k420, 44 /** 45 * ES GLSL 3.10 only TODO Make GLSLCap objects to make this more granular 46 */ 47 k310es, 48 /** 49 * ES GLSL 3.20 50 */ 51 k320es, 52 }; 53 54 } // namespace SkSL 55 56 #endif 57