}
glsl_type::glsl_type(GLenum gl_type,
- unsigned base_type, unsigned vector_elements,
+ glsl_base_type base_type, unsigned vector_elements,
unsigned matrix_columns, const char *name) :
gl_type(gl_type),
base_type(base_type),
extern "C" void
_mesa_glsl_release_types(void);
-#define GLSL_TYPE_UINT 0
-#define GLSL_TYPE_INT 1
-#define GLSL_TYPE_FLOAT 2
-#define GLSL_TYPE_BOOL 3
-#define GLSL_TYPE_SAMPLER 4
-#define GLSL_TYPE_STRUCT 5
-#define GLSL_TYPE_ARRAY 6
-#define GLSL_TYPE_VOID 7
-#define GLSL_TYPE_ERROR 8
+enum glsl_base_type {
+ GLSL_TYPE_UINT = 0,
+ GLSL_TYPE_INT,
+ GLSL_TYPE_FLOAT,
+ GLSL_TYPE_BOOL,
+ GLSL_TYPE_SAMPLER,
+ GLSL_TYPE_STRUCT,
+ GLSL_TYPE_ARRAY,
+ GLSL_TYPE_VOID,
+ GLSL_TYPE_ERROR
+};
enum glsl_sampler_dim {
GLSL_SAMPLER_DIM_1D = 0,
struct glsl_type {
GLenum gl_type;
- unsigned base_type:4;
+ glsl_base_type base_type;
unsigned sampler_dimensionality:3;
unsigned sampler_shadow:1;
/** Constructor for vector and matrix types */
glsl_type(GLenum gl_type,
- unsigned base_type, unsigned vector_elements,
+ glsl_base_type base_type, unsigned vector_elements,
unsigned matrix_columns, const char *name);
/** Constructor for sampler types */