[Mesa-dev] [PATCH 1/2] i965: Fix fp-lit-src-equals-dst.

Ian Romanick idr at freedesktop.org
Fri Jul 8 09:43:36 PDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/07/2011 05:14 PM, Eric Anholt wrote:

For the series,

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

The Mesa patches should also get cherry-picked to 7.11 and 7.10.

> We were stomping over the source for the body of the LIT instruction
> when doing the MOV of 1.0 to the uninteresting channels.
> ---
>  src/mesa/drivers/dri/i965/brw_wm_fp.c |   22 +++++++++++-----------
>  1 files changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_wm_fp.c b/src/mesa/drivers/dri/i965/brw_wm_fp.c
> index 59dcda7..87eabf1 100644
> --- a/src/mesa/drivers/dri/i965/brw_wm_fp.c
> +++ b/src/mesa/drivers/dri/i965/brw_wm_fp.c
> @@ -611,7 +611,17 @@ static void precalc_lit( struct brw_wm_compile *c,
>  {
>     struct prog_src_register src0 = inst->SrcReg[0];
>     struct prog_dst_register dst = inst->DstReg;
> -   
> +
> +   if (dst.WriteMask & WRITEMASK_YZ) {
> +      emit_op(c,
> +	      OPCODE_LIT,
> +	      dst_mask(dst, WRITEMASK_YZ),
> +	      inst->SaturateMode,
> +	      src0,
> +	      src_undef(),
> +	      src_undef());
> +   }
> +
>     if (dst.WriteMask & WRITEMASK_XW) {
>        struct prog_instruction *swz;
>  
> @@ -627,16 +637,6 @@ static void precalc_lit( struct brw_wm_compile *c,
>        /* Avoid letting the negation flag of src0 affect our 1 constant. */
>        swz->SrcReg[0].Negate = NEGATE_NONE;
>     }
> -
> -   if (dst.WriteMask & WRITEMASK_YZ) {
> -      emit_op(c,
> -	      OPCODE_LIT,
> -	      dst_mask(dst, WRITEMASK_YZ),
> -	      inst->SaturateMode,
> -	      src0,
> -	      src_undef(),
> -	      src_undef());
> -   }
>  }
>  
>  

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk4XM7QACgkQX1gOwKyEAw/GNwCfR6F0SAt4zqtkFymNweQ8JaZF
ClkAn02oABq2zijXVq471zNsgfHse8PU
=fybu
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list