summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
2010-04-28ir_print_visitor: Print return type of ir_function_signatures.Kenneth Graunke
2010-04-28ir_print_visitor: Print (constant bool (1)) instead of "true"Kenneth Graunke
It might be better to simply handle "true" in the reader, but since booleans normally aren't printed as "true" or "false", we may as well go for consistency.
2010-04-28ir_print_visitor: Remove unnecessary parens around expression operands.Kenneth Graunke
2010-04-28ir_print_visitor: Remove unnecessary parens around array size in types.Kenneth Graunke
2010-04-28ir_print_visitor: Fix unclosed parenthesis in (call...Kenneth Graunke
2010-04-28ir_print_visitor: Fix unclosed parenthesis in (assign ...Kenneth Graunke
Also remove useless parens around subexpressions.
2010-04-28Add parens around printed IR so it's an official list of instructions.Kenneth Graunke
2010-04-28ir_print_visitor: Remove unnecessary parenthesis around variable names.Kenneth Graunke
2010-04-28Refactor ir_expression::get_num_operands.Kenneth Graunke
A new static version takes an ir_expression_operation enum, and the original non-static version now uses it. This will make it easier to read operations (where the ir_expression doesn't yet exist).
2010-04-28ir_print_visitor: print the type of expressions.Kenneth Graunke
This can be useful for debugging - it allows us to see that the inferred type is what we think it should be. Furthermore, it will allow the IR reader to avoid complex, operator-specific type inference.
2010-04-28ir_print_visitor: Remove unnecessary parenthesis around type names.Kenneth Graunke
Parenthesis should only be present for compound types (i.e. arrays or structures). For atomic types, simply print the symbol.
2010-04-28Print full type for ir_constant instead of base and component count.Kenneth Graunke
vec4 and mat2x2 have the same base type and number of components; printing the full type allows us to distinguish the two.
2010-04-26Implement gl_TextureMatrix built-in uniformIan Romanick
2010-04-26Make private glsl_type singletons publicIan Romanick
2010-04-26Initial implementation of #lineIan Romanick
Does not handle comments in #line or line continuation characters, but it should be good enough for now.
2010-04-23builtin_functions: Clean up compiler warning about unused name, instructions.Eric Anholt
2010-04-23De-obfuscate some of builtin_types.h.Eric Anholt
2010-04-23ir_function_inlining: Implement inlining in many more cases.Eric Anholt
We still don't inline for control flow in the inlined function, and we don't have any limits on what we will inline.
2010-04-23Put static pointers to vec[234]_types along with the static float_type.Eric Anholt
Otherwise you have to type a lot of get_instance.
2010-04-23Replace builtin_types.h generation with the generated output.Eric Anholt
The script to generate it was longer and more obfuscated than the output.