summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-11-16 04:46:02 +0100
committerMarek Olšák <[email protected]>2018-02-13 01:00:45 +0100
commitf4ea2b2a9e99d93fbf36c3f0e5f6f384be3cdb89 (patch)
treeb5186758319181a9c53e7e8372d79bb0f0fefee9 /src/mesa
parent4794fbc86e3f2cb9e02747894655c9e4432c2738 (diff)
mesa: reduce the size of gl_texture_image
80 -> 40 bytes. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/mtypes.h47
1 files changed, 24 insertions, 23 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index a589bd4bb29..b619d5c02d7 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -965,35 +965,36 @@ typedef enum
*/
struct gl_texture_image
{
- GLint InternalFormat; /**< Internal format as given by the user */
+ struct gl_texture_object *TexObject; /**< Pointer back to parent object */
+
+ GLenum16 InternalFormat; /**< Internal format as given by the user */
GLenum16 _BaseFormat; /**< Either GL_RGB, GL_RGBA, GL_ALPHA,
- * GL_LUMINANCE, GL_LUMINANCE_ALPHA,
- * GL_INTENSITY, GL_DEPTH_COMPONENT or
- * GL_DEPTH_STENCIL_EXT only. Used for
- * choosing TexEnv arithmetic.
- */
- mesa_format TexFormat; /**< The actual texture memory format */
-
- GLuint Border; /**< 0 or 1 */
- GLuint Width; /**< = 2^WidthLog2 + 2*Border */
- GLuint Height; /**< = 2^HeightLog2 + 2*Border */
- GLuint Depth; /**< = 2^DepthLog2 + 2*Border */
- GLuint Width2; /**< = Width - 2*Border */
- GLuint Height2; /**< = Height - 2*Border */
- GLuint Depth2; /**< = Depth - 2*Border */
- GLuint WidthLog2; /**< = log2(Width2) */
- GLuint HeightLog2; /**< = log2(Height2) */
- GLuint DepthLog2; /**< = log2(Depth2) */
- GLuint MaxNumLevels; /**< = maximum possible number of mipmap
+ * GL_LUMINANCE, GL_LUMINANCE_ALPHA,
+ * GL_INTENSITY, GL_DEPTH_COMPONENT or
+ * GL_DEPTH_STENCIL_EXT only. Used for
+ * choosing TexEnv arithmetic.
+ */
+ mesa_format TexFormat:16; /**< The actual texture memory format */
+
+ GLushort Width; /**< = 2^WidthLog2 + 2*Border */
+ GLushort Height; /**< = 2^HeightLog2 + 2*Border */
+ GLushort Depth; /**< = 2^DepthLog2 + 2*Border */
+ GLushort Width2; /**< = Width - 2*Border */
+ GLushort Height2; /**< = Height - 2*Border */
+ GLushort Depth2; /**< = Depth - 2*Border */
+ GLubyte WidthLog2; /**< = log2(Width2) */
+ GLubyte HeightLog2; /**< = log2(Height2) */
+ GLubyte DepthLog2; /**< = log2(Depth2) */
+ GLubyte Border; /**< 0 or 1 */
+ GLubyte MaxNumLevels; /**< = maximum possible number of mipmap
levels, computed from the dimensions */
- struct gl_texture_object *TexObject; /**< Pointer back to parent object */
- GLuint Level; /**< Which mipmap level am I? */
+ GLubyte Level; /**< Which mipmap level am I? */
/** Cube map face: index into gl_texture_object::Image[] array */
- GLuint Face;
+ GLubyte Face;
/** GL_ARB_texture_multisample */
- GLuint NumSamples; /**< Sample count, or 0 for non-multisample */
+ GLubyte NumSamples; /**< Sample count, or 0 for non-multisample */
GLboolean FixedSampleLocations; /**< Same sample locations for all pixels? */
};