summaryrefslogtreecommitdiff
path: root/src/glsl/glsl_types.cpp
AgeCommit message (Collapse)Author
2011-02-28glsl: Enable GL_OES_texture_3D extension for ES2.Kenneth Graunke
2011-02-21Use C-style system headers in C++ code to avoid issues with std:: namespaceIan Romanick
2011-01-31Convert everything from the talloc API to the ralloc API.Kenneth Graunke
2010-12-17glsl: Expose a public glsl_type::void_type const pointer.Kenneth Graunke
This is analogous to glsl_type::int_type and all the others.
2010-11-15glsl: Convert glsl_type::base_type from #define'd constants to an enum.Kenneth Graunke
This is nice because printing type->base_type in GDB will now give you a readable name instead of a number.
2010-09-07glsl: Split out types that are in 1.10 but not GLSL ES 1.00.Kenneth Graunke
2010-09-01glsl2: Remove unused method glsl_type::generate_constructorIan Romanick
2010-08-26glsl: Use a single shared namespace in the symbol table.Kenneth Graunke
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-23glsl: Silence unused variable warning.Vinson Lee
The variable is used but only in the body of an assert.
2010-08-24glsl: Include main/core.h.Chia-I Wu
Make glsl include only main/core.h from core mesa.
2010-08-23glsl: Rely on talloc_autofree_context() instead of trying to free on our own.Eric Anholt
Because the static types talloc their names at dlopen time, talloc_freeing the types at DRI driver screen teardown means that if the screen gets brought back up again, the names will point at freed memory. talloc_autofree_context() exists to do just what we want here: Free memory referenced across the program's lifetime so that we avoid noise in memory leak checkers. Fixes: bug #29722 (assertion failure in unigine).
2010-08-23glsl2: Include imports.h to get snprintf wrapper for MSVCIan Romanick
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-08-12glsl2: Use Elements from main/compiler.h instead of open-codingIan Romanick
2010-08-11glsl2: added casts to silence warningsBrian Paul
2010-08-09glsl2: do not use __retval name; two underscores is reserved word according ↵Aras Pranckevicius
to GLSL spec (and Win7 ATI drivers do complain about that)
2010-08-05glsl_type: Don't have two versions of a type with the same nameIan Romanick
Previously some sampler types were duplicated in GLSL 1.30 and GL_EXT_texture_array. This resulted in not being able to find the built-in sampler functions when the extension was used. When the built-in functions were compiled, they bound to the 1.30 version. This caused a type mismatch when trying to find the function. It also resulted in a confusing error message: 0:0(0): error: no matching function for call to `texture2DArray(sampler2DArray, vec3)' 0:0(0): error: candidates are: vec4 texture2DArray(sampler2DArray, vec3) 0:0(0): error: vec4 texture2DArray(sampler2DArray, vec3, float)
2010-08-04glsl2: Remove uses of deprecated TALLOC_CTX type.Kenneth Graunke
2010-08-02glsl_type: Use string key for array type hashIan Romanick
2010-08-02glsl2: Make glsl_types::ctx private againIan Romanick
2010-08-02glsl2: Give the path within src/mesa/ for headers instead of relying on -I.Aras Pranckevicius
2010-07-27glsl2: Talloc type names.Eric Anholt
Otherwise, we end up losing structure names after compile time, and dumping IR often ends up reporting some other mysterious string.
2010-07-20glsl2: glsl_type has its own talloc context, don't pass one inIan Romanick
2010-07-20glsl2: Add and use new variable mode ir_var_temporaryIan Romanick
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-20glsl2: talloc the glsl_struct_field[] we use to look up structure types.Eric Anholt
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-20glsl2: Don't claim a match on structure types with different field names.Eric Anholt
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-12glsl2: Store the gl_type of the array's element type in the array.Eric Anholt
Fixes glsl-fs-uniform-array-1, glsl-vs-uniform-array-1, and the -2 tests on software.
2010-06-29glsl_type: Add _mesa_glsl_release_types to release all type related storageIan Romanick
2010-06-29glsl_type: All glsl_type objects live in their own talloc contextIan Romanick
2010-06-29glsl_type: Record type constructors are privateIan Romanick
2010-06-29glsl_type: Add get_record_instance methodIan Romanick
2010-06-29glsl_type: Vector, matrix, and sampler type constructors are privateIan Romanick
2010-06-29glsl_type: Make all static objects be class privateIan Romanick
2010-06-29glsl_type: Remove vector and matrix constructor generatorsIan Romanick
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-24glsl2: Wrap includes of C interfaces with extern "C".Eric Anholt
2010-06-24glsl2: Move the compiler to the subdirectory it will live in in Mesa.Eric Anholt