[Mesa-dev] [PATCH 2/2] i965/vec4: Don't reswizzle hardware registers

Kenneth Graunke kenneth at whitecape.org
Sat Sep 12 10:34:32 PDT 2015


On Thursday, September 10, 2015 04:24:51 PM Jason Ekstrand wrote:
> Cc: "11.0 10.6" <mesa-stable at lists.freedesktop.org>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91719
> ---
>  src/mesa/drivers/dri/i965/brw_vec4.cpp | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
> index 78ee8fe..01c1259 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
> @@ -953,6 +953,13 @@ vec4_instruction::can_reswizzle(int dst_writemask,
>     if (mlen > 0)
>        return false;
>  
> +   /* We can't use swizzles on the accumulator and that's really the only
> +    * HW_REG we would care to reswizzle so just dissalow them all.

                                                   disallow

> +    */
> +   for (int i = 0; i < 3; i++)

braces around the loop since it spans more than one line of text.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

> +      if (src[i].file == HW_REG)
> +         return false;
> +
>     return true;
>  }
>  
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150912/d745f02b/attachment.sig>


More information about the mesa-dev mailing list