i965: Disallow fast blit paths for CopyTexImage with PixelTransfer ops
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 5 Sep 2015 18:19:33 +0000 (19:19 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 7 Sep 2015 19:50:07 +0000 (20:50 +0100)
glCopyTexImage behaves similarly to glReadPixels with respect to the
pixel transfer operations. Therefore if any are set we cannot use the
simple blit-only fast paths.

(Though if would be possible to relax the blorp path to handle
pixel zoom, or we can just enhance meta.)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jason Ekstrand <jason.ekstrand@intel.com>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Reviwewed-by: Iago Toral <itoral@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable@lists.freedesktop.org
src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
src/mesa/drivers/dri/i965/intel_tex_copy.c

index 205c905b447e0655d8c21d2f5f372ae03956129e..ba11d3dd07fdabc452ff6ff63bd1a4d268763d6d 100644 (file)
@@ -215,6 +215,10 @@ brw_blorp_copytexsubimage(struct brw_context *brw,
    struct intel_renderbuffer *src_irb = intel_renderbuffer(src_rb);
    struct intel_texture_image *intel_image = intel_texture_image(dst_image);
 
+   /* No pixel transfer operations (zoom, bias, mapping), just a blit */
+   if (brw->ctx._ImageTransferState)
+      return false;
+
    /* Sync up the state of window system buffers.  We need to do this before
     * we go looking at the src renderbuffer's miptree.
     */
index 4d8c82e05691a159a62be0bcdfe5e1f9fb277e9f..ecdd052fdf6abd8f1c3985cf4d4d8bde4995f252 100644 (file)
@@ -55,6 +55,10 @@ intel_copy_texsubimage(struct brw_context *brw,
    const GLenum internalFormat = intelImage->base.Base.InternalFormat;
    bool ret;
 
+   /* No pixel transfer operations (zoom, bias, mapping), just a blit */
+   if (brw->ctx._ImageTransferState)
+      return false;
+
    intel_prepare_render(brw);
 
    /* glCopyTexSubImage() can be called on a multisampled renderbuffer (if