Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73781

Signed-off-by: Ahmed Allam <ahmabd...@hotmail.com>
---
 src/gallium/drivers/r600/r600_state.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/r600/r600_state.c 
b/src/gallium/drivers/r600/r600_state.c
index a0d527b..8690849 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -3095,7 +3095,8 @@ static boolean r600_dma_copy_tile(struct r600_context 
*rctx,
        /* It's a r6xx/r7xx limitation, the blit must be on 8 boundary for 
number
         * line in the blit. Compute max 8 line we can copy in the size limit
         */
-       cheight = ((0x0000ffff << 2) / pitch) & 0xfffffff8;
+       cheight = ((0x0000ffff << 2) / pitch) > 0x00000008 ? 
+               ((0x0000ffff << 2) / pitch) & 0xfffffff8 : ((0x0000ffff << 2) / 
pitch);
        ncopy = (copy_height / cheight) + !!(copy_height % cheight);
        r600_need_dma_space(rctx, ncopy * 7);
 
-- 
1.9.rc1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to