[Mesa-dev] [WIP 25/25] i965/fs: Add support for ir_unop_unpack_double_2x32
Topi Pohjolainen
topi.pohjolainen at intel.com
Thu Oct 16 05:24:37 PDT 2014
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp | 2 ++
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 8 +++++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp b/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
index 748870e..41ad893 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
@@ -171,6 +171,7 @@ ir_channel_expressions_visitor::visit_leave(ir_assignment *ir)
case ir_binop_interpolate_at_offset:
case ir_binop_interpolate_at_sample:
case ir_unop_pack_double_2x32:
+ case ir_unop_unpack_double_2x32:
return visit_continue;
default:
@@ -452,6 +453,7 @@ ir_channel_expressions_visitor::visit_leave(ir_assignment *ir)
case ir_unop_pack_double_2x32:
unreachable("not reached: expression merges the input vector");
case ir_unop_unpack_double_2x32:
+ unreachable("not reached: visitor splits this manually");
case ir_unop_frexp_sig:
case ir_unop_frexp_exp:
case ir_unop_f2d:
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 7ad01d6..2084f37 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -949,6 +949,13 @@ fs_visitor::visit(ir_expression *ir)
inst = emit(MOV(this->result, op[0]));
inst->saturate = true;
break;
+ case ir_unop_unpack_double_2x32:
+ assert(ir->operands[0]->type == glsl_type::double_type);
+ assert(ir->type == glsl_type::uvec2_type);
+
+ emit(FS_OPCODE_UNPACK_DOUBLE_2x32_X, this->result, op[0]);
+ emit(FS_OPCODE_UNPACK_DOUBLE_2x32_Y, offset(this->result, 1), op[0]);
+ break;
case ir_triop_bitfield_extract:
/* Note that the instruction's argument order is reversed from GLSL
* and the IR.
@@ -1099,7 +1106,6 @@ fs_visitor::visit(ir_expression *ir)
case ir_unop_d2u:
case ir_unop_u2d:
case ir_unop_pack_double_2x32:
- case ir_unop_unpack_double_2x32:
case ir_unop_frexp_sig:
case ir_unop_frexp_exp:
unreachable("fp64 todo");
--
1.8.3.1
More information about the mesa-dev
mailing list