summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2016-01-27 12:48:38 +0100
committerSamuel Iglesias Gonsálvez <[email protected]>2016-05-10 11:25:08 +0200
commit9e5ce151a4708da60f9e5962cdefa5447a4dee04 (patch)
treeab0d1b1e4c8ec10ae6c1e9c73267074ac8491f8c /src
parenta644b0939dd8284bca25042bccd2439c173dd7d7 (diff)
i965/fs: handle fp64 opcodes in brw_do_channel_expressions
In the case of the pack opcode we are already doing the lowering in NIR, so no need to do it here. The unpack opcode operates on scalars, so it should not be lowered. In the case of frexp_sig and frexp_exp, they are lowered in lower_instructions, so we don't have to care about them. All the remaining opcodes involve conversions from and to doubles and are business as usual. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp23
1 files changed, 14 insertions, 9 deletions
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 7ae7b2ecdf6..3d2e61963d8 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
@@ -85,6 +85,7 @@ channel_expressions_predicate(ir_instruction *ir)
case ir_unop_interpolate_at_centroid:
case ir_binop_interpolate_at_offset:
case ir_binop_interpolate_at_sample:
+ case ir_unop_pack_double_2x32:
return false;
default:
break;
@@ -177,6 +178,8 @@ ir_channel_expressions_visitor::visit_leave(ir_assignment *ir)
case ir_unop_interpolate_at_centroid:
case ir_binop_interpolate_at_offset:
case ir_binop_interpolate_at_sample:
+ /* We scalarize these in NIR, so no need to do it here */
+ case ir_unop_pack_double_2x32:
return visit_continue;
default:
@@ -235,6 +238,13 @@ ir_channel_expressions_visitor::visit_leave(ir_assignment *ir)
case ir_unop_i2b:
case ir_unop_b2i:
case ir_unop_u2f:
+ case ir_unop_d2f:
+ case ir_unop_f2d:
+ case ir_unop_d2i:
+ case ir_unop_i2d:
+ case ir_unop_d2u:
+ case ir_unop_u2d:
+ case ir_unop_d2b:
case ir_unop_trunc:
case ir_unop_ceil:
case ir_unop_floor:
@@ -414,20 +424,15 @@ ir_channel_expressions_visitor::visit_leave(ir_assignment *ir)
case ir_unop_interpolate_at_centroid:
case ir_binop_interpolate_at_offset:
case ir_binop_interpolate_at_sample:
+ case ir_unop_unpack_double_2x32:
unreachable("not reached: expression operates on scalars only");
case ir_unop_pack_double_2x32:
- case ir_unop_unpack_double_2x32:
+ unreachable("not reached: to be lowered in NIR, should've been skipped");
+
case ir_unop_frexp_sig:
case ir_unop_frexp_exp:
- case ir_unop_d2f:
- case ir_unop_f2d:
- case ir_unop_d2i:
- case ir_unop_i2d:
- case ir_unop_d2u:
- case ir_unop_u2d:
- case ir_unop_d2b:
- unreachable("no fp64 support yet");
+ unreachable("should have been lowered by lower_instructions");
}
ir->remove();