From: Dave Airlie Date: Thu, 9 Jun 2016 00:01:40 +0000 (+1000) Subject: glsl/ir_builder: Add support for some 64-bit bitcasts. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=25c7a61b28d50a001ed77ca6aafd53220d679fe2;p=mesa.git glsl/ir_builder: Add support for some 64-bit bitcasts. We need builder support to implement some of the builtins. Signed-off-by: Dave Airlie Reviewed-by: Ian Romanick Reviewed-by: Matt Turner --- diff --git a/src/compiler/glsl/ir_builder.cpp b/src/compiler/glsl/ir_builder.cpp index f430100a085..0cee8565e4e 100644 --- a/src/compiler/glsl/ir_builder.cpp +++ b/src/compiler/glsl/ir_builder.cpp @@ -518,6 +518,30 @@ b2f(operand a) return expr(ir_unop_b2f, a); } +ir_expression* +bitcast_d2i64(operand a) +{ + return expr(ir_unop_bitcast_d2i64, a); +} + +ir_expression* +bitcast_d2u64(operand a) +{ + return expr(ir_unop_bitcast_d2u64, a); +} + +ir_expression* +bitcast_i642d(operand a) +{ + return expr(ir_unop_bitcast_i642d, a); +} + +ir_expression* +bitcast_u642d(operand a) +{ + return expr(ir_unop_bitcast_u642d, a); +} + ir_expression * interpolate_at_centroid(operand a) { diff --git a/src/compiler/glsl/ir_builder.h b/src/compiler/glsl/ir_builder.h index 231fbfcdb3e..5ee9412f6ef 100644 --- a/src/compiler/glsl/ir_builder.h +++ b/src/compiler/glsl/ir_builder.h @@ -191,6 +191,12 @@ ir_expression *f2d(operand a); ir_expression *i2d(operand a); ir_expression *u2d(operand a); +ir_expression *bitcast_d2i64(operand a); +ir_expression *bitcast_d2u64(operand a); + +ir_expression *bitcast_i642d(operand a); +ir_expression *bitcast_u642d(operand a); + ir_expression *min2(operand a, operand b); ir_expression *max2(operand a, operand b);