From 50a5217637636f066feabefd7fe46d0ff7778a64 Mon Sep 17 00:00:00 2001 From: Samuel Iglesias Gonsálvez Date: Wed, 8 Mar 2017 09:27:49 +0100 Subject: i965/vec4: split d2x conversion and data gathering from one opcode to two explicit ones MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When doing a 64-bit to a smaller data type size conversion, the destination should be aligned to 64-bits. Because of that, we need to gather the data after the actual conversion. Until now, these two operations were done by VEC4_OPCODE_FROM_DOUBLE but now we split them explicitely in two different instructions: VEC4_OPCODE_FROM_DOUBLE just do the conversion and VEC4_OPCODE_PICK_LOW_32BIT will gather the data. Signed-off-by: Samuel Iglesias Gonsálvez Reviewed-by: Francisco Jerez --- src/intel/compiler/brw_vec4_nir.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/intel/compiler/brw_vec4_nir.cpp') diff --git a/src/intel/compiler/brw_vec4_nir.cpp b/src/intel/compiler/brw_vec4_nir.cpp index 6dd5789225d..64371a16de5 100644 --- a/src/intel/compiler/brw_vec4_nir.cpp +++ b/src/intel/compiler/brw_vec4_nir.cpp @@ -1191,6 +1191,7 @@ vec4_visitor::emit_conversion_from_double(dst_reg dst, src_reg src, emit(VEC4_OPCODE_FROM_DOUBLE, temp2, src_reg(temp)) ->size_written = 2 * REG_SIZE; + emit(VEC4_OPCODE_PICK_LOW_32BIT, temp2, src_reg(retype(temp2, BRW_REGISTER_TYPE_DF))); vec4_instruction *inst = emit(MOV(dst, src_reg(temp2))); inst->saturate = saturate; } -- cgit v1.2.3