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

Eric Anholt eric at anholt.net
Wed Dec 7 13:03:55 PST 2011


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.
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20111207/4b9972e7/attachment.pgp>


More information about the mesa-dev mailing list