nir: Drop nir_alu_src::{negate,abs}

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24432>
This commit is contained in:
Alyssa Rosenzweig
2023-08-01 11:55:12 -04:00
committed by Marge Bot
parent efc1c3261a
commit a8013644a1
31 changed files with 6 additions and 141 deletions

View File

@@ -647,10 +647,6 @@ fs_visitor::prepare_alu_destination_and_sources(const fs_builder &bld,
nir_dest_bit_size(instr->dest.dest)));
for (unsigned i = 0; i < nir_op_infos[instr->op].num_inputs; i++) {
/* We don't lower to source modifiers so they should not exist. */
assert(!instr->src[i].abs);
assert(!instr->src[i].negate);
op[i] = get_nir_src(instr->src[i].src);
op[i].type = brw_type_for_nir_type(devinfo,
(nir_alu_type)(nir_op_infos[instr->op].input_types[i] |
@@ -4074,11 +4070,7 @@ fs_visitor::try_rebuild_resource(const brw::fs_builder &bld, nir_ssa_def *resour
if (!alu->src[0].src.is_ssa ||
!alu->src[1].src.is_ssa ||
alu->src[0].negate ||
alu->src[0].abs ||
alu->src[0].swizzle[0] != 0 ||
alu->src[1].negate ||
alu->src[1].abs ||
alu->src[1].swizzle[0] != 0)
break;

View File

@@ -65,7 +65,6 @@ get_mul_for_src(nir_alu_src *src, unsigned num_components,
uint8_t *swizzle, bool *negate, bool *abs)
{
uint8_t swizzle_tmp[NIR_MAX_VEC_COMPONENTS];
assert(src->src.is_ssa && !src->abs && !src->negate);
nir_instr *instr = src->src.ssa->parent_instr;
if (instr->type != nir_instr_type_alu)

View File

@@ -1089,10 +1089,6 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr)
src_reg op[4];
for (unsigned i = 0; i < nir_op_infos[instr->op].num_inputs; i++) {
/* We don't lower to source modifiers, so they shouldn't exist. */
assert(!instr->src[i].abs);
assert(!instr->src[i].negate);
nir_alu_type src_type = (nir_alu_type)
(nir_op_infos[instr->op].input_types[i] |
nir_src_bit_size(instr->src[i].src));