nir: Don't produce nir_op_fexp from GLSL IR
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 6 May 2015 23:57:22 +0000 (16:57 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 8 May 2015 19:12:54 +0000 (12:12 -0700)
All paths that produce GLSL IR for NIR lower ir_unop_exp.  All paths
that consume NIR will explode if they geta nir_op_fexp.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Acked-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/glsl/nir/glsl_to_nir.cpp

index f6b8331d4695d22976af528df124849780da8f10..3025d6b3805ed57626fc4fb277da18ce9bd96b7a 100644 (file)
@@ -1038,7 +1038,7 @@ nir_visitor::visit(ir_expression *ir)
    case ir_unop_rcp:  emit(nir_op_frcp, dest_size, srcs);  break;
    case ir_unop_rsq:  emit(nir_op_frsq, dest_size, srcs);  break;
    case ir_unop_sqrt: emit(nir_op_fsqrt, dest_size, srcs); break;
-   case ir_unop_exp:  emit(nir_op_fexp, dest_size, srcs);  break;
+   case ir_unop_exp:  unreachable("ir_unop_exp should have been lowered");
    case ir_unop_log:  emit(nir_op_flog, dest_size, srcs);  break;
    case ir_unop_exp2: emit(nir_op_fexp2, dest_size, srcs); break;
    case ir_unop_log2: emit(nir_op_flog2, dest_size, srcs); break;