[Mesa-stable] [PATCH 2/3] mesa/st: leave current query enabled during glBlitFramebuffer

Ilia Mirkin imirkin at alum.mit.edu
Sat May 10 10:25:53 PDT 2014


Also make sure that pipe_blit_info gets zero'd out so that query isn't
accidentally left enabled.

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Cc: "10.2" <mesa-stable at lists.freedesktop.org>
---
 src/mesa/state_tracker/st_cb_blit.c       | 1 +
 src/mesa/state_tracker/st_cb_readpixels.c | 1 +
 src/mesa/state_tracker/st_cb_texture.c    | 2 ++
 3 files changed, 4 insertions(+)

diff --git a/src/mesa/state_tracker/st_cb_blit.c b/src/mesa/state_tracker/st_cb_blit.c
index a5a0d2d..799302c 100644
--- a/src/mesa/state_tracker/st_cb_blit.c
+++ b/src/mesa/state_tracker/st_cb_blit.c
@@ -187,6 +187,7 @@ st_BlitFramebuffer(struct gl_context *ctx,
    }
 
    blit.filter = pFilter;
+   blit.query_enable = TRUE;
 
    if (mask & GL_COLOR_BUFFER_BIT) {
       struct gl_renderbuffer_attachment *srcAtt =
diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c
index b921478..3f7bbd9 100644
--- a/src/mesa/state_tracker/st_cb_readpixels.c
+++ b/src/mesa/state_tracker/st_cb_readpixels.c
@@ -165,6 +165,7 @@ st_readpixels(struct gl_context *ctx, GLint x, GLint y,
       goto fallback;
    }
 
+   memset(&blit, 0, sizeof(blit));
    blit.src.resource = src;
    blit.src.level = strb->surface->u.tex.level;
    blit.src.format = src_format;
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 97bba8b..aa6b05f 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -765,6 +765,7 @@ st_TexSubImage(struct gl_context *ctx, GLuint dims,
    _mesa_unmap_teximage_pbo(ctx, unpack);
 
    /* Blit. */
+   memset(&blit, 0, sizeof(blit));
    blit.src.resource = src;
    blit.src.level = 0;
    blit.src.format = src_format;
@@ -998,6 +999,7 @@ st_GetTexImage(struct gl_context * ctx,
       height = 1;
    }
 
+   memset(&blit, 0, sizeof(blit));
    blit.src.resource = src;
    blit.src.level = texImage->Level;
    blit.src.format = src_format;
-- 
1.8.5.5



More information about the mesa-stable mailing list