blob: 0bee458b6e531c789c8e7baa6889671db0add292 [file] [log] [blame]
Brian Salomon23c55b62018-06-19 16:28:41 -04001/*
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
Mike Kleinc0bd9f92019-04-23 12:05:21 -050011#include "include/private/GrTypesPriv.h"
Brian Salomon23c55b62018-06-19 16:28:41 -040012
13class 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.
17enum 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
Chris Dalton4f5cbcd2019-02-13 14:04:34 -070056const char* GrGLSLTypeString(GrSLType);
Brian Salomon23c55b62018-06-19 16:28:41 -040057
58#endif