summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-05-01Use %p rather than %08x when printing pointers to fix compile.Kenneth Graunke
2010-05-01Fix ir_return cloning to actually use the cloned subexpression.Kenneth Graunke
This caused a nasty bug where the function inliner would create new variables for each of the formal parameters, but the body would still reference the old copies. This was highly visible since the dead code eliminator (rightly) removed the new declarations, leading to printed IR that referenced non-existent variable names.
2010-04-30Fix incorrect comments in function inliner.Kenneth Graunke
2010-04-28Track and print user defined structure typesIan Romanick
2010-04-28IR print visitor: Move logic for printing the whole program to _mesa_print_irIan Romanick
2010-04-28IR print visitor: Just print the name of structuresIan Romanick
Treat structure types like other non-array types. We'll have to print the structure defintion elsewhere.
2010-04-28ir_function_inlining: Handle inlining of structure dereferences.Eric Anholt
2010-04-28Correctly handle remapping of array dereferences if ->var is a variable.Eric Anholt
2010-04-28Begin handling some varieties of invalid declarationsIan Romanick
2010-04-28Reject conflicting struct declarations, generate struct constructorIan Romanick
2010-04-28glsl_type::generate_constructor_prototype now generates the function tooIan Romanick
Also, change the name of the method to generate_constructor.
2010-04-28Always return a value from ast_type_specifier::hirIan Romanick
2010-04-28Support structures in glsl_type::generate_constructor_prototypeIan Romanick
2010-04-28Implement structures and arrays in ir_dereference::is_lvalueIan Romanick
2010-04-28Ensure that structure fields have non-NULL typesIan Romanick
2010-04-28Ensure that anonymous structures have non-NULL namesIan Romanick
2010-04-28Convert structure field dereferences to HIRIan Romanick
2010-04-28Add ir_dereference constructor for structure field dereferencesIan Romanick
2010-04-28Add glsl_type::field_typeIan Romanick
Query the type of a structure field
2010-04-28Begin converting structure definitions to IRIan Romanick
2010-04-28Use IDENTIFIER instead of TYPE_NAME for structure namesIan Romanick
Since there is no track of which names are structure names during parsing, TYPE_NAME cannot be produced by the lexer. Use IDENTIFIER and let the AST processor sort it out.
2010-04-28ir_reader: Slightly better error message when failing to read swizzles.Kenneth Graunke
2010-04-28ir_reader: Don't print out the S-Expression.Kenneth Graunke
It's no longer useful for debugging.
2010-04-28ir_reader: Read function calls.Kenneth Graunke
2010-04-28ir_reader: Replace function prototypes with the definition.Kenneth Graunke
Previously, we just created a new one, which was wrong.
2010-04-28ir_reader: Fix incorrect error message for expressions.Kenneth Graunke
2010-04-28Make ir_read_error print out the given S-Expression, for context.Kenneth Graunke
2010-04-28ir_reader: Fix for swizzles.Kenneth Graunke
2010-04-28ir_reader: Preliminary work toward reading functions.Kenneth Graunke
2010-04-28ir_reader: Perform a preliminary pass to scan for function prototypes.Kenneth Graunke
2010-04-28ir_reader: Don't initialize globals, builtins, or constructors.Kenneth Graunke
All of these are currently emitted as part of the IR, so by initializing them, we actually end up with two copies. For constructors, we may eventually wish to avoid emitting them as part of the IR output.
2010-04-28Make ir_read_error set state->error.Kenneth Graunke
2010-04-28ir_reader: Add support for "break" and "continue" in loops.Kenneth Graunke
Includes threading the ir_loop * context through various functions.
2010-04-28ir_reader: Add initial loop support; doesn't yet support break/continue.Kenneth Graunke
2010-04-28ir_reader: Add support for reading (var_ref ...) and (array_ref ...)Kenneth Graunke
2010-04-28ir_reader: rvalues are instructions too!Kenneth Graunke
2010-04-28ir_reader: Add support for reading conditionals: (if ...)Kenneth Graunke
2010-04-28ir_reader: Add support for reading array types.Kenneth Graunke
Also, constify glsl_type pointers; this was necessary to use glsl_type::get_array_instance.
2010-04-28ir_reader: Add support for reading (return ...)Kenneth Graunke
2010-04-28ir_reader: Add support for reading variable declarations.Kenneth Graunke
It also now reads a list of instructions, as it should, rather than a single rvalue.
2010-04-28Partial IR reader.Kenneth Graunke
Currently reads assignments, constants, expressions, and swizzles.
2010-04-28Set language_version to 130 (the max currently supported) when reading IR.Kenneth Graunke
This is necessary so _mesa_glsl_initialize_types can create appropriate glsl_types and add them to the symbol table. In the future, we'll want to set it to the max GLSL version supported by the current driver.
2010-04-28Add stub ir_reader and new 'i' mode for reading IR rather than GLSL.Kenneth Graunke
2010-04-28Add a simple S-Expression reader and printer.Kenneth Graunke
2010-04-28Use "neg" when printing/reading unary negation rather than "-".Kenneth Graunke
"-" is now only used for binary subtraction.
2010-04-28Move array of operator strings out of ir_print_visitor.cpp.Kenneth Graunke
Also implement a reverse-lookup function for use in the IR reader.
2010-04-28Factor out parameter list replacement for later reuse.Kenneth Graunke
2010-04-28Factor out parameter list matching from ast_function::hir for later reuse.Kenneth Graunke
Unfortunately, we still have two kinds of matching - one, with implicit conversions (for use in calls) and another without them (for finding a prototype to overwrite when processing a function body). This commit does not attempt to coalesce the two.
2010-04-28Factor out qualifier checking code for later reuse.Kenneth Graunke
2010-04-28ir_print_visitor: Re-parenthesize ir_call output.Kenneth Graunke