On Mon, Aug 18, 2014 at 5:17 AM, Abdiel Janulgue
<abdiel.janul...@linux.intel.com> wrote:
> +   /* If the last instruction from our accept() generated our
> +    * src, just set the saturate flag instead of emmitting a separate mov.

emitting.

>      */
>     fs_inst *modify = get_instruction_generating_reg(pre_inst, last_inst, 
> src);
> -   if (!modify || modify->regs_written != 1) {
> -      this->result = fs_reg(this, ir->type);
> -      fs_inst *inst = emit(MOV(this->result, src));
> -      inst->saturate = true;
> -   } else {
> +   if (modify && modify->regs_written == 1) {
>        modify->saturate = true;
>        this->result = src;
> +      return true;
>     }

I was going to tell you that you need to call
backend_instruction::can_do_saturate() here, but ir_unop_saturate only
operates on floats, and all i965 instructions that operate on floats
can saturate.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to