summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/intel_blit.c
diff options
context:
space:
mode:
authorAnuj Phogat <anuj.phogat@gmail.com>2016-05-25 11:33:51 -0700
committerAnuj Phogat <anuj.phogat@gmail.com>2016-05-26 10:57:09 -0700
commit0c02d7002d6c005b4c1fe997b5ef5916978dd183 (patch)
treeb14d3b5d321003b305ce280ff159c8f61c68b7d3 /src/mesa/drivers/dri/i965/intel_blit.c
parent97f0f91cc191d9d024588458f23a229b91acb84d (diff)
downloadexternal_mesa3d-0c02d7002d6c005b4c1fe997b5ef5916978dd183.zip
external_mesa3d-0c02d7002d6c005b4c1fe997b5ef5916978dd183.tar.gz
external_mesa3d-0c02d7002d6c005b4c1fe997b5ef5916978dd183.tar.bz2
i965: Don't use fast copy blit in case of logical operations other than GL_COPY
XY_FAST_COPY_BLT command doesn't have a field for raster operation. So, fall back to using XY_SRC_COPY_BLT to handle those cases. Fixes piglit test gl-1.1-xor-copypixels when fast copy blit is enabled for all tiling formats. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_blit.c')
-rw-r--r--src/mesa/drivers/dri/i965/intel_blit.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c
index 4296222..5a48c20 100644
--- a/src/mesa/drivers/dri/i965/intel_blit.c
+++ b/src/mesa/drivers/dri/i965/intel_blit.c
@@ -340,7 +340,8 @@ can_fast_copy_blit(struct brw_context *brw,
int16_t dst_x, int16_t dst_y,
uintptr_t dst_offset, uint32_t dst_pitch,
uint32_t dst_tiling, uint32_t dst_tr_mode,
- int16_t w, int16_t h, uint32_t cpp)
+ int16_t w, int16_t h, uint32_t cpp,
+ GLenum logic_op)
{
const bool dst_tiling_none = dst_tiling == I915_TILING_NONE;
const bool src_tiling_none = src_tiling == I915_TILING_NONE;
@@ -354,6 +355,8 @@ can_fast_copy_blit(struct brw_context *brw,
*/
if (src_tr_mode == INTEL_MIPTREE_TRMODE_NONE &&
dst_tr_mode == INTEL_MIPTREE_TRMODE_NONE)
+
+ if (logic_op != GL_COPY)
return false;
/* The start pixel for Fast Copy blit should be on an OWord boundary. */
@@ -498,13 +501,15 @@ intelEmitCopyBlit(struct brw_context *brw,
dst_x, dst_y,
dst_offset, dst_pitch,
dst_tiling, dst_tr_mode,
- w, h, cpp);
+ w, h, cpp, logic_op);
if (!use_fast_copy_blit &&
(src_tr_mode != INTEL_MIPTREE_TRMODE_NONE ||
dst_tr_mode != INTEL_MIPTREE_TRMODE_NONE))
return false;
if (use_fast_copy_blit) {
+ assert(logic_op == GL_COPY);
+
/* When two sequential fast copy blits have different source surfaces,
* but their destinations refer to the same destination surfaces and
* therefore destinations overlap it is imperative that a flush be