mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
nir: add fp_math_ctrl to cmat alu ops
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40630>
This commit is contained in:
parent
9cba104e11
commit
35ca85176c
2 changed files with 14 additions and 10 deletions
|
|
@ -1439,15 +1439,15 @@ intrinsic("cmat_load", src_comp=[-1, -1, 1], indices=[MATRIX_LAYOUT])
|
|||
intrinsic("cmat_store", src_comp=[-1, -1, 1], indices=[MATRIX_LAYOUT])
|
||||
intrinsic("cmat_length", src_comp=[], dest_comp=1, indices=[CMAT_DESC], bit_sizes=[32])
|
||||
intrinsic("cmat_muladd", src_comp=[-1, -1, -1, -1], indices=[SATURATE, CMAT_SIGNED_MASK])
|
||||
intrinsic("cmat_convert", src_comp=[-1, -1], indices=[SATURATE, CMAT_SIGNED_MASK])
|
||||
intrinsic("cmat_unary_op", src_comp=[-1, -1], indices=[ALU_OP])
|
||||
intrinsic("cmat_binary_op", src_comp=[-1, -1, -1], indices=[ALU_OP])
|
||||
intrinsic("cmat_scalar_op", src_comp=[-1, -1, -1], indices=[ALU_OP])
|
||||
intrinsic("cmat_convert", src_comp=[-1, -1], indices=[SATURATE, CMAT_SIGNED_MASK, FP_MATH_CTRL])
|
||||
intrinsic("cmat_unary_op", src_comp=[-1, -1], indices=[ALU_OP, FP_MATH_CTRL])
|
||||
intrinsic("cmat_binary_op", src_comp=[-1, -1, -1], indices=[ALU_OP, FP_MATH_CTRL])
|
||||
intrinsic("cmat_scalar_op", src_comp=[-1, -1, -1], indices=[ALU_OP, FP_MATH_CTRL])
|
||||
intrinsic("cmat_bitcast", src_comp=[-1, -1])
|
||||
intrinsic("cmat_extract", src_comp=[-1, 1], dest_comp=1)
|
||||
intrinsic("cmat_insert", src_comp=[-1, 1, -1, 1])
|
||||
intrinsic("cmat_copy", src_comp=[-1, -1])
|
||||
intrinsic("cmat_transpose", src_comp=[-1, -1])
|
||||
intrinsic("cmat_transpose", src_comp=[-1, -1], indices=[FP_MATH_CTRL])
|
||||
|
||||
# Select an output vertex in a poly GS. Takes the stream-local vertex ID.
|
||||
intrinsic("select_vertex_poly", src_comp=[1], indices=[STREAM_ID])
|
||||
|
|
|
|||
|
|
@ -288,7 +288,8 @@ split_cmat_convert(nir_builder *b,
|
|||
nir_deref_instr *src_deref = recreate_derefs(b, &intr->src[1], src_split->split_vars[i]);
|
||||
b->cursor = nir_before_instr(instr);
|
||||
nir_cmat_convert(b, &dst_deref->def, &src_deref->def, .saturate = nir_intrinsic_saturate(intr),
|
||||
.cmat_signed_mask = nir_intrinsic_cmat_signed_mask(intr));
|
||||
.cmat_signed_mask = nir_intrinsic_cmat_signed_mask(intr),
|
||||
.fp_math_ctrl = nir_intrinsic_fp_math_ctrl(intr));
|
||||
}
|
||||
nir_instr_remove(instr);
|
||||
return true;
|
||||
|
|
@ -316,7 +317,7 @@ split_cmat_transpose(nir_builder *b,
|
|||
nir_deref_instr *dst_deref = recreate_derefs(b, &intr->src[0], dst_split->split_vars[out_idx]);
|
||||
nir_deref_instr *src_deref = recreate_derefs(b, &intr->src[1], src_split->split_vars[in_idx]);
|
||||
b->cursor = nir_before_instr(instr);
|
||||
nir_cmat_transpose(b, &dst_deref->def, &src_deref->def);
|
||||
nir_cmat_transpose(b, &dst_deref->def, &src_deref->def, .fp_math_ctrl = nir_intrinsic_fp_math_ctrl(intr));
|
||||
}
|
||||
}
|
||||
nir_instr_remove(instr);
|
||||
|
|
@ -377,7 +378,8 @@ split_cmat_binary_op(nir_builder *b,
|
|||
nir_deref_instr *src1_deref = recreate_derefs(b, &intr->src[2], src1_split->split_vars[i]);
|
||||
b->cursor = nir_before_instr(instr);
|
||||
nir_cmat_binary_op(b, &dst_deref->def, &src0_deref->def, &src1_deref->def,
|
||||
.alu_op = nir_intrinsic_alu_op(intr));
|
||||
.alu_op = nir_intrinsic_alu_op(intr),
|
||||
.fp_math_ctrl = nir_intrinsic_fp_math_ctrl(intr));
|
||||
}
|
||||
nir_instr_remove(instr);
|
||||
return true;
|
||||
|
|
@ -405,7 +407,8 @@ split_cmat_unary_op(nir_builder *b,
|
|||
nir_deref_instr *dst_deref = recreate_derefs(b, &intr->src[0], dst_split->split_vars[i]);
|
||||
nir_deref_instr *src_deref = recreate_derefs(b, &intr->src[1], src_split->split_vars[i]);
|
||||
b->cursor = nir_before_instr(instr);
|
||||
nir_cmat_unary_op(b, &dst_deref->def, &src_deref->def, .alu_op = nir_intrinsic_alu_op(intr));
|
||||
nir_cmat_unary_op(b, &dst_deref->def, &src_deref->def, .alu_op = nir_intrinsic_alu_op(intr),
|
||||
.fp_math_ctrl = nir_intrinsic_fp_math_ctrl(intr));
|
||||
}
|
||||
nir_instr_remove(instr);
|
||||
return true;
|
||||
|
|
@ -434,7 +437,8 @@ split_cmat_scalar_op(nir_builder *b,
|
|||
nir_deref_instr *src_deref = recreate_derefs(b, &intr->src[1], src_split->split_vars[i]);
|
||||
b->cursor = nir_before_instr(instr);
|
||||
nir_cmat_scalar_op(b, &dst_deref->def, &src_deref->def, intr->src[2].ssa,
|
||||
.alu_op = nir_intrinsic_alu_op(intr));
|
||||
.alu_op = nir_intrinsic_alu_op(intr),
|
||||
.fp_math_ctrl = nir_intrinsic_fp_math_ctrl(intr));
|
||||
}
|
||||
nir_instr_remove(instr);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue