i965/fp: Emit discard jumps.

This should improve the performance of any shaders using the KIL
instruction.  I'm a bit surprised we missed this.

Unfortunately, I have not been able to measure any performance
improvements from this patch.  It does make ARB_fragment_program
behave similarly to GLSL code.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
Kenneth Graunke 2015-02-24 12:48:56 -08:00
parent 8a0946f3b1
commit 201aef9d13
1 changed files with 3 additions and 0 deletions

View File

@ -250,6 +250,9 @@ fs_visitor::emit_fragment_program_code()
fs_reg(0.0f), BRW_CONDITIONAL_GE));
cmp->predicate = BRW_PREDICATE_NORMAL;
cmp->flag_subreg = 1;
if (brw->gen >= 6)
emit_discard_jump();
}
break;
}