From 20b92c9d1ed8802cf0acb1c24884d0cef2bce10e Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 17 Sep 2011 13:21:08 -0600 Subject: [PATCH] st/mesa: specify source mipmap level in decompress_with_blit() This, along with the previous patch, fixes glGetTexImage() of compressed textures for level > 0. --- src/mesa/state_tracker/st_cb_texture.c | 3 +++ 1 file changed, 3 insertions(+) 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) */ -- 2.30.2