[Mesa-dev] [PATCH 3/3] mesa/main: Reduce the size of nr_enabled_units in ff cache key.

Gustaw Smolarczyk wielkiegie at gmail.com
Mon Mar 27 17:24:15 UTC 2017


Since it holds values from 0 to 8, 4 bits will suffice.

Signed-off-by: Gustaw Smolarczyk <wielkiegie at gmail.com>
---
 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 75189733ba..c29d9bd64d 100644
--- a/src/mesa/main/ff_fragment_shader.cpp
+++ b/src/mesa/main/ff_fragment_shader.cpp
@@ -100,7 +100,7 @@ struct mode_opt {
 };
 
 struct state_key {
-   GLuint nr_enabled_units:8;
+   GLuint nr_enabled_units:4;
    GLuint separate_specular:1;
    GLuint fog_mode:2;          /**< FOG_x */
    GLuint inputs_available:12;
-- 
2.12.1



More information about the mesa-dev mailing list