i965/sf: Reset flag_value to 0xff before emitting SF subroutines.
authorKenneth Graunke <kenneth@whitecape.org>
Sun, 25 May 2014 08:08:47 +0000 (01:08 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 27 May 2014 20:46:00 +0000 (13:46 -0700)
commita5bb24d7692367a38f46449141bc57397d33dfc2
treea52b815907705ee09a4bd6d51aa961a78c3e5960
parentb3ad853a2c9d40064b6e8c65ade4b671f1b8d8ad
i965/sf: Reset flag_value to 0xff before emitting SF subroutines.

When compiling any of the SF program variants, flag_value starts off as
0xff and will be modified when generating code.

brw_emit_anyprim_setup emits several subroutines, saving and restoring
flag_value across each of them.  Since it starts out as 0xff, this is
equivalent to simply setting it to 0xff at the start of each subroutine.

Resetting the value makes more logical sense; each subroutine doesn't
know whether one of the others even executed, much less what it did
to the flag register.

This also lets us to drop the brw_set_predicate_control_flag_value call
from brw_init_compile: predicate is already initialized to
BRW_PREDICATE_NONE by the memset, and the value of flag_value is
irrelevant (as it's only used by the SF compiler).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_eu.c
src/mesa/drivers/dri/i965/brw_sf_emit.c