i965/gen9: Return false in place of assert in intelEmitCopyBlit()
authorAnuj Phogat <anuj.phogat@gmail.com>
Tue, 10 Nov 2015 23:33:53 +0000 (15:33 -0800)
committerAnuj Phogat <anuj.phogat@gmail.com>
Tue, 5 Jan 2016 21:43:32 +0000 (13:43 -0800)
This allows the fallback paths to handle it correctly.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/intel_blit.c

index d4e25d89a55da1a08e9627f59d266bde0195b4db..6d29fbdde216824b61a679d948163c279428b2fd 100644 (file)
@@ -564,9 +564,10 @@ intelEmitCopyBlit(struct brw_context *brw,
                                            dst_offset, dst_pitch,
                                            dst_tiling, dst_tr_mode,
                                            w, h, cpp);
-   assert(use_fast_copy_blit ||
-          (src_tr_mode == INTEL_MIPTREE_TRMODE_NONE &&
-           dst_tr_mode == INTEL_MIPTREE_TRMODE_NONE));
+   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) {
       /* When two sequential fast copy blits have different source surfaces,