Commit graph

18 commits

Author SHA1 Message Date
José Fonseca
9349379d1a Revert "glsl2: Use stdint.h instead of inttypes.h"
This reverts commit a77a6bc008.
2010-08-14 16:01:24 +01:00
Ian Romanick
a77a6bc008 glsl2: Use stdint.h instead of inttypes.h 2010-08-13 16:22:21 -07:00
Aras Pranckevicius
3adce986c4 glsl2: do not use __retval name; two underscores is reserved word according to GLSL spec (and Win7 ATI drivers do complain about that) 2010-08-09 09:08:03 -07:00
Aras Pranckevicius
58f1ffdd7c ir_function_inlining: Fix missing iter.next() in inlining sampler params.
Fixes glsl-fs-function-samplers.
2010-08-06 14:17:40 -07:00
Eric Anholt
199c441239 glsl2: Fix inlining with sampler array or struct dereferences as arguments.
Previously, we'd replace an argument of mysampler[2] with a plain
reference to mysampler by using the cloning hash table.  Instead, use
a visitor to clone whatever complicated sampler dereference into the
sampler parameter derefs in the inlined function body.
2010-08-06 00:51:08 -07:00
Eric Anholt
8273bd4687 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.
2010-08-04 12:42:47 -07:00
Aras Pranckevicius
31747155ea glsl2: Give the path within src/mesa/ for headers instead of relying on -I. 2010-08-02 10:59:46 -07:00
Eric Anholt
62c4763b70 glsl2: Fix spelling of "sentinel." 2010-07-29 14:02:19 -07:00
Eric Anholt
4285247f12 glsl2: Remove an inlined unvalued return statement.
We already have asserts that it was the last call in the function, so
it's safe to remove after it got cloned in.

Fixes:
glsl-fs-functions-4.
2010-07-29 14:02:10 -07:00
Eric Anholt
8ec0b8187e glsl2: When inlining, don't clone and assign sampler arguments.
Instead, just use the incoming sampler param.  Fixes many texture-using
piglit tests since the linker rework.
2010-07-22 13:58:32 -07:00
Kenneth Graunke
c7a18da690 glsl2: Replace insert_before/remove pairs with exec_node::replace_with. 2010-07-21 16:37:57 -07:00
Ian Romanick
7e2aa91507 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'.
2010-07-20 17:48:24 -07:00
Eric Anholt
325a49701f glsl2: Fix handling of out values in function inlining.
The parameters[i] is our inlined variables representing the
parameters, so they are always ir_var_auto.  Walk the signature params
in handling "out" values like we do for "in" values to find the mode.

Fixes (with the previous 2 commits):
glsl1-function call with in, out params
glsl1-function call with inout params
2010-07-20 16:21:07 -07:00
Eric Anholt
d2afc87445 glsl2: Check when inlining a bare function call that it actually is.
It would be easy to miss an entry either of the two visitors involved
that would result in trying to ir->remove() the call to remove it from
the instruction stream when really it's part of an expression tree
that wasn't flattened.
2010-07-12 12:02:11 -07:00
Ian Romanick
ca088cc277 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.
2010-07-06 17:44:37 -07:00
Ian Romanick
d1a1ee583e Add hash table helper functions for using pointers as hash keys 2010-07-06 15:00:46 -07:00
Eric Anholt
3d6012303c glsl2: Wrap includes of C interfaces with extern "C". 2010-06-24 17:23:19 -07:00
Eric Anholt
2928588267 glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
Renamed from ir_function_inlining.cpp (Browse further)