projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vk: Delete vk.c test case
[mesa.git]
/
src
/
glsl
/
ir_builder.cpp
diff --git
a/src/glsl/ir_builder.cpp
b/src/glsl/ir_builder.cpp
index f03941443e09822eccc1b55c6db531880cbef769..e44b05c991c30753fda5f8046622c4ada4a3c43a 100644
(file)
--- a/
src/glsl/ir_builder.cpp
+++ b/
src/glsl/ir_builder.cpp
@@
-246,11
+246,21
@@
ir_expression *borrow(operand a, operand b)
return expr(ir_binop_borrow, a, b);
}
return expr(ir_binop_borrow, a, b);
}
+ir_expression *trunc(operand a)
+{
+ return expr(ir_unop_trunc, a);
+}
+
ir_expression *round_even(operand a)
{
return expr(ir_unop_round_even, a);
}
ir_expression *round_even(operand a)
{
return expr(ir_unop_round_even, a);
}
+ir_expression *fract(operand a)
+{
+ return expr(ir_unop_fract, a);
+}
+
/* dot for vectors, mul for scalars */
ir_expression *dot(operand a, operand b)
{
/* dot for vectors, mul for scalars */
ir_expression *dot(operand a, operand b)
{
@@
-271,11
+281,7
@@
clamp(operand a, operand b, operand c)
ir_expression *
saturate(operand a)
{
ir_expression *
saturate(operand a)
{
- void *mem_ctx = ralloc_parent(a.val);
-
- return expr(ir_binop_max,
- expr(ir_binop_min, a, new(mem_ctx) ir_constant(1.0f)),
- new(mem_ctx) ir_constant(0.0f));
+ return expr(ir_unop_saturate, a);
}
ir_expression *
}
ir_expression *
@@
-518,6
+524,24
@@
interpolate_at_sample(operand a, operand b)
return expr(ir_binop_interpolate_at_sample, a, b);
}
return expr(ir_binop_interpolate_at_sample, a, b);
}
+ir_expression *
+f2d(operand a)
+{
+ return expr(ir_unop_f2d, a);
+}
+
+ir_expression *
+i2d(operand a)
+{
+ return expr(ir_unop_i2d, a);
+}
+
+ir_expression *
+u2d(operand a)
+{
+ return expr(ir_unop_u2d, a);
+}
+
ir_expression *
fma(operand a, operand b, operand c)
{
ir_expression *
fma(operand a, operand b, operand c)
{