pco: Switch to common alpha_to_coverage intrinsic
Signed-off-by: Ella Stanforth <ella@igalia.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412>
This commit is contained in:
committed by
Marge Bot
parent
5ab606ccda
commit
753af683b5
@@ -2750,8 +2750,6 @@ intrinsic("flush_tile_buffer_pco", src_comp=[1, 1], indices=[BASE, RANGE])
|
||||
|
||||
intrinsic("dummy_load_store_pco", indices=[BASE])
|
||||
|
||||
intrinsic("alpha_to_coverage_pco", src_comp=[1], dest_comp=1, flags=[CAN_REORDER], bit_sizes=[32])
|
||||
|
||||
index("bool", "scale")
|
||||
index("bool", "roundzero")
|
||||
intrinsic("pack_pco", src_comp=[0], dest_comp=1, flags=[CAN_ELIMINATE, CAN_REORDER], indices=[FORMAT], bit_sizes=[32])
|
||||
|
||||
@@ -682,7 +682,7 @@ lower_alpha_to_coverage(nir_builder *b, nir_instr *instr, UNUSED void *cb_data)
|
||||
nir_def *alpha = input->num_components < 4 ? nir_imm_float(b, 1.0f)
|
||||
: nir_channel(b, input, 3);
|
||||
|
||||
nir_def *a2c_mask = nir_alpha_to_coverage_pco(b, alpha);
|
||||
nir_def *a2c_mask = nir_u2u32(b, nir_alpha_to_coverage(b, alpha));
|
||||
|
||||
a2c_mask = nir_iand(b, a2c_mask, nir_load_savmsk_vm_pco(b));
|
||||
|
||||
|
||||
@@ -1859,9 +1859,12 @@ static pco_instr *trans_intr(trans_ctx *tctx, nir_intrinsic_instr *intr)
|
||||
break;
|
||||
}
|
||||
|
||||
case nir_intrinsic_alpha_to_coverage_pco:
|
||||
case nir_intrinsic_alpha_to_coverage:
|
||||
assert(tctx->stage == MESA_SHADER_FRAGMENT);
|
||||
instr = pco_pck(&tctx->b, dest, src[0], .pck_fmt = PCO_PCK_FMT_COV);
|
||||
instr = pco_pck(&tctx->b,
|
||||
pco_ref_bits(dest, 32),
|
||||
src[0],
|
||||
.pck_fmt = PCO_PCK_FMT_COV);
|
||||
break;
|
||||
|
||||
case nir_intrinsic_mutex_pco:
|
||||
@@ -2800,6 +2803,10 @@ static pco_instr *trans_alu(trans_ctx *tctx, nir_alu_instr *alu)
|
||||
instr = pco_mov(&tctx->b, pco_ref_bits(dest, 32), src[0]);
|
||||
break;
|
||||
|
||||
case nir_op_u2u32:
|
||||
instr = pco_mov(&tctx->b, dest, pco_ref_bits(src[0], 32));
|
||||
break;
|
||||
|
||||
case nir_op_f2i32_rtne:
|
||||
instr = pco_pck(&tctx->b, dest, src[0], .pck_fmt = PCO_PCK_FMT_S32);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user