Mesa (master): mesa: replace 8 with NUM_UNITS
Brian Paul
brianp at kemper.freedesktop.org
Wed Sep 2 16:12:53 UTC 2009
Module: Mesa
Branch: master
Commit: a7a3d3c27144595b2134f4271996cba901938d12
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a7a3d3c27144595b2134f4271996cba901938d12
Author: Brian Paul <brianp at vmware.com>
Date: Wed Sep 2 09:43:00 2009 -0600
mesa: replace 8 with NUM_UNITS
---
src/mesa/main/ffvertex_prog.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c
index 8e21a27..356476e 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];
};
More information about the mesa-commit
mailing list