[Mesa-dev] [PATCH 6/7] glsl: Only include mtypes from glsl_types.h for the C++ code that needs it.

Eric Anholt eric at anholt.net
Wed Feb 11 16:48:28 PST 2015


It's used in one of the methods, not in the structure definitions.
---
 src/glsl/glsl_types.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h
index 441015c..74a038a 100644
--- a/src/glsl/glsl_types.h
+++ b/src/glsl/glsl_types.h
@@ -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" {
@@ -103,6 +102,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;
-- 
2.1.4



More information about the mesa-dev mailing list