[Mesa-dev] [PATCH 16/17] i965/fs: Refactor try_emit_saturate
Kenneth Graunke
kenneth at whitecape.org
Tue Aug 26 14:46:48 PDT 2014
On Tuesday, August 19, 2014 07:37:33 PM Matt Turner wrote:
> On Mon, Aug 18, 2014 at 5:17 AM, Abdiel Janulgue
> <abdiel.janulgue at 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.
Messages can't, IIRC. It probably is a good idea to call it anyway.
--Ken
-------------- 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/20140826/ab498b2f/attachment-0001.sig>
More information about the mesa-dev
mailing list