[Mesa-dev] [PATCH 10/20] mesa: reduce the size of gl_image_unit
Marek Olšák
maraeo at gmail.com
Tue Nov 21 18:01:52 UTC 2017
From: Marek Olšák <marek.olsak at amd.com>
gl_context::ImageUnits: 6144 -> 4608 bytes
gl_context: 74608 -> 73072 bytes
---
src/mesa/main/mtypes.h | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index f16ff4e..6ddef05 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -4605,59 +4605,58 @@ struct gl_buffer_binding
struct gl_image_unit
{
/**
* Texture object bound to this unit.
*/
struct gl_texture_object *TexObj;
/**
* Level of the texture object bound to this unit.
*/
- GLuint Level;
+ GLubyte Level;
/**
* \c GL_TRUE if the whole level is bound as an array of layers, \c
* GL_FALSE if only some specific layer of the texture is bound.
* \sa Layer
*/
GLboolean Layered;
/**
* Layer of the texture object bound to this unit as specified by the
* application.
*/
- GLuint Layer;
+ GLushort Layer;
/**
- * Layer of the texture object bound to this unit, or zero if the
- * whole level is bound.
+ * Layer of the texture object bound to this unit, or zero if
+ * Layered == false.
*/
- GLuint _Layer;
+ GLushort _Layer;
/**
* Access allowed to this texture image. Either \c GL_READ_ONLY,
* \c GL_WRITE_ONLY or \c GL_READ_WRITE.
*/
GLenum16 Access;
/**
* GL internal format that determines the interpretation of the
* image memory when shader image operations are performed through
* this unit.
*/
GLenum16 Format;
/**
* Mesa format corresponding to \c Format.
*/
- mesa_format _ActualFormat;
-
+ mesa_format _ActualFormat:16;
};
/**
* Shader subroutines storage
*/
struct gl_subroutine_index_binding
{
GLuint NumIndex;
GLuint *IndexPtr;
};
--
2.7.4
More information about the mesa-dev
mailing list