diff options
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r-- | src/compiler/glsl/ast.h | 2 | ||||
-rw-r--r-- | src/compiler/glsl/glsl_parser.yy | 8 | ||||
-rw-r--r-- | src/compiler/glsl/glsl_parser_extras.cpp | 2 | ||||
-rw-r--r-- | src/compiler/glsl/linker.cpp | 6 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/compiler/glsl/ast.h b/src/compiler/glsl/ast.h index 0e32c36528e..e3f629e3419 100644 --- a/src/compiler/glsl/ast.h +++ b/src/compiler/glsl/ast.h @@ -704,7 +704,7 @@ struct ast_type_qualifier { ast_layout_expression *local_size[3]; /** Tessellation evaluation shader: vertex spacing (equal, fractional even/odd) */ - GLenum vertex_spacing; + enum gl_tess_spacing vertex_spacing; /** Tessellation evaluation shader: vertex ordering (CW or CCW) */ GLenum ordering; diff --git a/src/compiler/glsl/glsl_parser.yy b/src/compiler/glsl/glsl_parser.yy index e3893d5ec3b..519e35b6d53 100644 --- a/src/compiler/glsl/glsl_parser.yy +++ b/src/compiler/glsl/glsl_parser.yy @@ -1463,11 +1463,11 @@ layout_qualifier_id: if (!$$.flags.i) { static const struct { const char *s; - GLenum e; + enum gl_tess_spacing e; } map[] = { - { "equal_spacing", GL_EQUAL }, - { "fractional_odd_spacing", GL_FRACTIONAL_ODD }, - { "fractional_even_spacing", GL_FRACTIONAL_EVEN }, + { "equal_spacing", TESS_SPACING_EQUAL }, + { "fractional_odd_spacing", TESS_SPACING_FRACTIONAL_ODD }, + { "fractional_even_spacing", TESS_SPACING_FRACTIONAL_EVEN }, }; for (unsigned i = 0; i < ARRAY_SIZE(map); i++) { if (match_layout_qualifier($1, map[i].s, state) == 0) { diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index e97cbf4b826..1b84876079d 100644 --- a/src/compiler/glsl/glsl_parser_extras.cpp +++ b/src/compiler/glsl/glsl_parser_extras.cpp @@ -1732,7 +1732,7 @@ set_shader_inout_layout(struct gl_shader *shader, if (state->in_qualifier->flags.q.prim_type) shader->info.TessEval.PrimitiveMode = state->in_qualifier->prim_type; - shader->info.TessEval.Spacing = 0; + shader->info.TessEval.Spacing = TESS_SPACING_UNSPECIFIED; if (state->in_qualifier->flags.q.vertex_spacing) shader->info.TessEval.Spacing = state->in_qualifier->vertex_spacing; diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index d4a484fdea0..bf902bd862a 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -1721,7 +1721,7 @@ link_tes_in_layout_qualifiers(struct gl_shader_program *prog, unsigned num_shaders) { linked_shader->info.TessEval.PrimitiveMode = PRIM_UNKNOWN; - linked_shader->info.TessEval.Spacing = 0; + linked_shader->info.TessEval.Spacing = TESS_SPACING_UNSPECIFIED; linked_shader->info.TessEval.VertexOrder = 0; linked_shader->info.TessEval.PointMode = -1; @@ -1804,8 +1804,8 @@ link_tes_in_layout_qualifiers(struct gl_shader_program *prog, return; } - if (linked_shader->info.TessEval.Spacing == 0) - linked_shader->info.TessEval.Spacing = GL_EQUAL; + if (linked_shader->info.TessEval.Spacing == TESS_SPACING_UNSPECIFIED) + linked_shader->info.TessEval.Spacing = TESS_SPACING_EQUAL; if (linked_shader->info.TessEval.VertexOrder == 0) linked_shader->info.TessEval.VertexOrder = GL_CCW; |