summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2016-06-01 09:57:06 +0200
committerSamuel Iglesias Gonsálvez <[email protected]>2017-01-03 11:26:50 +0100
commit8a3ba033397bc627e499fcd3a379984ba4d587d2 (patch)
tree27979ea21b37256ee8ece44d4511b3fac16ab600 /src
parent94cfdf586a6a95bd06b989bba27d85f9bf99b9df (diff)
i965/vec4: implement double packing
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_nir.cpp11
1 files changed, 11 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 b94df2e0ad1..835ebdfb00a 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
@@ -1533,6 +1533,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) ?