613a8170ae53091d516f602d091a6bbcd169e92f |
|
14-Jun-2012 |
Paul Berry <stereotype441@gmail.com> |
glsl: Add support for ir_unop_f2u to constant folding. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
ea055e19c2757dfe97dd13c1deee2bfa177eae3f |
|
05-Jun-2012 |
Marcin Slusarz <marcin.slusarz@gmail.com> |
glsl: fix deref_hash memory leak in constant_expression_value Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
abe976755318fa9dd88a5c48289623ab7c12ce02 |
|
08-May-2012 |
Olivier Galibert <galibert@pobox.com> |
glsl: Bitwise conversion operator support in ir_constant_expression. A "test_out = floatBitsToUint(-1.0);" fired through the GLSL compiler gives a correct "(assign (x) (var_ref test_out) (constant uint (3212836864)))" Signed-off-by: Olivier Galibert <galibert@pobox.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
363c14ae0cd2baa624d85e8c9db12cd1677190ea |
|
02-May-2012 |
Olivier Galibert <galibert@pobox.com> |
glsl: Change built-in constant expression evaluation to run the IR. This removes code duplication with ir_expression::constant_expression_value and builtins/ir/*. Signed-off-by: Olivier Galibert <galibert@pobox.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
a270e86d382597d4d01ebcfa1693e21d778cbe6d |
|
02-May-2012 |
Olivier Galibert <galibert@pobox.com> |
glsl: Add a constant_referenced method to ir_dereference* The method is used to get a reference to an ir_constant * within the context of evaluating an assignment when calculating a constant_expression_value. Signed-off-by: Olivier Galibert <galibert@pobox.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> [v1]
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
6e4852a3a5f3cbe52c53d91d343a37861f207563 |
|
02-May-2012 |
Olivier Galibert <galibert@pobox.com> |
glsl: Add a variable context to constant_expression_value(). Signed-off-by: Olivier Galibert <galibert@pobox.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> [v1]
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
f72e9b2041e294c8ac2258ff3f2b923c39cbef83 |
|
08-May-2012 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Fix broken constant expression handling for <, <=, >, and >=. We were looping over all the vector components, but only dealing with the first one. This was masked by the fact that constant expression handling on built-ins went through custom code for the lessThan() /function/ rather than the ir_binop_less expression operator. NOTE: This is a candidate for all release branches. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Olivier Galibert <galibert@pobox.com> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
d884f60861f270cdcf7d9d47765efcf1e1de30b6 |
|
20-Mar-2012 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Convert ir_call to be a statement rather than a value. Aside from ir_call, our IR is cleanly split into two classes: - Statements (typeless; used for side effects, control flow) - Values (deeply nestable, pure, typed expression trees) Unfortunately, ir_call confused all this: - For void functions, we placed ir_call directly in the instruction stream, treating it as an untyped statement. Yet, it was a subclass of ir_rvalue, and no other ir_rvalue could be used in this way. - For functions with a return value, ir_call could be placed in arbitrary expression trees. While this fit naturally with the source language, it meant that expressions might not be pure, making it difficult to transform and optimize them. To combat this, we always emitted ir_call directly in the RHS of an ir_assignment, only using a temporary variable in expression trees. Many passes relied on this assumption; the acos and atan built-ins violated it. This patch makes ir_call a statement (ir_instruction) rather than a value (ir_rvalue). Non-void calls now take a ir_dereference of a variable, and store the return value there---effectively a call and assignment rolled into one. They cannot be embedded in expressions. All expression trees are now pure, without exception. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
d0fa0cb52cebdcd0ca483b9cd7af6be2f228b8dc |
|
20-Sep-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Move constant expression handling from calls to signatures. When translating a call from AST to HIR, we need to decide whether it can be evaluated to a constant before emitting any code (namely, the temporary declaration, assignment, and call.) Soon, ir_call will become a statement taking a dereference of where to store the return value, rather than an rvalue to be used on the RHS of an assignment. It will be more convenient to try evaluation before creating a call. ir_function_signature seems like a reasonable place. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
807e967c615dc80a264af5a89af7649f95481744 |
|
23-Sep-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Use ir_rvalue to represent generic error_type values. Currently, ir_call can be used as either a statement (for void functions) or a value (for non-void functions). This is rather awkward, as it's the only class that can be used in both forms. A number of places use ir_call::get_error_instruction() to construct a generic value of error_type. If ir_call is to become a statement, it can no longer serve this purpose. Unfortunately, none of our classes are particularly well suited for this, and creating a new one would be rather aggrandizing. So, this patch introduces ir_rvalue::error_value(), a static method that creates an instance of the base class, ir_rvalue. This has the nice property that you can't accidentally try and access uninitialized fields (as it doesn't have any). The downside is that the base class is no longer abstract. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
a17a78a212be10fe3a9a330f3861d771e92d9074 |
|
09-Nov-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Handle constant expressions involving ir_binop_equal/nequal. Constant expressions which called GLSL's equal() and notEqual() built-ins on bvecs would hit an assertion failure; we simply forgot to implement them for booleans. NOTE: This is a candidate for stable release branches. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
b726639e1be0614fb6bbb75a6f07c63eacc6d787 |
|
06-Oct-2011 |
Paul Berry <stereotype441@gmail.com> |
glsl: Fix copy-paste error in constant_expression_value(ir_binop_nequal) The implementation of ir_binop_nequal in constant_expression_value() appears to have been copy-and-pasted from the implementation of ir_binop_equal, but with all instances of '==' changed to '!='. This is correct except for one minor flaw: one of those '==' operators was in an assertion checking that the types of the two arguments were equal. That one needs to stay an '=='. Fixes piglit tests {fs,vs}-inline-notequal.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
dc637b66b25f341783efb53acc70e1bafbcba576 |
|
27-Sep-2011 |
Eric Anholt <eric@anholt.net> |
glsl: Add support for constant expression evaluation on round(), roundEven(). v2: Avoid the C99 rounding functions, because I don't trust get/setting the C99 rounding mode from inside our library not having other side effects. Instead, open-code roundEven() behavior around Mesa's IROUND, which we're already testing for C99 rounding mode safety. Fixes glsl-1.30/compiler/built-in-functions/round* Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
9f220bd1353b3d141d6a0308103ff403d8653e23 |
|
27-Sep-2011 |
Eric Anholt <eric@anholt.net> |
glsl: Add support for constant expression evaluation on trunc(). Fixes the glsl-1.30/compiler/built-in-functions/trunc-* tests under 1.30. Reviewed-by: Chad Versace <chad@chad-versace.us> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
344f94bb006188931b09939aafc7cc96609c4f5a |
|
27-Sep-2011 |
Eric Anholt <eric@anholt.net> |
glsl: Fix assertion checking types of constant bitshift expressions. Bitshifts are one of the rare places that GLSL allows mixed base types without an implicit conversion occurring. Reviewed-by: Chad Versace <chad@chad-versace.us> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
20ef96c7ff3f17fbf97e0452a37553249b2b005c |
|
15-Jun-2011 |
Bryan Cain <bryancain3@gmail.com> |
glsl: Add ir_unop_i2u and ir_unop_u2i operations. These are necessary to handle int/uint constructor conversions. For example, the following code currently results in a type mismatch: int x = 7; uint y = uint(x); In particular, uint(x) still has type int. This commit simply adds the new operations; it does not generate them, nor does it add backend support for them. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
62c8c773334c1b0cdd484997a4ccec8945713f8c |
|
14-Feb-2011 |
Chad Versace <chad.versace@intel.com> |
glsl: Reinstate constant-folding for division by zero Fixes regression: https://bugs.freedesktop.org/show_bug.cgi?id=34160 Commit e7c1f058d18f62aa4871aec623f994d7b68cb8c1 disabled constant-folding when division-by-zero occured. This was a mistake, because the spec does allow division by zero. (From section 5.9 of the GLSL 1.20 spec: Dividing by zero does not cause an exception but does result in an unspecified value.) For floating-point division, the original pre-e7c1f05 behavior is reinstated. For integer division, constant-fold 1/0 to 0.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
f2e9981e43b26ca101b774ea6af1f00617098246 |
|
14-Feb-2011 |
Chad Versace <chad.versace@intel.com> |
Revert "glsl: Fix constant-folding for reciprocal expressions" This reverts commit b3cf92aa916ee0537ee37723c23a9897ac9cd3e0. The reverted commit prevented constant-folding of reciprocal expressions when the reciprocated expression was 0. However, since the spec allows division by zero, constant-folding *is* permissible in this case. From Section 5.9 of the GLSL 1.20 spec: Dividing by zero does not cause an exception but does result in an unspecified value.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
e7c1f058d18f62aa4871aec623f994d7b68cb8c1 |
|
01-Feb-2011 |
Chad Versace <chad.versace@intel.com> |
glsl: Avoid division-by-zero during constant-folding Avoid division-by-zero when constant-folding the following expression types: ir_unop_rsq ir_binop_div ir_binop_mod Fixes bugs: https://bugs.freedesktop.org//show_bug.cgi?id=33306 https://bugs.freedesktop.org//show_bug.cgi?id=33508 Fixes Piglit tests: glslparsertest/glsl2/div-by-zero-01.frag glslparsertest/glsl2/div-by-zero-02.frag glslparsertest/glsl2/div-by-zero-03.frag glslparsertest/glsl2/modulus-zero-01.frag glslparsertest/glsl2/modulus-zero-02.frag NOTE: This is a candidate for the 7.9 and 7.10 branches.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
b3cf92aa916ee0537ee37723c23a9897ac9cd3e0 |
|
01-Feb-2011 |
Chad Versace <chad.versace@intel.com> |
glsl: Fix constant-folding for reciprocal expressions Do not constant-fold a reciprocal if any component of the reciprocated expression is 0. For example, do not constant-fold `1 / vec4(0, 1, 2, 3)`. Incorrect, previous behavior ---------------------------- Reciprocals were constant-folded even when some component of the reciprocated expression was 0. The incorrectly applied arithmetic was: 1 / 0 := 0 For example, 1 / vec4(0, 1, 2, 3) = vec4(0, 1, 1/2, 1/3) NOTE: This is a candidate for the 7.9 and 7.10 branches.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
d3073f58c17d8675a2ecdd5dfa83e5520c78e1a8 |
|
21-Jan-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
Convert everything from the talloc API to the ralloc API.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
11d6f1c69871d0b7edc28f639256460839fccd2d |
|
16-Nov-2010 |
Ian Romanick <ian.d.romanick@intel.com> |
glsl: Add ir_quadop_vector expression The vector operator collects 2, 3, or 4 scalar components into a vector. Doing this has several advantages. First, it will make ud-chain tracking for components of vectors much easier. Second, a later optimization pass could collect scalars into vectors to allow generation of SWZ instructions (or similar as operands to other instructions on R200 and i915). It also enables an easy way to generate IR for SWZ instructions in the ARB_vertex_program assembler.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
fc92e87b9757eda01caf0bb3e2c31b1dbbd73aa0 |
|
11-Nov-2010 |
Ian Romanick <ian.d.romanick@intel.com> |
glsl: Eliminate assumptions about size of ir_expression::operands This may grow in the near future.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
f2616e56de8a48360cae8f269727b58490555f4d |
|
18-Nov-2010 |
Ian Romanick <ian.d.romanick@intel.com> |
glsl: Add ir_unop_sin_reduced and ir_unop_cos_reduced The operate just like ir_unop_sin and ir_unop_cos except that they expect their inputs to be limited to the range [-pi, pi]. Several GPUs require this limited range for their sine and cosine instructions, so having these as operations (along with a to-be-written lowering pass) helps this architectures. These new operations also matche the semantics of the GL_ARB_fragment_program SCS instruction. Having these as operations helps in generating GLSL IR directly from assembly fragment programs.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
9935fe705df44bb633039ca74332cc0c126ccc30 |
|
17-Nov-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Remove the ir_binop_cross opcode.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
e16c9d5d03a4606b37cbeb84358925913086d6eb |
|
17-Nov-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Fix constant expression handling for <, >, <=, >= on vectors. ir_binop_less, ir_binop_greater, ir_binop_lequal, and ir_binop_gequal are defined to work on vectors as well as scalars, as long as the two operands have the same type. This is evident from both ir_validate.cpp and our use of these opcodes in the GLSL lessThan, greaterThan, lessThanEqual, greaterThanEqual built-in functions. Found by code inspection. Not known to fix any bugs. Presumably, our tests for the built-in comparison functions must pass because C.E. handling is done on the ir_call of "greaterThan" rather than the inlined opcode. The C.E. handling of the built-in function calls is correct. NOTE: This is a candidate for the 7.9 branch.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
88f482a8391b17587fa2af07f6f40dc1f7394fa7 |
|
16-Nov-2010 |
Brian Paul <brianp@vmware.com> |
glsl: fix assorted MSVC warnings
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
3108095198d86b31566285160a3a1a206f22c8dd |
|
15-Nov-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Add constant expression handling for asinh, acosh, and atanh.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
b62c1c4595551c4936323135224a5ea686ba972a |
|
09-Nov-2010 |
Chad Versace <chad.versace@intel.com> |
glsl: Fix ir_expression::constant_expression_value() When the type of the ir_expression is error_type, return NULL. This fixes bug 31371.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
4761d0d22ba79fa34adf679007498287e9fedca2 |
|
10-Oct-2010 |
Chad Versace <chad@chad-versace.us> |
glsl: Implement constant expr evaluation for bitwise logic ops Implement by adding the following cases to ir_exporession::constant_expression_value(): - ir_binop_bit_and - ir_binop_bit_or - ir_binop_bit_xor
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
adea8150a70f975c31c68f3e84ec3f8b0b448cf0 |
|
10-Oct-2010 |
Chad Versace <chad@chad-versace.us> |
glsl: Implement constant expr evaluation for bit-shift ops Implement by adding the following cases to ir_expression::constant_expression_value(): - ir_binop_lshfit - ir_binop_rshfit
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
90a8b792c04679fc745e5a68ead9f7c37b8d07c4 |
|
09-Oct-2010 |
Chad Versace <chad@chad-versace.us> |
glsl: Implement constant expr evaluation for bitwise-not Implement by adding a case to ir_expression::constant_expression_value() for ir_unop_bit_not.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
720bdfbceb5b20bbbb4090cca7a1825ca5f89260 |
|
13-Oct-2010 |
Vinson Lee <vlee@vmware.com> |
glsl: Initialize variable in ir_derefence_array::constant_expression_value Completely initialize data passed to ir_constant constructor. Fixes piglit glsl-mat-from-int-ctor-03 valgrind uninitialized value error on softpipe.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
6ea16b6c510ee7f0e68505838a99562f0852f8e4 |
|
19-Sep-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Fix broken handling of ir_binop_equal and ir_binop_nequal. When ir_binop_all_equal and ir_binop_any_nequal were introduced, the meaning of these two opcodes changed to return vectors rather than a single scalar, but the constant expression handling code was incorrectly written and only worked for scalars. As a result, only the first component of the returned vector would be properly initialized.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
4dfb89904c0a3d2166e9a3fc0253a254680e91bc |
|
08-Sep-2010 |
Luca Barbieri <luca@luca-barbieri.com> |
glsl: introduce ir_binop_all_equal and ir_binop_any_equal, allow vector cmps Currently GLSL IR forbids any vector comparisons, and defines "ir_binop_equal" and "ir_binop_nequal" to compare all elements and give a single bool. This is highly unintuitive and prevents generation of optimal Mesa IR. Hence, first rename "ir_binop_equal" to "ir_binop_all_equal" and "ir_binop_nequal" to "ir_binop_any_nequal". Second, readd "ir_binop_equal" and "ir_binop_nequal" with the same semantics as less, lequal, etc. Third, allow all comparisons to acts on vectors. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
f412fac5b46eb274cbed8e62234d5dbfd859f1fe |
|
05-Sep-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Move is_builtin flag back to ir_function_signature. This effectively reverts b6f15869b324ae64a00d0fe46fa3c8c62c1edb6c. In desktop GLSL, defining a function with the same name as a built-in hides that built-in function completely, so there would never be built-in and user function signatures in the same ir_function. However, in GLSL ES, overloading built-ins is allowed, and does not hide the built-in signatures - so we're back to needing this.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
2d0ef6bfee64b6889cbfb69762f167a6dfc20131 |
|
29-Aug-2010 |
Vinson Lee <vlee@vmware.com> |
glsl: Initialize variable in ir_swizzle::constant_expression_value. Complete initialize data passed to ir_constant constructor. Fixes piglit glsl-mat-from-int-ctor-02 valgrind unintialized variable error with softpipe and llvmpipe.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
b6f15869b324ae64a00d0fe46fa3c8c62c1edb6c |
|
21-Aug-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Move is_built_in flag from ir_function_signature to ir_function. Also rename it to "is_builtin" for consistency. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
bfd7c9ac228c7ed8aec04c3b3aa33f40ee00b035 |
|
23-Aug-2010 |
Chia-I Wu <olv@lunarg.com> |
glsl: Include main/core.h. Make glsl include only main/core.h from core mesa.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
5e9ac94cc44ef4f97063d7b696411b2a4be16f36 |
|
23-Aug-2010 |
Eric Anholt <eric@anholt.net> |
mesa: Add new ir_unop_any() expression operation. The previous any() implementation would generate arg0.x || arg0.y || arg0.z. Having an expression operation for this makes it easy for the backend to generate something easier (DPn + SNE for 915 FS, .any predication on 965 VS)
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
d12cb77d85ec726a67c2099c4105df63829b45a4 |
|
18-Aug-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Implement equal/notEqual for booleans. Calls to equal(bvec, bvec) or notEqual(bvec, bvec) previously caused an assertion. Fixes piglit tests glsl-const-builtin-equal-bool and glsl-const-builtin-notEqual-bool.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
952d0f88e1741d51b641be75f7c5a6565e245a69 |
|
04-Aug-2010 |
Eric Anholt <eric@anholt.net> |
glsl2: Skip talloc_parent in constant_expression of non-constant arrays.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
8273bd46877e2ea2b8a02b87a11c68102d07e1f2 |
|
04-Aug-2010 |
Eric Anholt <eric@anholt.net> |
glsl2: Make the clone() method take a talloc context. In most cases, we needed to be reparenting the cloned IR to a different context (for example, to the linked shader instead of the unlinked shader), or optimization before the reparent would cause memory usage of the original object to grow and grow.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
c8babd5d9bba75c9f38f384f9cb3587e3543cc28 |
|
03-Aug-2010 |
Eric Anholt <eric@anholt.net> |
glsl2: Fix typo in clamp() constant builtin using uint instead of int. I take back the bad things I've said about the signed/unsigned comparison warning now.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
5704ed27dd2ebc88639cbd32ac971939ef3c267a |
|
03-Aug-2010 |
Eric Anholt <eric@anholt.net> |
glsl2: Don't consider uniform initializers as constant expressions. We were happily optimizing away the body of glsl-uniform-initializer-* to never use the uniforms.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
7ddee6a535f7323d7c6131e52e7933130d886ae4 |
|
23-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "outerProduct" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
5d255e24b29930e78321c1ba807df71fea12174a |
|
23-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "mix" builtin. Both 1.10 and 1.30 variants.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
b09ae5dd3f9b8e380e2608f4ee3a7902f5ecc15e |
|
23-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "transpose" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
546f3a27540c408c9d83368c5f6144e13167dcb3 |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "smoothstep" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
a4ca1cfb66160c4ea2325f503ff025a4adc35084 |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "clamp" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
ff58b7c9b6f513ed8bf57b3e4283b67b06fd9d34 |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "step" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
3d5c2f0adbd72a68d4fe3900b0d3e267510950ef |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "faceforward" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
04b3643dbf2e0d25e67c86845b2506ad1d26939d |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "refract" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
d60b2b03da30093ae85458f1d0be3cc5c33d992c |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "reflect" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
53f306d573ce6393062cf86d4fe31148eacc5e1e |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "normalize" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
8fe5f30645e1b6a87497c1abc408ade633e9ebc1 |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "matrixCompMult" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
a7650af706b359056db8b9da6d1d83669106d463 |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Simplify code that implements the "dot" builtin. There's no need to use an ir_expression; we have a handy C function.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
5489ad086f77e548905c98ccd27cd626d706d5f9 |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "length" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
ffcec135997545b4dc2b3393ccb02558083373a0 |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Extract dot product calculation for reuse.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
4b1d77ea966771dc5fbdac90dfec1b6066afe3f8 |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Remove support for dot products of integers. This shouldn't be required since dot is only defined for floating point types, even in GLSL 4.0.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
557827340aedbf64d2486226924d00c94107c9e8 |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "greaterThanEqual" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
7f042b98126b1710c819091512621c642f8fcbbc |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "greaterThan" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
319f4949e0a5f1daa3a760fc84096c041e3ce815 |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "lessThanEqual" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
6d897f07cf7ed8492ef5f0da90259856fdac5bf6 |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "lessThan" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
48a69ba05794f3d253114b452174710a15eefadf |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "notEqual" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
0b6ef6ef6e1930b6ec03dae7ace53372bb239981 |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "equal" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
2eaf31642c83086b06dce057997ae4bc4b1bce2c |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "distance" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
7bcaa3828f8d3d39cfece5d91e47ed2a135a9471 |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "degrees" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
0afe3493221c6a676bcc045aca508bb08f58a4f4 |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "radians" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
20970f7dea220a2f44c180579630f453729ab31b |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "tanh" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
9c9f8b2d69094fb308de0d6a28bcd60cdf8aedf6 |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "tan" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
5d551daf38e30d6cb863038afe1a8e32c806e6ae |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "sinh" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
ba4178345a1eb8e697a8cb01b5594c0a3b4b1d29 |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for the "cosh" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
13f8758e9c3babdee3fc0b8b8e1d4a7e13ef9694 |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for "atan" builtins.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
f6ea9dfe473ccb0b5121461653696fe07ee4f328 |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for "acos" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
3b6c29b8f00a2475b24022cace69f372b470a9b1 |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for "asin" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
d6792a7f7c2b73486987d2bc07fc77d46456b65d |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for "any" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
aca7e95222ac33e5eda84ecc566da609f6f6ce8e |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for "all" builtin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
8b1680acc38cfbb6d2fc80ddab3f3eed24e2522a |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Implement builtins that wrap an expression. These builtin functions are represented by ir_expression_operations, so we can just create one of those and ask for its value.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
38cb1b273f55f98349d981445cfe06351322b032 |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for builtins dFdx, dFdy, and fwidth. These always return zero (the derivative of a constant).
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
bafd89fa0f026cef12024382b154a41d90d00373 |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Stub out support for constant builtins.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
f914915d8e86f492cfcbbf834df601251bbba033 |
|
22-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Use Mesa's MIN2/MAX2 instead of our own.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
54f583a206a15b1a92c547333adfae29ced796ef |
|
27-Jul-2010 |
Eric Anholt <eric@anholt.net> |
glsl2: Don't dereference a NULL var in CE handling during a compile error. 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
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
3e882ec84a2493da74c55d105010a37de521e593 |
|
23-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Fix broken code for floating point modulus. It's supposed to be x - y * floor(x/y), not (x - y) * floor(x/y).
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
9a6d40fbfb679f01412c1fcc9d767c20a22246d8 |
|
20-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for array == and !=. Piglit parser tests const-array-03.frag and const-array-04.frag now generate the correct code.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
a096fa747611472965cf0f953bfe2757fc80383c |
|
20-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for constant arrays. Fixes piglit test const-array-02.frag.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
46d6b8d1ba09d9d6844ce99a30416283004f77c6 |
|
20-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for ir_unop_u2f. Also make ir_unop_i2f only operate on signed integers.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
3163f87463e6d0123c4f95bd76a658cb1e5d0843 |
|
20-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Remove open coded equality comparisons. The ir_constant::has_value method already does this.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
e4768eecd5da6f9e955aa7c3892810813623f0dc |
|
15-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Remove pointless use of variable_referenced. ir_dereference_variable always references an ir_variable, so there's no point in calling a function and NULL-checking the result.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
98f32a13bef1eef732304eb8e2781e08835ff69a |
|
15-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Use "this" pointer directly. 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.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
fb2ffd2846b48cb50128fb74df56f2ee63179832 |
|
15-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Convert from a visitor to a virtual function. 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.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
e340854115f2562109c91fa908ffe6628432f989 |
|
12-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl2: Move constant_expression_value method to ir_rvalue. This prevents top-level callers from asking for the value of something that is guaranteed not to have one.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
9be7f638130f46a9df2bfbcd4a03b36de9e4f3aa |
|
14-Jul-2010 |
Eric Anholt <eric@anholt.net> |
glsl2: Make cross() be an expression operation. 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.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
ce5ae5f49d82b545ab204b9fdb9a8f939e0a6d78 |
|
14-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for ir_binop_mod.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
79fed377f4625da9ce6a0a32c1e7277a2e90e914 |
|
09-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for ir_binop_min and ir_binop_max. 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))
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
891a0647e419c0cd2b67e43540936bf0ac94f840 |
|
09-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for ir_binop_pow.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
3fab376bef8c5f407d4011b89a17ea4fd414f213 |
|
09-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for ir_unop_cos.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
908afd16d1f6b5283a2535e388b6dcb77e6504d2 |
|
09-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for ir_unop_sin.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
074720477ce9de3b4dafceffd7406bcebae1a3b9 |
|
09-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for ir_unop_floor.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
c1ee30a14590d73217f7dbd35e6a1839435cc5b4 |
|
09-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for ir_unop_ceil.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
323d909ab21c9f378903e2027fcfef5ba9e890f9 |
|
09-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for ir_unop_trunc. This uses a C99 function.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
cb63929df4ce17e94e8ead0316a00d48b51944c9 |
|
09-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for ir_unop_log2. This uses a C99 function.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
aca01edc8336fd14005a7ac853e7158f31a74940 |
|
09-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for ir_unop_exp2. This uses a C99 function.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
14b7b2660c771aa090477c11f85da998ec3d2570 |
|
09-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for ir_unop_sign.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
5e840dba4412b33ae49289efd357a60098ac2611 |
|
09-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Remove bogus assert in ir_unop_abs case. abs is defined for integral types; it's even implemented.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
acf88f2769c15c9185abe5bd76a885218f431e58 |
|
07-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Fix loop increments.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
570dc0d4004bf09d257b3e4c8664d3c26a8af510 |
|
07-Jul-2010 |
Eric Anholt <eric@anholt.net> |
glsl2: Avoid null deref in scalar constant unop expressions.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
ca088cc277ce9f986693c857f3961dc0e1a4d91c |
|
07-Jul-2010 |
Ian Romanick <ian.d.romanick@intel.com> |
glsl2: Clone methods return the type of the thing being cloned This is as opposed to returning the type of the base class of the hierarchy.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
f14e596f11b4e44c75a880536efb1e8c5a72da7d |
|
07-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Declare loop counting variables in the loops. Fixes "name lookup of 'c' changed" warning.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
3f4a0b8bb0cfa36cc6f9968c8aab03f1cb0678ff |
|
06-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for dot products.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
cf80a4d177225345c2238d8e545f8ae02b41da71 |
|
06-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Add support for matrix multiplication. 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.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
37b3f9d0edb55807f822c02292348e20a8369c43 |
|
06-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Support scalar * vector and scalar * matrix. 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.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
dad35eb8b0c7378588d9dca1c1091aaede83a83f |
|
06-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Support scalar / vector and scalar / matrix. Fixes piglit tests const-vec-scalar-04.frag and const-mat-scalar-04.frag.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
97b44f040abc9cbf257aba1b7fdaa11134dcc70b |
|
06-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Support scalar - vector and scalar - matrix. Fixes piglit tests const-vec-scalar-02.frag and const-mat-scalar-02.frag.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
e74dcd7924901e5cb3d0952f46e955e15d0b3207 |
|
06-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Support scalar + vector and scalar + matrix. Fixes piglit tests const-vec-scalar-01.frag, const-vec-scalar-05.frag, and const-mat-scalar-01.frag.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
6fc983b9bb5555e2906d2680bc3cbd11c43b63f6 |
|
06-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Assert that both operands share a base type.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
6bc432e14e12c280bc53e57338bf86fbf8d26885 |
|
03-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Initialize op[0] and op[1] to NULL. This makes it easy to check if there is a second argument.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
c63a1db81f56cc2021fe1fb2411c327f720b0e09 |
|
06-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
ir_constant_expression: Initialize all components of constant data to 0. This is probably just a good idea, and will come in useful when implementing things like matrix multiplication.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
d925c9173009e9e5d48df30b30aaef22753183aa |
|
01-Jul-2010 |
Eric Anholt <eric@anholt.net> |
glsl2: Add ir_unop_fract as an expression type. Most backends will prefer seeing this to seeing (a - floor(a)), so represent it explicitly.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
16efab1c4dee6e6a827ba5f1c482378159545ae5 |
|
30-Jun-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl2: Define new ir_discard instruction.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|
29285882676388aacff123e8bdf025904abf8ea9 |
|
25-Jun-2010 |
Eric Anholt <eric@anholt.net> |
glsl2: Move the compiler to the subdirectory it will live in in Mesa.
/external/mesa3d/src/glsl/ir_constant_expression.cpp
|