Mesa (gallium-0.1): mesa: shrink texenvprogram state key struct

Keith Whitwell keithw at kemper.freedesktop.org
Fri Oct 3 16:26:10 UTC 2008


Module: Mesa
Branch: gallium-0.1
Commit: 6280e335706f95ed0ebb089d8f72aeede9b5a1ad
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6280e335706f95ed0ebb089d8f72aeede9b5a1ad

Author: Keith Whitwell <keith at tungstengraphics.com>
Date:   Fri Oct  3 13:51:56 2008 +0100

mesa: shrink texenvprogram state key struct

---

 src/mesa/main/texenvprogram.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c
index 97aa87e..ac49373 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/texenvprogram.c
@@ -44,15 +44,17 @@
 #define DISASSEM (MESA_VERBOSE & VERBOSE_DISASSEM)
 
 struct mode_opt {
-   GLuint Source:4;
-   GLuint Operand:3;
+   GLubyte Source:4;
+   GLubyte Operand:3;
 };
 
 struct state_key {
-   GLbitfield enabled_units;
+   GLuint nr_enabled_units:8;
+   GLuint enabled_units:8;
    GLuint separate_specular:1;
    GLuint fog_enabled:1;
    GLuint fog_mode:2;
+   GLuint inputs_available:12;
 
    struct {
       GLuint enabled:1;
@@ -62,10 +64,10 @@ struct state_key {
 
       GLuint NumArgsRGB:2;
       GLuint ModeRGB:4;
-      struct mode_opt OptRGB[3];
-
       GLuint NumArgsA:2;
       GLuint ModeA:4;
+
+      struct mode_opt OptRGB[3];
       struct mode_opt OptA[3];
    } unit[8];
 };




More information about the mesa-commit mailing list