Mesa (master): nir: Don't produce nir_op_fexp from GLSL IR

Ian Romanick idr at kemper.freedesktop.org
Fri May 8 19:13:09 UTC 2015


Module: Mesa
Branch: master
Commit: a45d55f17c7895c55214d2babeb0f0b03442c8a8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a45d55f17c7895c55214d2babeb0f0b03442c8a8

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Wed May  6 16:57:22 2015 -0700

nir: Don't produce nir_op_fexp from GLSL IR

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 at intel.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Acked-by: Jason Ekstrand <jason.ekstrand at intel.com>

---

 src/glsl/nir/glsl_to_nir.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp
index f6b8331..3025d6b 100644
--- a/src/glsl/nir/glsl_to_nir.cpp
+++ b/src/glsl/nir/glsl_to_nir.cpp
@@ -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;




More information about the mesa-commit mailing list