[Mesa-dev] [PATCH] i965: Move is_math/is_tex/is_control_flow() to backend_instruction.

Eric Anholt eric at anholt.net
Mon Apr 29 09:18:08 PDT 2013


Kenneth Graunke <kenneth at whitecape.org> writes:

> These are entirely based on the opcode, which is available in
> backend_instruction.  It makes sense to only implement them in one
> place.
>
> This changes the VS implementation of is_tex() slightly, which now
> accepts FS_OPCODE_TXB and SHADER_OPCODE_LOD.  However, since those
> aren't generated in the VS anyway, it should be fine.
>
> This also makes is_control_flow() available in the VS.

Nice, I actually had to fix the VS is_tex for the scheduling patch, but
this is better than my patch :)

Might look better to choose either switches or return (a || b || c) for
all 3 things instead of having both ways of writing it present.  Don't
care which one, or really much at all.

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- 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/20130429/e204647d/attachment.pgp>


More information about the mesa-dev mailing list