[Mesa-dev] [PATCH v2 3/8] i965: Only convert if/else to conditional adds prior to Gen6.

Paul Berry stereotype441 at gmail.com
Wed Dec 7 13:09:24 PST 2011


On 7 December 2011 13:03, Eric Anholt <eric at anholt.net> wrote:

> On Wed,  7 Dec 2011 11:09:11 -0800, Paul Berry <stereotype441 at gmail.com>
> wrote:
> > -   assert(!p->single_program_flow);
> > +   /* In principle, we shouldn't be patching IF and ELSE instructions in
> > +    * single program flow mode when gen < 6, because in single program
> flow
> > +    * mode on those platforms, we convert flow control instructions to
> > +    * conditional ADDs that operate on IP (see brw_ENDIF).
> > +    *
> > +    * However, on Gen6, writing to IP doesn't work in single program
> flow mode
> > +    * (see the SandyBridge PRM, Volume 4 part 2, p79: "When SPF is ON,
> IP may
> > +    * not be updated by non-flow control instructions.").  And on later
> > +    * platforms, there is no significant benefit to converting control
> flow
> > +    * instructions to conditional ADDs.  So we do patch IF and ELSE
> > +    * instructions in single program flow mode on those platforms.
> > +    */
> > +   if (intel->gen < 6)
> > +      assert(!p->single_program_flow);
>
> I stumbled over reading this comment the first couple of times.  I think
> s/In principle,// would have made it clear for me -- I read the "However
> on Gen6" paragraph as trying to explain an exception to "in principle,
> ... when gen < 6", when it's really true that we don't patch if/else in
> SPF for gen < 6.
> >
>

Whoops, you're right.  I'll fix this before pushing.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20111207/d1ca4acc/attachment.htm>


More information about the mesa-dev mailing list