f75c2d53146ea14f8dfedcc5b7a4704278ba0792 |
|
21-Sep-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Demote 'type' from ir_instruction to ir_rvalue and ir_variable. Variables have types, expression trees have types, but statements don't. Rather than have a nonsensical field that stays NULL in the base class, just move it to where it makes sense. Fix up a few places that lazily used ir_instruction even though they actually knew the particular subclass. 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_function.cpp
|
861d0a5e12b1baa31211cb8aff983b8fb9b97482 |
|
11-Nov-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Add a new matching_signature() variant that returns exact/inexact. When matching function signatures across multiple linked shaders, we often want to see if the current shader has _any_ match, but also know whether or not it was exact. (If not, we may want to keep looking.) This could be done via the existing mechanisms: sig = f->exact_matching_signature(params); if (sig != NULL) { exact = true; } else { sig = f->matching_signature(params); exact = false; } However, this requires walking the list of function signatures twice, which also means walking each signature's formal parameter lists twice. This could be rather expensive. Since matching_signature already internally knows whether a match was exact or not, we can just return it to get that information for free. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Paul Berry <stereotype441@gmail.com>
/external/mesa3d/src/glsl/ir_function.cpp
|
75a98740215d82447e5189b36d1dbfa59fcdd5db |
|
08-Aug-2011 |
Brian Paul <brianp@vmware.com> |
glsl: silence warning about trailing comma in enum list
/external/mesa3d/src/glsl/ir_function.cpp
|
5541920e0ac4ea8383c7f896daba24a304aafec6 |
|
01-Aug-2011 |
Chad Versace <chad@chad-versace.us> |
glsl: Remove duplicate comment Remove duplicate doxgen comment for ir_function.cpp:parameter_lists_match(). Signed-off-by: Chad Versace <chad@chad-versace.us>
/external/mesa3d/src/glsl/ir_function.cpp
|
5081d31a0ed753e7e23c5ed51f572d38aef66bfe |
|
27-Jul-2011 |
Chad Versace <chad@chad-versace.us> |
glsl: Clarify ir_function::matching_sigature() The function used a variable named 'score', which was an outright lie. A signature matches or it doesn't; there is no fuzzy scoring. Change the return type of parameter_lists_match() to an enum, and let ir_function::matching_sigature() switch on that enum. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Chad Versace <chad@chad-versace.us>
/external/mesa3d/src/glsl/ir_function.cpp
|
6efe1a849586e46028c1eb763175904166ec7076 |
|
27-Jul-2011 |
Chad Versace <chad@chad-versace.us> |
glsl: Remove ir_function.cpp:type_compare() The function is no longer used and has been replaced by glsl_type::can_implicitly_convert_to(). Note: This is a candidate for the 7.10 and 7.11 branches. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Chad Versace <chad@chad-versace.us>
/external/mesa3d/src/glsl/ir_function.cpp
|
8b3627fd7b52723102f070957d87f98073e92d7c |
|
27-Jul-2011 |
Chad Versace <chad@chad-versace.us> |
glsl: Fix implicit conversions in non-constructor function calls Context ------- In ast_function_expression::hir(), parameter_lists_match() checks if the function call's actual parameter list matches the signature's parameter list, where the match may require implicit conversion of some arguments. To check if an implicit conversion exists between individual arguments, type_compare() is used. Problems -------- type_compare() allowed the following illegal implicit conversions: bool -> float bvecN -> vecN int -> uint ivecN -> uvecN uint -> int uvecN -> ivecN Change ------ type_compare() is buggy, so replace it with glsl_type::can_be_implicitly_converted_to(). This comprises a rewrite of parameter_lists_match(). Fixes piglit:spec/glsl-1.20/compiler/built-in-functions/outerProduct-bvec*.vert Note: This is a candidate for the 7.10 and 7.11 branches. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Chad Versace <chad@chad-versace.us>
/external/mesa3d/src/glsl/ir_function.cpp
|
7304909d6537e00252347a10d0bae54ffd77ff91 |
|
09-Jul-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Reject ambiguous function calls (multiple inexact matches). According to the GLSL 1.20 specification, "it is a semantic error if there are multiple ways to apply [implicit] conversions [...] such that the call can be made to match multiple signatures." Fixes a regression caused by 60eb63a855cb89962f2d5bb91e238ff2d1ab8702, which implemented the wrong policy of finding a "closest" match. However, this is not a revert, since the original code failed to continue looking for an exact match once it found two inexact matches. It's OK to have multiple inexact matches if there's also an exact match. NOTE: This is a candidate for the 7.10 and 7.11 branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38971 Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/glsl/ir_function.cpp
|
b043409adfa6ffa6dc78331258de52f7fa6d59aa |
|
06-Jul-2011 |
Eric Anholt <eric@anholt.net> |
glsl: Suppress warning from matching_signature change. gcc isn't smart enough to see that we only look at matched_score after we've initialized it (because match != NULL happens at the same time)
/external/mesa3d/src/glsl/ir_function.cpp
|
60eb63a855cb89962f2d5bb91e238ff2d1ab8702 |
|
15-Jun-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Find the "closest" signature when there are multiple matches. Previously, ir_function::matching_signature had a fatal bug: if a function had more than one non-exact match, it would simply return NULL. This occured, for example, when looking for max(uvec3, uvec3): - max(vec3, vec3) -> score 1 (found first) - max(ivec3, ivec3) -> score 1 (found second...used to return NULL here) - max(uvec3, uvec3) -> score 0 (exact match...the right answer) This did not occur for max(ivec3, ivec3) since the second match found was an exact match. The new behavior is to return a match with the lowest score. If there is an exact match, that will be returned. Otherwise, a match with the least number of implicit conversions is chosen. Fixes piglit tests max-uvec3.vert and glsl-inexact-overloads.shader_test. NOTE: This is a candidate for the 7.10 and 7.11 branches. 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_function.cpp
|
819d57fce94b20fa0d34da6f037f0a53c4a5bdc2 |
|
13-Jan-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Introduce a new "const_in" variable mode. This annotation is for an "in" function parameter for which it is only legal to pass constant expressions. The only known example of this, currently, is the textureOffset functions. This should never be used for globals.
/external/mesa3d/src/glsl/ir_function.cpp
|
ee36f14fa54723f2da3cf6054f822ebf05cca247 |
|
11-Nov-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Remove GLSL_TYPE_FUNCTION define. Functions are not first class objects in GLSL, so there is never a value of function type. No code actually used this except for one function which asserted it shouldn't occur. One comment mentioned it, but was incorrect. So we may as well remove it entirely.
/external/mesa3d/src/glsl/ir_function.cpp
|
56176f00f59624ef1335175b3669081e2f3e83ed |
|
22-Aug-2010 |
Vinson Lee <vlee@vmware.com> |
glsl: Silence uninitialized variable warning. i686-apple-darwin10-gcc-4.2.1 generated the following warning. warning: 'score' may be used uninitialized in this function GCC 4.4.3 on Linux didn't generate the above warning.
/external/mesa3d/src/glsl/ir_function.cpp
|
62c4763b707e2227409f81b09dd5cf6e4410ea6a |
|
29-Jul-2010 |
Eric Anholt <eric@anholt.net> |
glsl2: Fix spelling of "sentinel."
/external/mesa3d/src/glsl/ir_function.cpp
|
7e2aa91507a5883e33473e0a94215ee3985baad1 |
|
20-Jul-2010 |
Ian Romanick <ian.d.romanick@intel.com> |
glsl2: Add and use new variable mode ir_var_temporary This is quite a large patch because breaking it into smaller pieces would result in the tree being intermitently broken. The big changes are: * Add the ir_var_temporary variable mode * Change the ir_variable constructor to take the mode as a parameter and correctly specify the mode for all ir_varables. * Change the linker to not cross validate ir_var_temporary variables. * Change the linker to pull all ir_var_temporary variables from global scope into 'main'.
/external/mesa3d/src/glsl/ir_function.cpp
|
b95897b89d36a25c237a021c299a4eb295856476 |
|
15-Jul-2010 |
Ian Romanick <ian.d.romanick@intel.com> |
glsl2: Explicitly walk lists in ir_function::parameter_lists_match Give ir_function::parameter_lists_match_exist similar treatment. Make the parameters const, and propogate the constness as far as it will trivially go.
/external/mesa3d/src/glsl/ir_function.cpp
|
11fc7beb2fa82179cfd9202449e1365b28f868a9 |
|
13-Jul-2010 |
Ian Romanick <ian.d.romanick@intel.com> |
ir_function: Make matching_signature not return const The linker needs to use this function to get specific function signatures, but it also needs to modify the returned signature. Since this method isn't itself const (i.e., const this pointer), there is no value in making a const and non-const version.
/external/mesa3d/src/glsl/ir_function.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_function.cpp
|