mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02: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> (cherry picked from commit64c60582b5) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40359>
This commit is contained in:
parent
829e5ccc84
commit
2a2dba1bc7
2 changed files with 1 additions and 38 deletions
|
|
@ -1134,7 +1134,7 @@
|
|||
"description": "elk/algebraic: Don't optimize SEL.L.SAT or SEL.G.SAT",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "ca675b73d3ac2e1b57ec385c2c80b05b6382f6b6",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -2409,43 +2409,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