From 7aaa38728f93bfb69573e0d866f24e8cb41836f0 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Mon, 19 Aug 2013 10:45:46 -0700 Subject: glsl: Add conditional-select IR. It's a ?: that operates per-component on vectors. Will be used in upcoming lowering pass for ldexp and the implementation of frexp. csel(selector, a, b): per-component result = selector ? a : b Reviewed-by: Kenneth Graunke Reviewed-by: Ian Romanick --- src/mesa/program/ir_to_mesa.cpp | 1 + src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 1 + 2 files changed, 2 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index fe9cac05f56..510235caeed 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -1497,6 +1497,7 @@ ir_to_mesa_visitor::visit(ir_expression *ir) case ir_triop_bitfield_extract: case ir_triop_vector_insert: case ir_quadop_bitfield_insert: + case ir_triop_csel: assert(!"not supported"); break; diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index d4c4260105c..1c9174c91d0 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -1979,6 +1979,7 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir) case ir_quadop_vector: case ir_binop_vector_extract: case ir_triop_vector_insert: + case ir_triop_csel: /* This operation is not supported, or should have already been handled. */ assert(!"Invalid ir opcode in glsl_to_tgsi_visitor::visit()"); -- cgit v1.2.3