glsl: Only include mtypes from glsl_types.h for the C++ code that needs it.
authorEric Anholt <eric@anholt.net>
Wed, 11 Feb 2015 23:21:37 +0000 (15:21 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 20 Feb 2015 19:36:34 +0000 (11:36 -0800)
It's used in one of the methods, not in the structure definitions.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/glsl/glsl_types.h

index 5dc7e459b3dab8472a755df8cab6da2c8b7d0621..7359e94764c14fbd1e3cf4642b63f00671c73bab 100644 (file)
@@ -28,7 +28,6 @@
 
 #include <string.h>
 #include <assert.h>
-#include "main/mtypes.h" /* for gl_texture_index, C++'s enum rules are broken */
 
 #ifdef __cplusplus
 extern "C" {
@@ -104,6 +103,7 @@ enum glsl_matrix_layout {
 #ifdef __cplusplus
 #include "GL/gl.h"
 #include "util/ralloc.h"
+#include "main/mtypes.h" /* for gl_texture_index, C++'s enum rules are broken */
 
 struct glsl_type {
    GLenum gl_type;