[Mesa-dev] [PATCH 4/5] nir: Don't produce nir_op_flog from GLSL IR

Ian Romanick idr at freedesktop.org
Wed May 6 19:09:07 PDT 2015


From: Ian Romanick <ian.d.romanick at intel.com>

All paths that produce GLSL IR for NIR lower ir_unop_log.  All paths
that consume NIR will explode if they geta nir_op_flog.

Signed-off-by: Ian Romanick <ian.d.romanick 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 3025d6b..74cfb55 100644
--- a/src/glsl/nir/glsl_to_nir.cpp
+++ b/src/glsl/nir/glsl_to_nir.cpp
@@ -1039,7 +1039,7 @@ nir_visitor::visit(ir_expression *ir)
    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:  unreachable("ir_unop_exp should have been lowered");
-   case ir_unop_log:  emit(nir_op_flog, dest_size, srcs);  break;
+   case ir_unop_log:  unreachable("ir_unop_log should have been lowered");
    case ir_unop_exp2: emit(nir_op_fexp2, dest_size, srcs); break;
    case ir_unop_log2: emit(nir_op_flog2, dest_size, srcs); break;
    case ir_unop_i2f:
-- 
2.1.0



More information about the mesa-dev mailing list