pan/bi: Treat +DISCARD.f32 as message-passing

Likely errata, matches blob's handling. Closes #4387

total nops in shared programs: 86266 -> 86272 (<.01%)
nops in affected programs: 347 -> 353 (1.73%)
helped: 1
HURT: 2

total clauses in shared programs: 20813 -> 20833 (0.10%)
clauses in affected programs: 343 -> 363 (5.83%)
helped: 0
HURT: 20
Clauses are HURT.

total quadwords in shared programs: 91572 -> 91588 (0.02%)
quadwords in affected programs: 1322 -> 1338 (1.21%)
helped: 1
HURT: 14
Quadwords are HURT.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Tested-by: Icecream95 <ixn@disroot.org>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9446>
This commit is contained in:
Alyssa Rosenzweig 2021-03-07 01:36:01 +00:00
parent 6cb1a9b754
commit 3436e5295b

View file

@ -412,10 +412,17 @@ bi_must_not_last(bi_instr *ins)
return !bi_is_null(ins->dest[0]) && !bi_is_null(ins->dest[1]);
}
/* Check for a message-passing instruction. +DISCARD.f32 is special-cased; we
* treat it as a message-passing instruction for the purpose of scheduling
* despite no passing no logical message. Otherwise invalid encoding faults may
* be raised for unknown reasons (possibly an errata).
*/
ASSERTED static bool
bi_must_message(bi_instr *ins)
{
return bi_opcode_props[ins->op].message != BIFROST_MESSAGE_NONE;
return (bi_opcode_props[ins->op].message != BIFROST_MESSAGE_NONE) ||
(ins->op == BI_OPCODE_DISCARD_F32);
}
static bool