[Mesa-dev] [PATCH 01/14] mesa/main/ff_frag: Use correct constant.

Gustaw Smolarczyk wielkiegie at gmail.com
Thu Mar 30 18:09:20 UTC 2017


Since fixed-function shaders are restricted to MAX_TEXTURE_COORD_UNITS
texture units, use this constant instead of MAX_TEXTURE_UNITS. This
reduces the array size from 32 to 8.

Signed-off-by: Gustaw Smolarczyk <wielkiegie at gmail.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
---
 src/mesa/main/ff_fragment_shader.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp
index f007ac3b40..7679328d4c 100644
--- a/src/mesa/main/ff_fragment_shader.cpp
+++ b/src/mesa/main/ff_fragment_shader.cpp
@@ -123,7 +123,7 @@ struct state_key {
 
       struct mode_opt OptRGB[MAX_COMBINER_TERMS];
       struct mode_opt OptA[MAX_COMBINER_TERMS];
-   } unit[MAX_TEXTURE_UNITS];
+   } unit[MAX_TEXTURE_COORD_UNITS];
 };
 
 #define FOG_NONE    0
-- 
2.12.1



More information about the mesa-dev mailing list