diff options
author | Ilia Mirkin <[email protected]> | 2016-01-17 16:25:00 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-01-18 17:52:07 -0500 |
commit | af686e7de3cc7cc053959729e9e31432740489fa (patch) | |
tree | 419bba362596898d158e471067273f80804a85a8 | |
parent | 805e080ba0ef637cfc7b637538b5a0ce5f0b53dc (diff) |
st/mesa: restore the stObj's size if it was cleared out
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 <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
-rw-r--r-- | src/mesa/state_tracker/st_cb_texture.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index f8b367989e7..0ceb37027e1 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -1670,6 +1670,12 @@ st_finalize_texture(struct gl_context *ctx, 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, |