summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <[email protected]>2015-09-05 19:19:33 +0100
committerEmil Velikov <[email protected]>2015-09-11 18:52:40 +0100
commit95bc059c50fa3679ee9d02cd1fd9f82239fb353f (patch)
tree4ad6b6e52f7d293860b0d1a043e6500693edc2cd /src
parent254a07841dbfe41eaa13250fc2dfbeb1787c46e5 (diff)
i965: Disallow fast blit paths for CopyTexImage with PixelTransfer ops
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 <[email protected]> Cc: Jason Ekstrand <[email protected]> Cc: Kenneth Graunke <[email protected]> Reviwewed-by: Iago Toral <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: [email protected] (cherry picked from commit be519c2d50f4aaa48fdb8b27707114cc5bfd348f)
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp_blit.cpp4
-rw-r--r--src/mesa/drivers/dri/i965/intel_tex_copy.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
index 205c905b447..ba11d3dd07f 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
@@ -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.
*/
diff --git a/src/mesa/drivers/dri/i965/intel_tex_copy.c b/src/mesa/drivers/dri/i965/intel_tex_copy.c
index 4d8c82e0569..ecdd052fdf6 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_copy.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_copy.c
@@ -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