Commit Graph

17 Commits

Author SHA1 Message Date
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
4a962170d7 glsl2: Add support for redeclaring layout of gl_FragCoord for ARB_fcc.
Fixes:
glsl-arb-fragment-coord-conventions
2010-07-28 15:00:09 -07:00
Eric Anholt
c3081e6273 glsl2: Set the type on cloned tex instructions. 2010-07-22 15:34:01 -07:00
Kenneth Graunke
74e1802f5d glsl2: Extend ir_constant to store constant arrays, and generate them.
Since GLSL permits arrays of structures, we need to store each element
as an ir_constant*, not just ir_constant_data.

Fixes parser tests const-array-01.frag, const-array-03.frag,
const-array-04.frag, const-array-05.frag, though 03 and 04 generate the
wrong code.
2010-07-21 16:38:33 -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
1f47245bdd glsl2: Remove the const disease from function signature's callee. 2010-07-18 18:13:06 -07:00
Ian Romanick
4e6a3e0d2d glsl2: Remove unnecessary casts of clone return values 2010-07-13 09:22:35 -07:00
Ian Romanick
13f782c4ae linker: Implement first bits of intrastage linking
This currently involves an ugly hack so that every link doesn't result
in all the built-in functions showing up as multiply defined.  As soon
as the built-in functions are stored in a separate compilation unit,
ir_function_signature::is_built_in can be removed.
2010-07-12 18:51:55 -07:00
Ian Romanick
f3235eb37f glsl2: Add utility function clone_ir_list 2010-07-12 15:19:29 -07:00
Ian Romanick
b500981226 glsl2: Implement ir_function::clone and ir_function_signature::clone 2010-07-12 15:19:29 -07:00
Ian Romanick
10d222b702 glsl2: Add missing fields in ir_variable::clone 2010-07-12 14:56:21 -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
Kenneth Graunke
16efab1c4d glsl2: Define new ir_discard instruction. 2010-06-30 14:54:58 -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