On 02/20/2014 01:41 PM, Matt Turner wrote:
> Unfortunately the compiler isn't able to recognize that assigning
> reg_undef is just zeroing the fs_reg, which was already done by the
> above memset.
> ---
>  src/mesa/drivers/dri/i965/brw_fs.cpp | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp 
> b/src/mesa/drivers/dri/i965/brw_fs.cpp
> index ae1237e..e51cdbd 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
> @@ -56,12 +56,6 @@ fs_inst::init()
>  {
>     memset(this, 0, sizeof(*this));
>     this->opcode = BRW_OPCODE_NOP;
> -   this->conditional_mod = BRW_CONDITIONAL_NONE;
> -
> -   this->dst = reg_undef;
> -   this->src[0] = reg_undef;
> -   this->src[1] = reg_undef;
> -   this->src[2] = reg_undef;
>  
>     /* This will be the case for almost all instructions. */
>     this->regs_written = 1;
> 

This is not equivalent.

reg_undef has stride == 1.  Removing these lines will make stride == 0.

--Ken

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to