diff options
author | Iago Toral Quiroga <[email protected]> | 2016-02-17 11:12:19 +0100 |
---|---|---|
committer | Samuel Iglesias Gonsálvez <[email protected]> | 2017-01-03 11:26:50 +0100 |
commit | c1fb525016e41658d2dc5d581da4e83b8a075fd4 (patch) | |
tree | ca566cb86d4cbe5a4e56c7eef89b7c418c14a53b /src | |
parent | 4b2257623494ea8e7a1c7b6fbb2f4f3e59522468 (diff) |
i965/vec4: implement d2i, d2u, i2d and u2d
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp index e31c8c2772e..778ebb55caa 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp @@ -1161,6 +1161,20 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr) BRW_REGISTER_TYPE_F); break; + case nir_op_d2i: + case nir_op_d2u: + emit_conversion_from_double(dst, op[0], instr->dest.saturate, + instr->op == nir_op_d2i ? BRW_REGISTER_TYPE_D : + BRW_REGISTER_TYPE_UD); + break; + + case nir_op_i2d: + case nir_op_u2d: + emit_conversion_to_double(dst, op[0], instr->dest.saturate, + instr->op == nir_op_i2d ? BRW_REGISTER_TYPE_D : + BRW_REGISTER_TYPE_UD); + break; + case nir_op_iadd: assert(nir_dest_bit_size(instr->dest.dest) < 64); case nir_op_fadd: |