From 7ec3af3f8ff6584542f029c28abc2bcae1402259 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Mon, 23 Jan 2017 23:59:45 -0800 Subject: glsl/ir_builder: Add rcp builder. Reviewed-by: Ian Romanick Reviewed-by: Juan A. Suarez Romero --- src/compiler/glsl/ir_builder.cpp | 6 ++++++ src/compiler/glsl/ir_builder.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/compiler/glsl/ir_builder.cpp b/src/compiler/glsl/ir_builder.cpp index 0cee8565e4e..8d61533efcf 100644 --- a/src/compiler/glsl/ir_builder.cpp +++ b/src/compiler/glsl/ir_builder.cpp @@ -314,6 +314,12 @@ exp(operand a) return expr(ir_unop_exp, a); } +ir_expression * +rcp(operand a) +{ + return expr(ir_unop_rcp, a); +} + ir_expression * rsq(operand a) { diff --git a/src/compiler/glsl/ir_builder.h b/src/compiler/glsl/ir_builder.h index 5ee9412f6ef..ff1ff709c9a 100644 --- a/src/compiler/glsl/ir_builder.h +++ b/src/compiler/glsl/ir_builder.h @@ -148,6 +148,7 @@ ir_expression *neg(operand a); ir_expression *sin(operand a); ir_expression *cos(operand a); ir_expression *exp(operand a); +ir_expression *rcp(operand a); ir_expression *rsq(operand a); ir_expression *sqrt(operand a); ir_expression *log(operand a); -- cgit v1.2.3