summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorOlivier Galibert <[email protected]>2012-05-08 20:40:36 +0200
committerKenneth Graunke <[email protected]>2012-06-07 00:06:18 -0700
commite16b0a51be7866f3856b62b295df2bcf49e02384 (patch)
tree6b5563014c5781ae0f3b0e8c0fdf8e1110768598 /src/mesa/state_tracker
parentabe976755318fa9dd88a5c48289623ab7c12ce02 (diff)
glsl: Bitwise conversion operator support in the software renderers.
TGSI doesn't need an opcode, since registers are untyped (but beware once doubles come into the scene). Mesa IR doesn't handle native integers, so trying to handle them there is worthless, the case entries are only added for warning reasons. It was only tested with softpipe, since llvmpipe doesn't support glsl 1.3 yet. Signed-off-by: Olivier Galibert <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index e8d60f80de6..347a22f19cb 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -1762,6 +1762,12 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir)
else
emit(ir, TGSI_OPCODE_TRUNC, result_dst, op[0]);
break;
+ case ir_unop_bitcast_f2i:
+ case ir_unop_bitcast_f2u:
+ case ir_unop_bitcast_i2f:
+ case ir_unop_bitcast_u2f:
+ result_src = op[0];
+ break;
case ir_unop_f2b:
emit(ir, TGSI_OPCODE_SNE, result_dst, op[0], st_src_reg_for_float(0.0));
break;