summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2015-08-14 12:29:31 -0700
committerSamuel Iglesias Gonsálvez <[email protected]>2016-05-10 11:25:06 +0200
commit7782f39e759798975ace6f3272dd3f263ddc8702 (patch)
treeb93bb95263c0b7984258bda5e749d438fe5f115a /src/mesa
parentfd763177c13579ff51cb35fd8bc3b6d703073b61 (diff)
i965/fs/nir: translate double pack/unpack
v2 (Sam): - Fix line overflow (Topi). v3: Use subscript() instead of stride() (Curro) Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_nir.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index 60335c377ef..5b5a7667bbb 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -1098,6 +1098,18 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr)
inst->saturate = instr->dest.saturate;
break;
+ case nir_op_pack_double_2x32_split:
+ bld.emit(FS_OPCODE_PACK, result, op[0], op[1]);
+ break;
+
+ case nir_op_unpack_double_2x32_split_x:
+ bld.MOV(result, subscript(op[0], BRW_REGISTER_TYPE_UD, 0));
+ break;
+
+ case nir_op_unpack_double_2x32_split_y:
+ bld.MOV(result, subscript(op[0], BRW_REGISTER_TYPE_UD, 1));
+ break;
+
case nir_op_fpow:
inst = bld.emit(SHADER_OPCODE_POW, result, op[0], op[1]);
inst->saturate = instr->dest.saturate;