pan/bi: Fix ATEST emission

The ATEST FAU index must point to the ATEST parameter datum slot
otherwise the cmdstream config is ignored.

(Rebased by Alyssa)

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8135>
This commit is contained in:
Boris Brezillon 2020-11-30 13:25:22 +01:00 committed by Marge Bot
parent f6e128fb8f
commit 469d74908c
1 changed files with 7 additions and 0 deletions

View File

@ -104,6 +104,13 @@ bi_assign_fau_idx_single(bi_registers *regs,
if (!ins)
return assigned;
if (ins->op == BI_OPCODE_ATEST) {
/* ATEST FAU index must point to the ATEST parameter datum slot */
assert(!assigned && !clause->branch_constant);
regs->fau_idx = BIR_FAU_ATEST_PARAM;
return true;
}
if (ins->branch_target && clause->branch_constant) {
/* By convention branch constant is last XXX: this whole thing
* is a hack, FIXME */