mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 21:30:09 +01:00
ttn: switch to derivative intrinsics
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30572>
This commit is contained in:
parent
5f437aa24d
commit
9966365fe0
1 changed files with 16 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue