summaryrefslogtreecommitdiff
path: root/src/glsl/ir_constant_expression.cpp
AgeCommit message (Collapse)Author
2010-07-28ir_constant_expression: Add support for the "distance" builtin.Kenneth Graunke
2010-07-28ir_constant_expression: Add support for the "degrees" builtin.Kenneth Graunke
2010-07-28ir_constant_expression: Add support for the "radians" builtin.Kenneth Graunke
2010-07-28ir_constant_expression: Add support for the "tanh" builtin.Kenneth Graunke
2010-07-28ir_constant_expression: Add support for the "tan" builtin.Kenneth Graunke
2010-07-28ir_constant_expression: Add support for the "sinh" builtin.Kenneth Graunke
2010-07-28ir_constant_expression: Add support for the "cosh" builtin.Kenneth Graunke
2010-07-28ir_constant_expression: Add support for "atan" builtins.Kenneth Graunke
2010-07-28ir_constant_expression: Add support for "acos" builtin.Kenneth Graunke
2010-07-28ir_constant_expression: Add support for "asin" builtin.Kenneth Graunke
2010-07-28ir_constant_expression: Add support for "any" builtin.Kenneth Graunke
2010-07-28ir_constant_expression: Add support for "all" builtin.Kenneth Graunke
2010-07-28ir_constant_expression: Implement builtins that wrap an expression.Kenneth Graunke
These builtin functions are represented by ir_expression_operations, so we can just create one of those and ask for its value.
2010-07-28ir_constant_expression: Add support for builtins dFdx, dFdy, and fwidth.Kenneth Graunke
These always return zero (the derivative of a constant).
2010-07-28ir_constant_expression: Stub out support for constant builtins.Kenneth Graunke
2010-07-28ir_constant_expression: Use Mesa's MIN2/MAX2 instead of our own.Kenneth Graunke
2010-07-27glsl2: Don't dereference a NULL var in CE handling during a compile error.Eric Anholt
If an undeclared variable was dereferenced in an expression that needed constant expression handling, we would walk off a null ir->var pointer. Fixes: glsl1-TIntermediate::addUnaryMath
2010-07-22ir_constant_expression: Fix broken code for floating point modulus.Kenneth Graunke
It's supposed to be x - y * floor(x/y), not (x - y) * floor(x/y).
2010-07-21ir_constant_expression: Add support for array == and !=.Kenneth Graunke
Piglit parser tests const-array-03.frag and const-array-04.frag now generate the correct code.
2010-07-21ir_constant_expression: Add support for constant arrays.Kenneth Graunke
Fixes piglit test const-array-02.frag.
2010-07-21ir_constant_expression: Add support for ir_unop_u2f.Kenneth Graunke
Also make ir_unop_i2f only operate on signed integers.
2010-07-21ir_constant_expression: Remove open coded equality comparisons.Kenneth Graunke
The ir_constant::has_value method already does this.
2010-07-20ir_constant_expression: Remove pointless use of variable_referenced.Kenneth Graunke
ir_dereference_variable always references an ir_variable, so there's no point in calling a function and NULL-checking the result.
2010-07-20ir_constant_expression: Use "this" pointer directly.Kenneth Graunke
In ir_expression's signature, I replaced ir->operands[i] with op[i] as it is more concise; an assertion already ensures these are equal.
2010-07-20ir_constant_expression: Convert from a visitor to a virtual function.Kenneth Graunke
The constant_expression_wrapper was already the only external API, and much of the internal code used it anyway. Also, it wouldn't ever visit non-rvalue ir_instructions, so using a visitor seemed a bit unnecessary. This uses "ir_foo *ir = this;" lines to avoid code churn. These should be removed.
2010-07-20glsl2: Move constant_expression_value method to ir_rvalue.Kenneth Graunke
This prevents top-level callers from asking for the value of something that is guaranteed not to have one.
2010-07-18glsl2: Make cross() be an expression operation.Eric Anholt
ARB_fp, ARB_vp, Mesa IR, and the 965 vertex shader all have instructions for cross. Shaves 12 Mesa instructions off of a 66-instruction shader I have.
2010-07-14ir_constant_expression: Add support for ir_binop_mod.Kenneth Graunke
2010-07-14ir_constant_expression: Add support for ir_binop_min and ir_binop_max.Kenneth Graunke
These now work on scalar/vector combos. Semantically, if a is a scalar, min(a, vec2(x,y)) == vec2(min(a,x), min(a,y))
2010-07-14ir_constant_expression: Add support for ir_binop_pow.Kenneth Graunke
2010-07-14ir_constant_expression: Add support for ir_unop_cos.Kenneth Graunke
2010-07-14ir_constant_expression: Add support for ir_unop_sin.Kenneth Graunke
2010-07-14ir_constant_expression: Add support for ir_unop_floor.Kenneth Graunke
2010-07-14ir_constant_expression: Add support for ir_unop_ceil.Kenneth Graunke
2010-07-14ir_constant_expression: Add support for ir_unop_trunc.Kenneth Graunke
This uses a C99 function.
2010-07-14ir_constant_expression: Add support for ir_unop_log2.Kenneth Graunke
This uses a C99 function.
2010-07-14ir_constant_expression: Add support for ir_unop_exp2.Kenneth Graunke
This uses a C99 function.
2010-07-14ir_constant_expression: Add support for ir_unop_sign.Kenneth Graunke
2010-07-14ir_constant_expression: Remove bogus assert in ir_unop_abs case.Kenneth Graunke
abs is defined for integral types; it's even implemented.
2010-07-07ir_constant_expression: Fix loop increments.Kenneth Graunke
2010-07-07glsl2: Avoid null deref in scalar constant unop expressions.Eric Anholt
2010-07-06glsl2: Clone methods return the type of the thing being clonedIan Romanick
This is as opposed to returning the type of the base class of the hierarchy.
2010-07-06ir_constant_expression: Declare loop counting variables in the loops.Kenneth Graunke
Fixes "name lookup of 'c' changed" warning.
2010-07-06ir_constant_expression: Add support for dot products.Kenneth Graunke
2010-07-06ir_constant_expression: Add support for matrix multiplication.Kenneth Graunke
Also handles matrix/vector and vector/matrix multiplication. Fixes piglit tests const-matrix-multiply-01.frag, const-matrix-multiply-02.frag, and const-vec-mat.frag.
2010-07-06ir_constant_expression: Support scalar * vector and scalar * matrix.Kenneth Graunke
The test here is slightly different since we need to keep matrix multiplication separate. Fixes piglit tests const-vec-scalar-03.frag and const-mat-scalar-03.frag.
2010-07-06ir_constant_expression: Support scalar / vector and scalar / matrix.Kenneth Graunke
Fixes piglit tests const-vec-scalar-04.frag and const-mat-scalar-04.frag.
2010-07-06ir_constant_expression: Support scalar - vector and scalar - matrix.Kenneth Graunke
Fixes piglit tests const-vec-scalar-02.frag and const-mat-scalar-02.frag.
2010-07-06ir_constant_expression: Support scalar + vector and scalar + matrix.Kenneth Graunke
Fixes piglit tests const-vec-scalar-01.frag, const-vec-scalar-05.frag, and const-mat-scalar-01.frag.
2010-07-06ir_constant_expression: Assert that both operands share a base type.Kenneth Graunke