ntt: switch to derivative intrinsics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30572>
This commit is contained in:

committed by
Marge Bot

parent
9966365fe0
commit
772e6d61b9
@@ -1519,12 +1519,6 @@ ntt_emit_alu(struct ntt_compile *c, nir_alu_instr *instr)
|
||||
[nir_op_fsign] = { TGSI_OPCODE_SSG, TGSI_OPCODE_DSSG },
|
||||
[nir_op_isign] = { TGSI_OPCODE_ISSG, TGSI_OPCODE_I64SSG },
|
||||
[nir_op_ftrunc] = { TGSI_OPCODE_TRUNC, TGSI_OPCODE_DTRUNC },
|
||||
[nir_op_fddx] = { TGSI_OPCODE_DDX },
|
||||
[nir_op_fddy] = { TGSI_OPCODE_DDY },
|
||||
[nir_op_fddx_coarse] = { TGSI_OPCODE_DDX },
|
||||
[nir_op_fddy_coarse] = { TGSI_OPCODE_DDY },
|
||||
[nir_op_fddx_fine] = { TGSI_OPCODE_DDX_FINE },
|
||||
[nir_op_fddy_fine] = { TGSI_OPCODE_DDY_FINE },
|
||||
[nir_op_pack_half_2x16] = { TGSI_OPCODE_PK2H },
|
||||
[nir_op_unpack_half_2x16] = { TGSI_OPCODE_UP2H },
|
||||
[nir_op_ibitfield_extract] = { TGSI_OPCODE_IBFE },
|
||||
@@ -2599,6 +2593,21 @@ ntt_emit_intrinsic(struct ntt_compile *c, nir_intrinsic_instr *instr)
|
||||
ntt_READ_INVOC(c, ntt_get_dest(c, &instr->def), ntt_get_src(c, instr->src[0]), ntt_get_src(c, instr->src[1]));
|
||||
return;
|
||||
|
||||
case nir_intrinsic_ddx:
|
||||
case nir_intrinsic_ddx_coarse:
|
||||
ntt_DDX(c, ntt_get_dest(c, &instr->def), ntt_get_src(c, instr->src[0]));
|
||||
return;
|
||||
case nir_intrinsic_ddx_fine:
|
||||
ntt_DDX_FINE(c, ntt_get_dest(c, &instr->def), ntt_get_src(c, instr->src[0]));
|
||||
return;
|
||||
case nir_intrinsic_ddy:
|
||||
case nir_intrinsic_ddy_coarse:
|
||||
ntt_DDY(c, ntt_get_dest(c, &instr->def), ntt_get_src(c, instr->src[0]));
|
||||
return;
|
||||
case nir_intrinsic_ddy_fine:
|
||||
ntt_DDY_FINE(c, ntt_get_dest(c, &instr->def), ntt_get_src(c, instr->src[0]));
|
||||
return;
|
||||
|
||||
case nir_intrinsic_load_ssbo:
|
||||
case nir_intrinsic_store_ssbo:
|
||||
case nir_intrinsic_ssbo_atomic:
|
||||
@@ -4076,6 +4085,7 @@ static const nir_shader_compiler_options nir_to_tgsi_compiler_options = {
|
||||
* workgroup id.
|
||||
*/
|
||||
.lower_cs_local_index_to_id = true,
|
||||
.has_ddx_intrinsics = true,
|
||||
};
|
||||
|
||||
/* Returns a default compiler options for drivers with only nir-to-tgsi-based
|
||||
|
Reference in New Issue
Block a user