From: Brian Paul Date: Sat, 17 Sep 2011 19:21:08 +0000 (-0600) Subject: st/mesa: specify source mipmap level in decompress_with_blit() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=20b92c9d1ed8802cf0acb1c24884d0cef2bce10e;p=mesa.git st/mesa: specify source mipmap level in decompress_with_blit() This, along with the previous patch, fixes glGetTexImage() of compressed textures for level > 0. --- diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 68323a35a73..97c1fabd52e 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -849,6 +849,9 @@ decompress_with_blit(struct gl_context * ctx, GLenum target, GLint level, pipe->render_condition(pipe, NULL, 0); } + /* Choose the source mipmap level */ + src_view->u.tex.first_level = src_view->u.tex.last_level = level; + /* blit/render/decompress */ util_blit_pixels_tex(st->blit, src_view, /* pipe_resource (src) */