tgsi_to_nir: add a few needed double opcodes
authorMarek Olšák <marek.olsak@amd.com>
Fri, 2 Aug 2019 13:22:52 +0000 (15:22 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 6 Aug 2019 22:03:26 +0000 (18:03 -0400)
for internal radeonsi shaders

v2 (Connor):
- Split out prep work from adding opcodes, and rewrite the former

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/nir/tgsi_to_nir.c

index d2e054d7fc388008dbb1a6e38f9a59e35791b4bb..95074287624e794ee2828ac06741693d66834a61 100644 (file)
@@ -1716,6 +1716,12 @@ static const nir_op op_trans[TGSI_OPCODE_LAST] = {
    [TGSI_OPCODE_INTERP_SAMPLE] = 0, /* XXX */
    [TGSI_OPCODE_INTERP_OFFSET] = 0, /* XXX */
 
+   [TGSI_OPCODE_F2D] = nir_op_f2f64,
+   [TGSI_OPCODE_D2F] = nir_op_f2f32,
+   [TGSI_OPCODE_DMUL] = nir_op_fmul,
+   [TGSI_OPCODE_D2U] = nir_op_f2u32,
+   [TGSI_OPCODE_U2D] = nir_op_u2f64,
+
    [TGSI_OPCODE_U64ADD] = nir_op_iadd,
    [TGSI_OPCODE_U64MUL] = nir_op_imul,
    [TGSI_OPCODE_U64DIV] = nir_op_udiv,