[Mesa-dev] [PATCH 1/2] mesa: Set gl_fragment_program::UsesKill in do_set_program_inouts.

Eric Anholt eric at anholt.net
Thu Jul 19 14:01:16 PDT 2012


Paul Berry <stereotype441 at gmail.com> writes:

> Previously, the code for setting this flag for GLSL programs was
> duplicated in three places: brw_link_shader(), glsl_to_tgsi_visitor,
> and ir_to_mesa_visitor.  In addition to the unnecessary duplication,
> there was a performance problem on i965: brw_link_shader() set the
> flag before doing its final round of optimizations, which meant that
> if the optimizations managed to eliminate all the discard operations,
> the flag would still be set, resulting (at least in theory) in slower
> performance.
>
> This patch consolidates all of the code that sets UsesKill for GLSL
> programs into do_set_program_inouts(), which already is doing a
> similar job for UsesDFdy, and which occurs after i965's final round of
> optimizations.
>
> Non-GLSL programs (ARB programs and the state tracker's glBitmap
> program) are unaffected.

This series is:

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/20120719/23d8e383/attachment.pgp>


More information about the mesa-dev mailing list