mesa/src
Kenneth Graunke 3d051772c8 glsl: Only create one ir_function for a given name.
Piglit's spec/glsl-1.10/linker/override-builtin-{const,uniform}-05 tests
do the following:

1. Call abs(float) - a built-in function.
2. Create a user-defined replacement for abs(float).
3. Call abs(float) again - now the user function.

At step 1, we created an ir_function which included the built-in
signature, added it to the symbol table, and emitted it into the IR
stream.

Then, when processing the function definition at step 2, we'd see that
there was already an ir_function.  But, since there were no user-defined
functions, we skipped over a bunch of code, and ended up creating a
second one.  This new ir_function shadowed the original in the symbol
table, but both ended up in the IR stream.

This results in an awkward situation where searching for an ir_function
via the symbol table, a forward linked list walk, and a reverse linked
list walk may return different ir_functions.  This seems undesirable.

This patch instead re-uses the existing ir_function, putting both
built-in and user-defined signatures in the same one.  The previous
patch's additional filtering ensures everything continues working.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-08-04 15:48:06 -07:00
..
egl dri: Add a new capabilities for drivers that can't share buffers 2014-07-30 16:43:41 +01:00
gallium targets/graw-gdi: link with mesautil, not mesautils 2014-08-04 15:22:48 -06:00
gbm gbm: Log at least one dlerror() when we fail to open any drivers. 2014-07-30 22:31:30 -07:00
getopt
glsl glsl: Only create one ir_function for a given name. 2014-08-04 15:48:06 -07:00
glx glx/dri3: add GPU offloading support. 2014-07-01 13:07:52 +10:00
gtest gtest: Update to 1.7.0. 2014-04-14 00:06:53 -07:00
hgl haiku libGL: Move from gallium target to src/hgl 2014-01-06 15:50:21 -06:00
loader util: Gather some common macros 2014-08-04 11:07:10 -07:00
mapi glapi: Do not use backtrace on DragonFly. 2014-07-30 21:48:09 -07:00
mesa glsl: Make it possible to ignore built-ins when matching signatures. 2014-08-04 15:47:06 -07:00
util util: include c99_compat.h in format_srgb.h to get 'inline' definition 2014-08-04 14:06:13 -06:00
Makefile.am src/Makefile.am: Move gtest before util 2014-08-04 13:21:08 -07:00
SConscript util: Move ralloc to a new src/util directory. 2014-08-04 11:06:58 -07:00