82065fa20ee3f2880a070f1f4f75509b910cedde |
|
21-Sep-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Remove ir_call::get_callee() and set_callee(). Previously, set_callee() performed some assertions about the type of the ir_call; protecting the bare pointer ensured these checks would be run. However, ir_call no longer has a type, so the getter and setter methods don't actually do anything useful. Remove them in favor of accessing callee directly, as is done with most other fields in our IR. 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/link_functions.cpp
|
01a851c296347d8e9d2166b3c83eab97404c0670 |
|
04-Aug-2011 |
Paul Berry <stereotype441@gmail.com> |
glsl: When linking, emit functions at the tail of the final linked program. When link_functions.cpp adds a new function to the final linked program, it needs to add it after any global variable declarations that the function refers to, otherwise the IR will be invalid (because variable declarations must occur before variable accesses). The easiest way to do that is to have the linker emit functions to the tail of the final linked program. The linker used to emit functions to the head of the final linked program, in an effort to keep callees sorted before their callers. However, this was not reliable: it didn't work for functions declared or defined in the same compilation unit as main, for diamond-shaped patterns in the call graph, or for some obscure cases involving overloaded functions. And no code currently relies on this sort order. No Piglit regressions with i965 Ironlake. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/glsl/link_functions.cpp
|
586e741ac1fa222d041990b265e820f5aa11344d |
|
28-Jul-2011 |
Ian Romanick <ian.d.romanick@intel.com> |
linker: Make linker_error set LinkStatus to false Remove the other places that set LinkStatus to false since they all immediately follow a call to linker_error. The function linker_error was previously known as linker_error_printf. The name was changed because it may seem surprising that a printf function will set an error flag. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/glsl/link_functions.cpp
|
66f4ac988d5053c9782d1390541b04f4d9c50078 |
|
29-Jun-2011 |
Ian Romanick <ian.d.romanick@intel.com> |
linker: Only over-ride built-ins when a prototype has been seen The GLSL spec says: "If a built-in function is redeclared in a shader (i.e., a prototype is visible) before a call to it, then the linker will only attempt to resolve that call within the set of shaders that are linked with it." This patch enforces this behavior. When a function call is processed a flag is set in the ir_call to indicate whether the previously seen prototype is the built-in or not. At link time a call will only bind to an instance of a function that matches the "want built-in" setting in the ir_call. This has the odd side effect that first call to abs() in the shader below will call the built-in and the second will not: float foo(float x) { return abs(x); } float abs(float x) { return -x; } float bar(float x) { return abs(x); } This seems insane, but it matches what the spec says. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31744
/external/mesa3d/src/glsl/link_functions.cpp
|
60f898a90ebd29d2593866faa1f2d6f65961a414 |
|
08-Mar-2011 |
Ian Romanick <ian.d.romanick@intel.com> |
linker: Add imported functions to the linked IR Fixes piglit test glsl-function-chain16 and bugzilla #34203. NOTE: This is a candidate for stable release branches.
/external/mesa3d/src/glsl/link_functions.cpp
|
497baf4e4a6a0a2f247c7bfb9bf69a2b93c2c19f |
|
10-Feb-2011 |
Ian Romanick <ian.d.romanick@intel.com> |
Use C-style system headers in C++ code to avoid issues with std:: namespace
/external/mesa3d/src/glsl/link_functions.cpp
|
0f4b2a0a23650d8f773c53d84cb2ead1f6d4fc8e |
|
25-Jan-2011 |
Ian Romanick <ian.d.romanick@intel.com> |
linker: Propagate max_array_access while linking functions Update the max_array_access of a global as functions that use that global are pulled into the linked shader. Fixes piglit test glsl-fs-implicit-array-size-01 and bugzilla #33219. NOTE: This is a candidate for the 7.9 and 7.10 branches.
/external/mesa3d/src/glsl/link_functions.cpp
|
e256e4743c3f8f924f0d191759d9428f33f3e329 |
|
19-Jan-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl, i965: Remove unnecessary talloc includes. These are already picked up by ir.h or glsl_types.h.
/external/mesa3d/src/glsl/link_functions.cpp
|
001eee52d461233b1e1d6ed3577965e9bcb209e8 |
|
05-Nov-2010 |
Eric Anholt <eric@anholt.net> |
glsl: Make the symbol table's add_variable just use the variable's name.
/external/mesa3d/src/glsl/link_functions.cpp
|
2619b1c96feed72444499021d8a870eab1c37e00 |
|
31-Aug-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
linker: Require an exact matching signature when looking for prototypes. Fixes piglit test glsl-override-builtin. The linker incorrectly found the prototype for the float signature, rather than adding a new prototype with the int return type. This caused ir_calls with type int to have their callees set to the float signature, triggering an assert.
/external/mesa3d/src/glsl/link_functions.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/link_functions.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/link_functions.cpp
|
31747155ea3a24190277b125bd188ac8689af719 |
|
28-Jul-2010 |
Aras Pranckevicius <aras@unity3d.com> |
glsl2: Give the path within src/mesa/ for headers instead of relying on -I.
/external/mesa3d/src/glsl/link_functions.cpp
|
5e5583ee06cff53db48151c13b21916a166ea2ed |
|
30-Jul-2010 |
Eric Anholt <eric@anholt.net> |
glsl2: Update the callee pointer of calls to newly-linked-in functions. Otherwise, ir_function_inlining will see the body of the function from the unlinked version of the shader, which won't have had the lowering passes done on it or linking's variable remapping.
/external/mesa3d/src/glsl/link_functions.cpp
|
fc9ae101b4b7a71ca7a5d4f185e887064007e0d1 |
|
16-Jul-2010 |
Ian Romanick <ian.d.romanick@intel.com> |
linker: Recursively resolve function calls in imported functions
/external/mesa3d/src/glsl/link_functions.cpp
|
532c2d30850908b75f4b0ad0aa5fa7ce88f8202d |
|
16-Jul-2010 |
Ian Romanick <ian.d.romanick@intel.com> |
linker: look up function signatures during linking instead of using callee Instead of using ir_call::callee, search for the signature in the linked shader. This will allow resolving calls from functions imported from other shaders. The ir_call::callee pointer in the imported function will still reference a signature in the original shader.
/external/mesa3d/src/glsl/link_functions.cpp
|
5adbf0bff168c088d9fd5140226b76e3ba6471b8 |
|
15-Jul-2010 |
Ian Romanick <ian.d.romanick@intel.com> |
linker: Pull find_matching_signature out of call_link_visitor The list of shaders to search needs to be provided as an explicit parameter to support coming changes. At that point there is no reason for it to be in the class. Also, fix some of the 'const' decorators.
/external/mesa3d/src/glsl/link_functions.cpp
|
8fe8a814b0c746f0f655a67f8755f9dee858d230 |
|
14-Jul-2010 |
Ian Romanick <ian.d.romanick@intel.com> |
linker: First bits of intrastage, intershader function linking This handles the easy case of linking a function in a different compilation unit that doesn't call any functions or reference any global variables.
/external/mesa3d/src/glsl/link_functions.cpp
|