summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/mtypes.h8
-rw-r--r--src/mesa/main/shaderapi.c18
2 files changed, 19 insertions, 7 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index dadedb145ad..691323d8f3c 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2279,11 +2279,9 @@ struct gl_shader_info
* in this shader.
*/
GLenum PrimitiveMode;
- /**
- * GL_EQUAL, GL_FRACTIONAL_ODD, GL_FRACTIONAL_EVEN, or 0 if it's not set
- * in this shader.
- */
- GLenum Spacing;
+
+ enum gl_tess_spacing Spacing;
+
/**
* GL_CW, GL_CCW, or 0 if it's not set in this shader.
*/
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index f198a3c6302..7771b7ce7da 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -838,8 +838,22 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname,
if (!has_tess)
break;
if (check_tes_query(ctx, shProg)) {
- *params = shProg->_LinkedShaders[MESA_SHADER_TESS_EVAL]->
- info.TessEval.Spacing;
+ const struct gl_linked_shader *tes =
+ shProg->_LinkedShaders[MESA_SHADER_TESS_EVAL];
+ switch (tes->info.TessEval.Spacing) {
+ case TESS_SPACING_EQUAL:
+ *params = GL_EQUAL;
+ break;
+ case TESS_SPACING_FRACTIONAL_ODD:
+ *params = GL_FRACTIONAL_ODD;
+ break;
+ case TESS_SPACING_FRACTIONAL_EVEN:
+ *params = GL_FRACTIONAL_EVEN;
+ break;
+ case TESS_SPACING_UNSPECIFIED:
+ *params = 0;
+ break;
+ }
}
return;
case GL_TESS_GEN_VERTEX_ORDER: