summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-09-02 09:43:00 -0600
committerBrian Paul <brianp@vmware.com>2009-09-02 09:43:10 -0600
commita7a3d3c27144595b2134f4271996cba901938d12 (patch)
tree008b7748b58d8cd713d9c39f189aa337e943301c /src
parent8cb651578de8dc4c956eaa8c0e5f1d442a3d4a92 (diff)
mesa: replace 8 with NUM_UNITS
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/ffvertex_prog.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c
index 8e21a27f89..356476e35a 100644
--- a/src/mesa/main/ffvertex_prog.c
+++ b/src/mesa/main/ffvertex_prog.c
@@ -46,6 +46,9 @@
#include "shader/prog_statevars.h"
+/** Max of number of lights and texture coord units */
+#define NUM_UNITS MAX2(MAX_TEXTURE_COORD_UNITS, MAX_LIGHTS)
+
struct state_key {
unsigned light_color_material_mask:12;
unsigned light_global_enabled:1;
@@ -77,7 +80,7 @@ struct state_key {
unsigned texgen_mode1:4;
unsigned texgen_mode2:4;
unsigned texgen_mode3:4;
- } unit[8];
+ } unit[NUM_UNITS];
};