pan/bi: Use bi_dontcare for ZS_EMIT

This is more portable and avoids special casing.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
This commit is contained in:
Alyssa Rosenzweig 2022-03-13 19:59:58 -04:00 committed by Marge Bot
parent 1b934d5962
commit 0cbe4dd4c4
2 changed files with 1 additions and 3 deletions

View File

@ -309,8 +309,6 @@ bi_get_src_new(bi_instr *ins, bi_registers *regs, unsigned s)
return bi_get_src_slot(regs, src.value);
else if (src.type == BI_INDEX_PASS)
return src.value;
else if (bi_is_null(src) && ins->op == BI_OPCODE_ZS_EMIT && s < 2)
return BIFROST_SRC_STAGE;
else {
/* TODO make safer */
return BIFROST_SRC_STAGE;

View File

@ -631,7 +631,7 @@ bi_emit_fragment_out(bi_builder *b, nir_intrinsic_instr *instr)
}
if (emit_zs) {
bi_index z = { 0 }, s = { 0 };
bi_index z = bi_dontcare(b), s = bi_dontcare(b);
if (writeout & PAN_WRITEOUT_Z)
z = bi_src_index(&instr->src[2]);