summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-03-24Add some matrix math testsIan Romanick
2010-03-24Add glsl_type::get_instance methodIan Romanick
Gets the singleton corresponding to a particular scalar, vector, or matrix type.
2010-03-24Replace accesses to glsl_type data with query functionsIan Romanick
In these particular cases, using the query functions makes it more obvious what is happening.
2010-03-24Add class-private handles to matrix types in glsl_typeIan Romanick
2010-03-24Fix typo in swizzle processing loopIan Romanick
One of the accesses to str in the loop used str[0] instead of str[i]. Reported-by: Kenneth Graunke
2010-03-24Trivial cleanups in generate_swizzleIan Romanick
Add 'const' and 'static const' in a couple of places.
2010-03-24Use ir_dereference::set_swizzleIan Romanick
2010-03-24Add method to set the swizzle of an ir_dereferenceIan Romanick
2010-03-24Allow duplicate symbols at the same scope that are in different name spacesIan Romanick
2010-03-24Merge branch 'anholt'Ian Romanick
2010-03-24Add (negative) test for constructing samplersIan Romanick
2010-03-23ir_function constructor now takes the function name as a parameterIan Romanick
2010-03-23Add glsl_type::get_base_type queryIan Romanick
Retreives the glsl_type that corresponds to the base type of a numeric scalar / vector / matrix type. So vec4 returns float, etc.
2010-03-23Add glsl_type::is_numeric and glsl_type::is_boolean queriesIan Romanick
2010-03-23Begin processing constructorsIan Romanick
Right now, reject constructors for samplers because the are illegal.
2010-03-23Add query to determine whether a type is a samplerIan Romanick
2010-03-23Add test for invalid assignment of function return valueIan Romanick
2010-03-23Add *some* type checking for assignmentsIan Romanick
2010-03-23Disallow passing NULL for state to _mesa_glsl_errorIan Romanick
The two places that were still passing NULL had a state pointer to pass. Not passing it in these places prevented termination of compilation of erroneous programs.
2010-03-23Fix typographical errors of "FINISHME"Ian Romanick
2010-03-23Include other generated sources in BUILT_SOURCES.Eric Anholt
Otherwise, having cleaned glsl_parser.h, we'd never regenerate it because glsl_parser.cpp was already right where it needed to be.
2010-03-23Use bash for the built file generation since builtin_types.sh requires it.Eric Anholt
2010-03-23Clean the built sources with make clean.Eric Anholt
2010-03-23Generate an error for variables declared with type voidIan Romanick
2010-03-23Add is_error and is_void type queriesIan Romanick
2010-03-23Set the type of a function call to be the return type of the calleeIan Romanick
2010-03-23Set, and require, a return type for function signaturesIan Romanick
2010-03-23Add `void' type to table of available typesIan Romanick
This will make void-01.glsl test fail, so I may regret this later. However, this will make supporting functions that return void or functions that have a void parameter list easier to handle.
2010-03-23Rename test GLSL sources from .txt to .glslIan Romanick
2010-03-23Add test for declaring variables of type void.Ian Romanick
2010-03-19Track the function that is currently being definedIan Romanick
Later this will allow type checking for return statements.
2010-03-19Initial bits for converting AST return nodes to IR return instructionsIan Romanick
2010-03-19Implement IR return instructionsIan Romanick
2010-03-19Use glsl_symbol_table::name_declared_this_scopeIan Romanick
Prevent most illegal name reuse.
2010-03-19Add query to determine whether a name was declared at this scopeIan Romanick
This will be used to prevent a variable and a function with the same name from being declared. As a side effect, the calls to add_{type,name,function} should never fail.
2010-03-19Use separate namespaces for types, variables, and functionsIan Romanick
This will allow types and their constructors to be easily stored in the same symbol table. This does add a potential problem that a shader could declare a variable and a function with the same name. This appears to be forbidden by the GLSL spec.
2010-03-19Add function to determine the scope where a variable is declaredIan Romanick
2010-03-19Use glsl_symbol_table instead of using _mesa_symbol_table directlyIan Romanick
2010-03-19Add a GLSL-specific facade to _mesa_symbol_tableIan Romanick
This adds some type saftey and will enable elimination of a bunch of type casts and other ugly crap in the code.
2010-03-19Don't track new type names during pass-1 parsingIan Romanick
This implementation was wrong anyway because it did not respect scoping rules. This will need to be revisited soon. The most likely result is that the grammar is going to need some significant re-work to be able to use a IDENTIFIER in all the places where a TYPE_NAME is currently used.
2010-03-15Add multiple include protection to ir.hIan Romanick
2010-03-15Trivial clean-ups to ast_type_specifier(int) constructorIan Romanick
2010-03-15Add new constructors for ast_type_specifierIan Romanick
Add a constructor that uses an ast_struct_specifier and one that uses a type name. This saves a (trivial) bit of code, but it also ensures some of the class invariants (i.e., type_name != NULL) are met.
2010-03-15Ensure that ast_type always has type_name setIan Romanick
For built-in types, type_name would be NULL. This ensures that type_name is set even for the built-in types. This simplifies code in a few places and centralizes the name setting code.
2010-03-15Factor ast_type_specifier code out to ast_type.cppIan Romanick
2010-03-15Factor guts of function matching code out to match_function_by_nameIan Romanick
This function will be used for matching some types of constructors as well.
2010-03-15Move ast_function_expression::hir to ast_function.cppIan Romanick
2010-03-15Remove DOA hir_function.c fileIan Romanick
2010-03-11Change type of function_identifier to silence bison warningIan Romanick
When the implementation of function_call_header and function_identifier were changed a few commits ago, the types of the production changed. This just updates the types specified for the productions to match reality.
2010-03-11Add parameters to function declarations in the correct orderIan Romanick