diff options
author | Marek Olšák <[email protected]> | 2017-04-02 02:13:12 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-04-04 11:14:43 +0200 |
commit | e6428092f5e1f5e2dc59601487096fd0ebb3ba6c (patch) | |
tree | 5ad753c6ad615622caa14cd3d52e911e1bf92ce2 /src/mesa/state_tracker | |
parent | 3dfe61ed6ec6773c2373ec7a139b7dfe794f60c8 (diff) |
gallium: decrease the size of pipe_resource - 64 -> 48 bytes
Some other changes needed here.
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_cb_texture.c | 15 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_texture.c | 17 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_texture.h | 14 |
3 files changed, 26 insertions, 20 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 1b486d7c3c8..99c59f77a37 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -497,7 +497,8 @@ guess_and_alloc_texture(struct st_context *st, const struct gl_texture_image *firstImage; GLuint lastLevel, width, height, depth; GLuint bindings; - GLuint ptWidth, ptHeight, ptDepth, ptLayers; + unsigned ptWidth; + uint16_t ptHeight, ptDepth, ptLayers; enum pipe_format fmt; bool guessed_box = false; @@ -649,7 +650,8 @@ st_AllocTextureImageBuffer(struct gl_context *ctx, enum pipe_format format = st_mesa_format_to_pipe_format(st, texImage->TexFormat); GLuint bindings = default_bindings(st, format); - GLuint ptWidth, ptHeight, ptDepth, ptLayers; + unsigned ptWidth; + uint16_t ptHeight, ptDepth, ptLayers; st_gl_texture_dims_to_pipe_dims(stObj->base.Target, width, height, depth, @@ -2443,7 +2445,8 @@ st_finalize_texture(struct gl_context *ctx, GLuint face; const struct st_texture_image *firstImage; enum pipe_format firstImageFormat; - GLuint ptWidth, ptHeight, ptDepth, ptLayers, ptNumSamples; + unsigned ptWidth; + uint16_t ptHeight, ptDepth, ptLayers, ptNumSamples; if (tObj->Immutable) return GL_TRUE; @@ -2505,7 +2508,8 @@ st_finalize_texture(struct gl_context *ctx, /* Find size of level=0 Gallium mipmap image, plus number of texture layers */ { - GLuint width, height, depth; + unsigned width; + uint16_t height, depth; st_gl_texture_dims_to_pipe_dims(stObj->base.Target, firstImage->base.Width2, @@ -2646,7 +2650,8 @@ st_AllocTextureStorage(struct gl_context *ctx, struct st_context *st = st_context(ctx); struct st_texture_object *stObj = st_texture_object(texObj); struct pipe_screen *screen = st->pipe->screen; - GLuint ptWidth, ptHeight, ptDepth, ptLayers, bindings; + unsigned ptWidth, bindings; + uint16_t ptHeight, ptDepth, ptLayers; enum pipe_format fmt; GLint level; GLuint num_samples = texImage->NumSamples; diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c index 7b72ffd0501..2e9856dcdfd 100644 --- a/src/mesa/state_tracker/st_texture.c +++ b/src/mesa/state_tracker/st_texture.c @@ -111,13 +111,13 @@ st_texture_create(struct st_context *st, */ void st_gl_texture_dims_to_pipe_dims(GLenum texture, - GLuint widthIn, - GLuint heightIn, - GLuint depthIn, - GLuint *widthOut, - GLuint *heightOut, - GLuint *depthOut, - GLuint *layersOut) + unsigned widthIn, + uint16_t heightIn, + uint16_t depthIn, + unsigned *widthOut, + uint16_t *heightOut, + uint16_t *depthOut, + uint16_t *layersOut) { switch (texture) { case GL_TEXTURE_1D: @@ -202,7 +202,8 @@ st_texture_match_image(struct st_context *st, const struct pipe_resource *pt, const struct gl_texture_image *image) { - GLuint ptWidth, ptHeight, ptDepth, ptLayers; + unsigned ptWidth; + uint16_t ptHeight, ptDepth, ptLayers; /* Images with borders are never pulled into mipmap textures. */ diff --git a/src/mesa/state_tracker/st_texture.h b/src/mesa/state_tracker/st_texture.h index 00c30f06cf3..44b07da10bc 100644 --- a/src/mesa/state_tracker/st_texture.h +++ b/src/mesa/state_tracker/st_texture.h @@ -202,13 +202,13 @@ st_texture_create(struct st_context *st, extern void st_gl_texture_dims_to_pipe_dims(GLenum texture, - GLuint widthIn, - GLuint heightIn, - GLuint depthIn, - GLuint *widthOut, - GLuint *heightOut, - GLuint *depthOut, - GLuint *layersOut); + unsigned widthIn, + uint16_t heightIn, + uint16_t depthIn, + unsigned *widthOut, + uint16_t *heightOut, + uint16_t *depthOut, + uint16_t *layersOut); /* Check if an image fits into an existing texture object. */ |