An issue could still occur if the base level is set, but fixing that
would require a lot more logic.
This fixes the recently-failing texelFetch 3D tests because the mipmaps
were no longer being generated, which in turn caused the copying logic
to be hit, which in turn didn't work because of the broken
width/height/depth.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
width = stObj->width0;
height = stObj->height0;
depth = stObj->depth0;
+ } else {
+ /* The width/height/depth may have been previously reset in
+ * guess_and_alloc_texture. */
+ stObj->width0 = width;
+ stObj->height0 = height;
+ stObj->depth0 = depth;
}
/* convert GL dims to Gallium dims */
st_gl_texture_dims_to_pipe_dims(stObj->base.Target, width, height, depth,