diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c index 44b81b8ae28..480e51d0b93 100644 --- a/src/gallium/auxiliary/nir/tgsi_to_nir.c +++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c @@ -1675,8 +1675,6 @@ static const nir_op op_trans[TGSI_OPCODE_LAST] = { [TGSI_OPCODE_LG2] = nir_op_flog2, [TGSI_OPCODE_POW] = nir_op_fpow, [TGSI_OPCODE_COS] = nir_op_fcos, - [TGSI_OPCODE_DDX] = nir_op_fddx, - [TGSI_OPCODE_DDY] = nir_op_fddy, [TGSI_OPCODE_KILL] = 0, [TGSI_OPCODE_PK2H] = 0, /* XXX */ [TGSI_OPCODE_PK2US] = 0, /* XXX */ @@ -1713,9 +1711,6 @@ static const nir_op op_trans[TGSI_OPCODE_LAST] = { [TGSI_OPCODE_ELSE] = 0, [TGSI_OPCODE_ENDIF] = 0, - [TGSI_OPCODE_DDX_FINE] = nir_op_fddx_fine, - [TGSI_OPCODE_DDY_FINE] = nir_op_fddy_fine, - [TGSI_OPCODE_CEIL] = nir_op_fceil, [TGSI_OPCODE_I2F] = nir_op_i2f32, [TGSI_OPCODE_NOT] = nir_op_inot, @@ -2022,6 +2017,22 @@ ttn_emit_instruction(struct ttn_compile *c) ttn_barrier(b); break; + case TGSI_OPCODE_DDX: + dst = nir_ddx(b, src[0]); + break; + + case TGSI_OPCODE_DDX_FINE: + dst = nir_ddx_fine(b, src[0]); + break; + + case TGSI_OPCODE_DDY: + dst = nir_ddy(b, src[0]); + break; + + case TGSI_OPCODE_DDY_FINE: + dst = nir_ddy_fine(b, src[0]); + break; + default: if (op_trans[tgsi_op] != 0 || tgsi_op == TGSI_OPCODE_MOV) { dst = ttn_alu(b, op_trans[tgsi_op], dst_bitsize, src);