i965/gen9: Don't use fast copy blit in case of non power of 2 cpp
authorAnuj Phogat <anuj.phogat@gmail.com>
Tue, 28 Jul 2015 17:47:35 +0000 (10:47 -0700)
committerAnuj Phogat <anuj.phogat@gmail.com>
Tue, 5 Jan 2016 21:43:32 +0000 (13:43 -0800)
Fast copy blit is currently enabled for use only with Yf/Ys tiling.

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 bd204aa3ce8d5aa9bfaba42b29ae037ed090b046..474a476c54129aa6cef1c5050af4e5cb31d70110 100644 (file)
@@ -427,8 +427,10 @@ can_fast_copy_blit(struct brw_context *brw,
    if ((dst_offset | src_offset) & 63)
       return false;
 
-   /* Color depth greater than 128 bits not supported. */
-   if (cpp > 16)
+   /* Color depths which are not power of 2 or greater than 128 bits are
+    * not supported.
+    */
+   if (!_mesa_is_pow_two(cpp) || cpp > 16)
       return false;
 
    /* For Fast Copy Blits the pitch cannot be a negative number. So, bit 15