mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-12 15:30:33 +01:00
elk/algebraic: Don't optimize SEL.L.SAT or SEL.G.SAT
shader-db:
Broadwell
total instructions in shared programs: 18607516 -> 18607530 (<.01%)
instructions in affected programs: 2095 -> 2109 (0.67%)
helped: 0 / HURT: 8
total cycles in shared programs: 955704436 -> 955702925 (<.01%)
cycles in affected programs: 34299 -> 32788 (-4.41%)
helped: 2 / HURT: 6
All Haswell and older platforms had similar results. (Haswell shown)
total instructions in shared programs: 16989200 -> 16989201 (<.01%)
instructions in affected programs: 461 -> 462 (0.22%)
helped: 0 / HURT: 1
total cycles in shared programs: 946537070 -> 946537035 (<.01%)
cycles in affected programs: 16378 -> 16343 (-0.21%)
helped: 1 / HURT: 0
Test: piglit!1100
Reported-by: Georg Lehmann
Fixes: ca675b73d3 ("i965/fs: Optimize saturating SEL.L(E) with imm val >= 1.0.")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40284>
This commit is contained in:
parent
6c6c6ce054
commit
64c60582b5
1 changed files with 0 additions and 37 deletions
|
|
@ -2367,43 +2367,6 @@ elk_fs_visitor::opt_algebraic()
|
|||
inst->predicate_inverse = false;
|
||||
inst->conditional_mod = ELK_CONDITIONAL_NONE;
|
||||
progress = true;
|
||||
} else if (inst->saturate && inst->src[1].file == IMM) {
|
||||
switch (inst->conditional_mod) {
|
||||
case ELK_CONDITIONAL_LE:
|
||||
case ELK_CONDITIONAL_L:
|
||||
switch (inst->src[1].type) {
|
||||
case ELK_REGISTER_TYPE_F:
|
||||
if (inst->src[1].f >= 1.0f) {
|
||||
inst->opcode = ELK_OPCODE_MOV;
|
||||
inst->sources = 1;
|
||||
inst->src[1] = reg_undef;
|
||||
inst->conditional_mod = ELK_CONDITIONAL_NONE;
|
||||
progress = true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ELK_CONDITIONAL_GE:
|
||||
case ELK_CONDITIONAL_G:
|
||||
switch (inst->src[1].type) {
|
||||
case ELK_REGISTER_TYPE_F:
|
||||
if (inst->src[1].f <= 0.0f) {
|
||||
inst->opcode = ELK_OPCODE_MOV;
|
||||
inst->sources = 1;
|
||||
inst->src[1] = reg_undef;
|
||||
inst->conditional_mod = ELK_CONDITIONAL_NONE;
|
||||
progress = true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ELK_OPCODE_MAD:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue