diff options
author | Mathias Fröhlich <[email protected]> | 2018-01-27 16:07:22 +0100 |
---|---|---|
committer | Mathias Fröhlich <[email protected]> | 2018-02-01 22:39:06 +0100 |
commit | 38b41fd718cfffd11dab637d9d0cbd6c2a30b2c2 (patch) | |
tree | 24910d5640ca92b20285f40cda11279fca976468 /src/compiler | |
parent | f37e29ac224887f1b4f0cb7c61e47fb4bc6671e1 (diff) |
mesa: Use defines for the aliased material array attributes.
Instead of just assuming that the material attributes
just overlap with the generic attributes 0-12, give
them symbolic defines so that we can easier move them
to an other range.
Signed-off-by: Mathias Fröhlich <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/shader_enums.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compiler/shader_enums.h b/src/compiler/shader_enums.h index ffe551ab20f..aa296adb5a1 100644 --- a/src/compiler/shader_enums.h +++ b/src/compiler/shader_enums.h @@ -124,6 +124,9 @@ const char *gl_vert_attrib_name(gl_vert_attrib attrib); * VERT_ATTRIB_GENERIC * include the OpenGL 2.0+ GLSL generic shader attributes. * These alias the generic GL_ARB_vertex_shader attributes. + * VERT_ATTRIB_MAT + * include the generic shader attributes used to alias + * varying material values for the TNL shader programs. */ #define VERT_ATTRIB_FF(i) (VERT_ATTRIB_POS + (i)) #define VERT_ATTRIB_FF_MAX VERT_ATTRIB_GENERIC0 @@ -134,6 +137,9 @@ const char *gl_vert_attrib_name(gl_vert_attrib attrib); #define VERT_ATTRIB_GENERIC(i) (VERT_ATTRIB_GENERIC0 + (i)) #define VERT_ATTRIB_GENERIC_MAX MAX_VERTEX_GENERIC_ATTRIBS +#define VERT_ATTRIB_MAT(i) VERT_ATTRIB_GENERIC(i) +#define VERT_ATTRIB_MAT_MAX MAT_ATTRIB_MAX + /** * Bitflags for vertex attributes. * These are used in bitfields in many places. @@ -169,6 +175,10 @@ const char *gl_vert_attrib_name(gl_vert_attrib attrib); #define VERT_BIT_GENERIC(i) VERT_BIT(VERT_ATTRIB_GENERIC(i)) #define VERT_BIT_GENERIC_ALL \ BITFIELD_RANGE(VERT_ATTRIB_GENERIC(0), VERT_ATTRIB_GENERIC_MAX) + +#define VERT_BIT_MAT(i) VERT_BIT(VERT_ATTRIB_MAT(i)) +#define VERT_BIT_MAT_ALL \ + BITFIELD_RANGE(VERT_ATTRIB_MAT(0), VERT_ATTRIB_MAT_MAX) /*@}*/ #define MAX_VARYING 32 /**< number of float[4] vectors */ |