summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_texture.h
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2016-06-07 22:40:49 +0200
committerNicolai Hähnle <nicolai.haehnle@amd.com>2016-06-08 19:12:07 +0200
commitbd5c41fe5fdfbef80959b5738b0372b81bef1f2f (patch)
tree6228128cac3a2a1154db3839348dc3da0ebfb1a3 /src/mesa/state_tracker/st_texture.h
parent8c3ecde0e18977f49b804226d7c28483e025cbcd (diff)
downloadexternal_mesa3d-bd5c41fe5fdfbef80959b5738b0372b81bef1f2f.zip
external_mesa3d-bd5c41fe5fdfbef80959b5738b0372b81bef1f2f.tar.gz
external_mesa3d-bd5c41fe5fdfbef80959b5738b0372b81bef1f2f.tar.bz2
st/mesa: directly compute level=0 texture size in st_finalize_texture
The width0/height0/depth0 on stObj may not have been set at this point. Observed in a trace that set up levels 2..9 of a 2d texture, and set the base level to 2, with height 1. This made the guess logic always bail. Originally investigated by Ilia Mirkin, this patch gets rid of the somewhat redundant storage of width0/height0/depth0 and makes sure we always compute pipe texture sizes that are compatible with the base level image of the GL texture. Fixes the gl-1.2-texture-base-level piglit test provided by Brian Paul. v2: - try to re-use an existing pipe texture when possible - handle a corner case where the base level is not level 0 and it is of size 1x1x1 v3: - ptHeight = ptWidth in cube map 1x1 case (suggested by Brian) Cc: "12.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/mesa/state_tracker/st_texture.h')
-rw-r--r--src/mesa/state_tracker/st_texture.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_texture.h b/src/mesa/state_tracker/st_texture.h
index d8cd7c7..ae9e2b4 100644
--- a/src/mesa/state_tracker/st_texture.h
+++ b/src/mesa/state_tracker/st_texture.h
@@ -79,12 +79,6 @@ struct st_texture_object
*/
GLuint lastLevel;
- /** The size of the level=0 mipmap image.
- * Note that the number of 1D array layers will be in height0 and the
- * number of 2D array layers will be in depth0, as in GL.
- */
- GLuint width0, height0, depth0;
-
/* On validation any active images held in main memory or in other
* textures will be copied to this texture and the old storage freed.
*/