summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-02-09 18:24:37 -0800
committerJason Ekstrand <[email protected]>2016-02-13 17:22:36 -0800
commitb9e94ad8060348faf40ba30722148b5c7e865a1c (patch)
tree76ac2e14a8e03f25e279e12da54e436eb01cbdc9 /src
parent954d46184fad1d09b50bb03717f2583e8fabf635 (diff)
glsl/types: Expose glsl_struct_field and glsl_function_param to C
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/glsl_types.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/compiler/glsl_types.h b/src/compiler/glsl_types.h
index b0ef031a09f..2f612d8857d 100644
--- a/src/compiler/glsl_types.h
+++ b/src/compiler/glsl_types.h
@@ -820,6 +820,10 @@ private:
/*@}*/
};
+#undef DECL_TYPE
+#undef STRUCT_TYPE
+#endif /* __cplusplus */
+
struct glsl_struct_field {
const struct glsl_type *type;
const char *name;
@@ -877,6 +881,7 @@ struct glsl_struct_field {
unsigned image_volatile:1;
unsigned image_restrict:1;
+#ifdef __cplusplus
glsl_struct_field(const struct glsl_type *_type, const char *_name)
: type(_type), name(_name), location(-1), interpolation(0), centroid(0),
sample(0), matrix_layout(GLSL_MATRIX_LAYOUT_INHERITED), patch(0),
@@ -890,6 +895,7 @@ struct glsl_struct_field {
{
/* empty */
}
+#endif
};
struct glsl_function_param {
@@ -905,8 +911,4 @@ glsl_align(unsigned int a, unsigned int align)
return (a + align - 1) / align * align;
}
-#undef DECL_TYPE
-#undef STRUCT_TYPE
-#endif /* __cplusplus */
-
#endif /* GLSL_TYPES_H */