[Mesa-dev] [PATCH v2 032/103] i965/vec4: implement d2i, d2u, i2d and u2d
Iago Toral Quiroga
itoral at igalia.com
Tue Oct 11 09:01:36 UTC 2016
---
src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
index 0170d21..cc10247 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
@@ -1166,6 +1166,20 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr)
BRW_REGISTER_TYPE_F);
break;
+ case nir_op_d2i:
+ case nir_op_d2u:
+ emit_double_to_single(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_single_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:
--
2.7.4
More information about the mesa-dev
mailing list