diff options
author | Nicolai Hähnle <[email protected]> | 2016-06-07 22:40:49 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2016-06-08 19:12:07 +0200 |
commit | bd5c41fe5fdfbef80959b5738b0372b81bef1f2f (patch) | |
tree | 6228128cac3a2a1154db3839348dc3da0ebfb1a3 /src/mesa/state_tracker/st_manager.c | |
parent | 8c3ecde0e18977f49b804226d7c28483e025cbcd (diff) |
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" <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_manager.c')
-rw-r--r-- | src/mesa/state_tracker/st_manager.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index a983d64b5d5..33f56ea55e1 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -587,9 +587,6 @@ st_context_teximage(struct st_context_iface *stctxi, } pipe_resource_reference(&stImage->pt, tex); - stObj->width0 = width; - stObj->height0 = height; - stObj->depth0 = depth; stObj->surface_format = pipe_format; _mesa_dirty_texobj(ctx, texObj); |