[Mesa-dev] [PATCH 2/2] st/mesa: specify source mipmap level in decompress_with_blit()
Brian Paul
brian.e.paul at gmail.com
Sat Sep 17 12:22:04 PDT 2011
From: Brian Paul <brianp at vmware.com>
This, along with the previous patch, fixes glGetTexImage() of compressed
textures for level > 0.
---
src/mesa/state_tracker/st_cb_texture.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index eab02fb..59a2e55 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -843,6 +843,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) */
--
1.7.3.4
More information about the mesa-dev
mailing list