summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_vdpau.c
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2016-06-07 22:40:49 +0200
committerNicolai Hähnle <[email protected]>2016-06-08 19:12:07 +0200
commitbd5c41fe5fdfbef80959b5738b0372b81bef1f2f (patch)
tree6228128cac3a2a1154db3839348dc3da0ebfb1a3 /src/mesa/state_tracker/st_vdpau.c
parent8c3ecde0e18977f49b804226d7c28483e025cbcd (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_vdpau.c')
-rw-r--r--src/mesa/state_tracker/st_vdpau.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_vdpau.c b/src/mesa/state_tracker/st_vdpau.c
index 08f25535ae1..dffa52fe5d5 100644
--- a/src/mesa/state_tracker/st_vdpau.c
+++ b/src/mesa/state_tracker/st_vdpau.c
@@ -238,9 +238,6 @@ st_vdpau_map_surface(struct gl_context *ctx, GLenum target, GLenum access,
sampler_view = st_texture_get_sampler_view(st, stObj);
*sampler_view = st->pipe->create_sampler_view(st->pipe, res, &templ);
- stObj->width0 = res->width0;
- stObj->height0 = res->height0;
- stObj->depth0 = 1;
stObj->surface_format = res->format;
_mesa_dirty_texobj(ctx, texObj);