Mesa (master): glsl: Add a new ir_unop_round_even opcode for GLSL 1.30' s roundEven.
Kenneth Graunke
kwg at kemper.freedesktop.org
Thu Oct 14 23:00:07 UTC 2010
Module: Mesa
Branch: master
Commit: d85d25dd1f4fd281bd210ba6ba5135ba1e3b535f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d85d25dd1f4fd281bd210ba6ba5135ba1e3b535f
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Thu Oct 14 13:37:03 2010 -0700
glsl: Add a new ir_unop_round_even opcode for GLSL 1.30's roundEven.
Also, update ir_to_mesa's "1.30 is unsupported" case to "handle" it.
---
src/glsl/ir.cpp | 2 ++
src/glsl/ir.h | 1 +
src/mesa/program/ir_to_mesa.cpp | 1 +
3 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp
index fd1c5d9..87e78ee 100644
--- a/src/glsl/ir.cpp
+++ b/src/glsl/ir.cpp
@@ -216,6 +216,7 @@ ir_expression::get_num_operands(ir_expression_operation op)
1, /* ir_unop_ceil */
1, /* ir_unop_floor */
1, /* ir_unop_fract */
+ 1, /* ir_unop_round_even */
1, /* ir_unop_sin */
1, /* ir_unop_cos */
@@ -288,6 +289,7 @@ static const char *const operator_strs[] = {
"ceil",
"floor",
"fract",
+ "round_even",
"sin",
"cos",
"dFdx",
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index 3503bc9..06198e4 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -700,6 +700,7 @@ enum ir_expression_operation {
ir_unop_ceil,
ir_unop_floor,
ir_unop_fract,
+ ir_unop_round_even,
/*@}*/
/**
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index cd60965..524130c 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -1130,6 +1130,7 @@ ir_to_mesa_visitor::visit(ir_expression *ir)
case ir_binop_bit_and:
case ir_binop_bit_xor:
case ir_binop_bit_or:
+ case ir_unop_round_even:
assert(!"GLSL 1.30 features unsupported");
break;
}
More information about the mesa-commit
mailing list