diff options
author | Eric Anholt <eric@anholt.net> | 2010-06-25 14:27:07 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-06-25 16:35:22 -0700 |
commit | 0fd97db8b077ad1bd5d26e86e67ebb2d58b6a38a (patch) | |
tree | d8fa1ee64d89a3b064f5c24815373889c86b8676 /src/glsl/glsl_types.h | |
parent | bda27424cf04c0d2ec2b49c56f562d5b2d2f0bff (diff) |
glsl2: Associate the GLenum for the type with builtin GLSL types.
Diffstat (limited to 'src/glsl/glsl_types.h')
-rw-r--r-- | src/glsl/glsl_types.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h index 39e6ac970a..93cf60be8d 100644 --- a/src/glsl/glsl_types.h +++ b/src/glsl/glsl_types.h @@ -30,6 +30,7 @@ #include <cassert> extern "C" { +#include "GL/gl.h" #include <talloc.h> } @@ -55,6 +56,7 @@ enum glsl_sampler_dim { struct glsl_type { + GLenum gl_type; unsigned base_type:4; unsigned sampler_dimensionality:3; @@ -151,8 +153,10 @@ struct glsl_type { /*@}*/ - glsl_type(unsigned base_type, unsigned vector_elements, + glsl_type(GLenum gl_type, + unsigned base_type, unsigned vector_elements, unsigned matrix_columns, const char *name) : + gl_type(gl_type), base_type(base_type), sampler_dimensionality(0), sampler_shadow(0), sampler_array(0), sampler_type(0), @@ -166,8 +170,10 @@ struct glsl_type { memset(& fields, 0, sizeof(fields)); } - glsl_type(enum glsl_sampler_dim dim, bool shadow, bool array, + glsl_type(GLenum gl_type, + enum glsl_sampler_dim dim, bool shadow, bool array, unsigned type, const char *name) : + gl_type(gl_type), base_type(GLSL_TYPE_SAMPLER), sampler_dimensionality(dim), sampler_shadow(shadow), sampler_array(array), sampler_type(type), |