[Mesa-dev] [PATCH v2 022/103] i965/vec4: implement double packing

Iago Toral Quiroga itoral at igalia.com
Tue Oct 11 09:01:26 UTC 2016


---
 src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
index 2631bf3..37c3d7c 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
@@ -1538,6 +1538,17 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr)
       break;
    }
 
+   case nir_op_pack_double_2x32_split: {
+      dst_reg result = dst_reg(this, glsl_type::dvec4_type);
+      dst_reg tmp = dst_reg(this, glsl_type::uvec4_type);
+      emit(MOV(tmp, retype(op[0], BRW_REGISTER_TYPE_UD)));
+      emit(VEC4_OPCODE_SET_LOW_32BIT, result, src_reg(tmp));
+      emit(MOV(tmp, retype(op[1], BRW_REGISTER_TYPE_UD)));
+      emit(VEC4_OPCODE_SET_HIGH_32BIT, result, src_reg(tmp));
+      emit(MOV(dst, src_reg(result)));
+      break;
+   }
+
    case nir_op_unpack_double_2x32_split_x:
    case nir_op_unpack_double_2x32_split_y: {
       enum opcode oper = (instr->op == nir_op_unpack_double_2x32_split_x) ?
-- 
2.7.4



More information about the mesa-dev mailing list