Commit Graph

14 Commits

Author SHA1 Message Date
Ian Romanick f38d15b80d glsl2: glsl_type has its own talloc context, don't pass one in 2010-07-20 17:48:25 -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 21b0dbd799 glsl2: talloc the glsl_struct_field[] we use to look up structure types.
Since the types are singletons across the lifetime of the compiler,
repeatedly compiling a program with the same structure type defined
would drop a copy of the array on the floor per compile.

This is a bit tricky because the static GLSL types are not called with
the talloc-based new, so we have to use the global type context, which
may not be initialized yet.
2010-07-20 17:30:10 -07:00
Eric Anholt b6e92ad7da glsl2: Don't claim a match on structure types with different field names.
We regularly do lookups on the field names of the structure to find
the types within the struct, so returning a structure type with bad
names will lead to lots of error types being found.
2010-07-20 17:30:10 -07:00
Eric Anholt 288733f600 glsl2: Store the gl_type of the array's element type in the array.
Fixes glsl-fs-uniform-array-1, glsl-vs-uniform-array-1, and the -2
tests on software.
2010-07-12 14:05:20 -07:00
Ian Romanick efc15f862b glsl_type: Add _mesa_glsl_release_types to release all type related storage 2010-06-29 11:15:40 -07:00
Ian Romanick e1374d48de glsl_type: All glsl_type objects live in their own talloc context 2010-06-29 11:15:40 -07:00
Ian Romanick 72e627d02a glsl_type: Record type constructors are private 2010-06-29 11:15:39 -07:00
Ian Romanick 49e3577b91 glsl_type: Add get_record_instance method 2010-06-29 11:15:39 -07:00
Ian Romanick 31bcce04b1 glsl_type: Vector, matrix, and sampler type constructors are private 2010-06-29 11:15:39 -07:00
Ian Romanick e94642eb0d glsl_type: Make all static objects be class private 2010-06-29 11:15:39 -07:00
Ian Romanick 12681610f5 glsl_type: Remove vector and matrix constructor generators
All scalar, vector, and matrix constructors are generated in-line
during AST-to-HIR translation.  There is no longer any need to
generate function versions of the constructors.
2010-06-29 11:15:26 -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 glsl_types.cpp (Browse further)