meta: In pbo_{Get,}TexSubImage don't repeatedly rebind the source tex
authorNeil Roberts <neil@linux.intel.com>
Wed, 25 Feb 2015 15:10:01 +0000 (15:10 +0000)
committerNeil Roberts <neil@linux.intel.com>
Thu, 26 Feb 2015 12:04:21 +0000 (12:04 +0000)
A layered PBO image is now interpreted as a single tall 2D image so
the z argument in _mesa_meta_bind_fbo_image is ignored. Therefore this
was just redundantly rebinding the same image repeatedly.

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/drivers/common/meta_tex_subimage.c

index a8513573b1b1813dc256ad6af862d66f66255557..5ae12c8a115b76159d2794eb6dfaf93368bc3ac8 100644 (file)
@@ -226,8 +226,6 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx, GLuint dims,
            height : depth;
 
    for (z = 1; z < iters; z++) {
-      _mesa_meta_bind_fbo_image(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
-                                pbo_tex_image, z);
       _mesa_meta_bind_fbo_image(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
                                 tex_image, zoffset + z);
 
@@ -359,8 +357,6 @@ _mesa_meta_pbo_GetTexSubImage(struct gl_context *ctx, GLuint dims,
    for (z = 1; z < iters; z++) {
       _mesa_meta_bind_fbo_image(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
                                 tex_image, zoffset + z);
-      _mesa_meta_bind_fbo_image(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
-                                pbo_tex_image, z);
 
       _mesa_update_state(ctx);