Unless Jerome has a better idea, your best bet would be to just return
FALSE from that function.

For Jerome:

The code crashes on a division by 0 (cheight is 0). The problem occurs
with the texture format R32G32B32A32 and width >= 4096. Do you have
any idea what is wrong with it?

Thank you.

Marek

On Mon, Feb 3, 2014 at 6:40 AM, Ahmed Allam <ahmabd...@hotmail.com> wrote:
> 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
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to