Commit Graph

23 Commits

Author SHA1 Message Date
Kenneth Graunke 5c229e5fbd glsl: Expose a public glsl_type::void_type const pointer.
This is analogous to glsl_type::int_type and all the others.
2010-12-17 10:55:17 -08:00
Kenneth Graunke 5dc74e9c77 glsl: Convert glsl_type::base_type from #define'd constants to an enum.
This is nice because printing type->base_type in GDB will now give you a
readable name instead of a number.
2010-11-15 13:33:57 -08:00
Kenneth Graunke ee36f14fa5 glsl: Remove GLSL_TYPE_FUNCTION define.
Functions are not first class objects in GLSL, so there is never a value
of function type.  No code actually used this except for one function
which asserted it shouldn't occur.  One comment mentioned it, but was
incorrect.  So we may as well remove it entirely.
2010-11-15 13:33:57 -08:00
Chad Versace fc99a3beb9 glsl: Add glsl_type::uvecN_type for N=2,3
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2010-10-11 14:25:44 -07:00
Kenneth Graunke 76deef138e glsl: Split out types that are in 1.10 but not GLSL ES 1.00. 2010-09-07 17:30:37 -07:00
Ian Romanick 4d6221f90d glsl2: Remove unused method glsl_type::generate_constructor 2010-09-01 20:39:09 -07:00
Kenneth Graunke e9c7ceed27 glsl: Use a single shared namespace in the symbol table.
As of 1.20, variable names, function names, and structure type names all
share a single namespace, and should conflict with one another in the
same scope, or hide each other in nested scopes.

However, in 1.10, variables and functions can share the same name in the
same scope.  Structure types, however, conflict with/hide both.

Fixes piglit tests redeclaration-06.vert, redeclaration-11.vert,
redeclaration-19.vert, and struct-05.vert.
2010-08-26 09:19:48 -07:00
José Fonseca 1cbcf6693a glsl: Standardize a few more uses of struct vs class keyword. 2010-08-14 15:35:57 +01:00
Kenneth Graunke ad98aa9d93 glsl2: Remove uses of deprecated TALLOC_CTX type. 2010-08-04 15:57:19 -07:00
Ian Romanick 42f3e7b6d7 glsl_type: Use string key for array type hash 2010-08-02 13:53:33 -07:00
Ian Romanick cf41c8a0d8 glsl2: Make glsl_types::ctx private again 2010-08-02 13:53:32 -07:00
Eric Anholt 85cd64ee17 glsl2: Talloc type names.
Otherwise, we end up losing structure names after compile time, and
dumping IR often ends up reporting some other mysterious string.
2010-07-27 11:14:59 -07:00
Ian Romanick f38d15b80d glsl2: glsl_type has its own talloc context, don't pass one in 2010-07-20 17:48:25 -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
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 0fd97db8b0 glsl2: Associate the GLenum for the type with builtin GLSL types. 2010-06-25 16:35:22 -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.h (Browse further)