Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | ast_node: Remove empty destructor. | Carl Worth | 2010-06-23 | 1 | -7/+0 |
| | | | | This wasn't serving any purpose. So delete it. | ||||
* | Change error/warning functions to print to the info log. | Kenneth Graunke | 2010-06-19 | 1 | -24/+20 |
| | |||||
* | Move stand-alone compiler main routine to main.cpp | Ian Romanick | 2010-06-14 | 1 | -148/+0 |
| | |||||
* | Don't call _mesa_glsl_initialize_types for every builtin function. | Kenneth Graunke | 2010-06-09 | 1 | -0/+1 |
| | | | | This was clearly wrong; types are now only initialized once. | ||||
* | Only initialize types after #extension directives have been processed. | Kenneth Graunke | 2010-06-09 | 1 | -1/+1 |
| | | | | | | | Since _mesa_glsl_initialize_types add types for various extensions, we can't call it until after processing "#extension foo : disable" lines. Fixes tex_rect_02.frag. | ||||
* | Don't process empty shaders | Ian Romanick | 2010-06-07 | 1 | -2/+3 |
| | | | | | | | Some valid shaders, such as 'precision highp float;', evaluate to empty sets of instructions. This causes some of the optimization stages to enter infinite loops. Instead, don't bother processing the empty ones. | ||||
* | ir_constant_variable: New pass to mark constant-assigned variables constant. | Eric Anholt | 2010-06-01 | 1 | -0/+1 |
| | | | | | | This removes a bunch of gratuitous moving around of constant values from constructors. Makes a shader ir I was looking at for structure handling almost readable. | ||||
* | ir_swizzle_swizzle: Reduce swizzle chains to a single swizzle. | Eric Anholt | 2010-06-01 | 1 | -0/+1 |
| | |||||
* | ir_vec_index_to_swizzle: Pass to convert indexing of vectors to swizzles. | Eric Anholt | 2010-06-01 | 1 | -0/+1 |
| | | | | | This should remove the burden of handling constant vector indexing well from backend codegen, and could help with swizzle optimizations. | ||||
* | Fix function call parameter printer to omit extraneous leading comma | Ian Romanick | 2010-05-14 | 1 | -1/+2 |
| | | | | The output of all test cases was verified to be the same using diff. | ||||
* | Convert ast_node use of simple_node to exec_list and exec_node | Ian Romanick | 2010-05-10 | 1 | -52/+29 |
| | |||||
* | Store AST function call parameters in expressions | Ian Romanick | 2010-05-10 | 1 | -10/+4 |
| | | | | | | Previously the list of function call parameters was stored as a circular list in ast_expression::subexpressions[1]. They are now stored as a regular list in ast_expression::expressions. | ||||
* | Move optimization pass prototypes to a single header. | Eric Anholt | 2010-05-05 | 1 | -9/+1 |
| | |||||
* | ir_dead_code_local: Remove redundant assignments within basic blocks. | Eric Anholt | 2010-05-05 | 1 | -0/+2 |
| | | | | | | This cleans up a bunch of junk code in some of the GLSL parser tests, and could potentially help real-world too (particularly after copy propagation has happened). | ||||
* | ir_copy_propagation: New pass to rewrite dereferences to avoid copies. | Eric Anholt | 2010-05-04 | 1 | -0/+2 |
| | | | | | This is pretty basic. Right now it only handles pure assignments -- same type on each side, no swizzling, and only within basic blocks. | ||||
* | Store warnings and errors in a parser state infolog. | Eric Anholt | 2010-05-03 | 1 | -1/+9 |
| | | | | | Cleans up compile warning about unused state in _mesa_glsl_warning. We would want infolog handling roughly like this anyway. | ||||
* | Quiet warnings about ir_shader not being handled in places it's not needed. | Eric Anholt | 2010-05-03 | 1 | -0/+1 |
| | |||||
* | IR print visitor: Move logic for printing the whole program to _mesa_print_ir | Ian Romanick | 2010-04-28 | 1 | -8/+1 |
| | |||||
* | Set language_version to 130 (the max currently supported) when reading IR. | Kenneth Graunke | 2010-04-28 | 1 | -0/+5 |
| | | | | | | | | 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. | ||||
* | Add stub ir_reader and new 'i' mode for reading IR rather than GLSL. | Kenneth Graunke | 2010-04-28 | 1 | -9/+17 |
| | |||||
* | Add parens around printed IR so it's an official list of instructions. | Kenneth Graunke | 2010-04-28 | 1 | -0/+2 |
| | |||||
* | Zero-out the entire parser state structure at initialization | Ian Romanick | 2010-04-23 | 1 | -0/+2 |
| | | | | | | | | | Among other things, this ensures that all of the extension flags are initially disabled. This causes the following tests to pass: glslparsertest/glsl2/draw_buffers-02.frag | ||||
* | Add missing 'else's to fix extension processing | Ian Romanick | 2010-04-23 | 1 | -2/+2 |
| | | | | | | | | | The missing else-statements caused all of the extensions execpt GL_ARB_texture_rectangle to be unsupported. This causes the following tests to pass: glslparsertest/glsl2/draw_buffers-04.frag | ||||
* | Remove dead code assignments and variable declarations. | Eric Anholt | 2010-04-19 | 1 | -0/+2 |
| | | | | | | | | | | | | This pass only works on assignments where the variable is never referenced. There is no code flow analysis, so it can't do a better job of avoiding redundant assignments. For now, the optimizer only does do_dead_code_unlinked(), so it won't trim the builtin variable list or initializers outside of the scope of functions. This is because we don't have the visibility into other functions that might get linked in in order to eliminate work on global variables. | ||||
* | Add an ir_if simplification pass. | Eric Anholt | 2010-04-14 | 1 | -0/+2 |
| | | | | | | | This is relatively simple at the moment, recognizing only constant values, and not (for example) values that are restricted to a range that make the branching constant. However, it does remove 59 lines from the printout of CorrectParse2.vert. | ||||
* | Repeat the optimization passes until we stop making progress. | Eric Anholt | 2010-04-08 | 1 | -4/+9 |
| | |||||
* | Inline functions consisting of a return of an expression. | Eric Anholt | 2010-04-08 | 1 | -0/+3 |
| | |||||
* | Treat texture rectangles as an extension that is enabled be default | Ian Romanick | 2010-04-07 | 1 | -0/+4 |
| | |||||
* | Add support for GL_ARB_draw_buffers extension | Ian Romanick | 2010-04-07 | 1 | -0/+9 |
| | |||||
* | Clean up error reporting in _mesa_glsl_process_extension | Ian Romanick | 2010-04-07 | 1 | -5/+12 |
| | |||||
* | Emit a warning when an unknown extension is used with #extension | Ian Romanick | 2010-04-07 | 1 | -0/+3 |
| | |||||
* | Add _mesa_glsl_warning to emit warnings to the shader log | Ian Romanick | 2010-04-07 | 1 | -0/+19 |
| | |||||
* | Begin processing #extension directive | Ian Romanick | 2010-04-07 | 1 | -0/+47 |
| | | | | Nowhere near complete. It just parses correctly at this point. | ||||
* | Add utility function to get the name of a shader target | Ian Romanick | 2010-04-07 | 1 | -0/+13 |
| | |||||
* | Begin tracking the nesting of loops and switch-statements | Ian Romanick | 2010-04-07 | 1 | -0/+1 |
| | |||||
* | Make constant folding descend into if statements. | Eric Anholt | 2010-04-06 | 1 | -4/+2 |
| | |||||
* | Add a constant folding optimization pass. | Eric Anholt | 2010-04-06 | 1 | -0/+11 |
| | |||||
* | Remove ast_node::type | Ian Romanick | 2010-04-02 | 1 | -1/+1 |
| | | | | | It isn't a type (is was enum specifying the kind of node), it was unused, and it was easily confused with actual type fields. Kill with fire. | ||||
* | Add ast_function::hir | Ian Romanick | 2010-03-31 | 1 | -0/+1 |
| | | | | | | | | | | | | | | | | | | ast_function::hir consists of bits pulled out of ast_function_definition::hir. In fact, the later uses the former to do a lot of its processing. Several class private data fields were added to ast_function to facilitate communicate between the two. This causes the following tests to pass: glslparsertest/shaders/CorrectModule.frag This causes the following tests to fail. These shaders were previously failing to compile, but they were all failing for the wrong reasons. glslparsertest/shaders/function9.frag glslparsertest/shaders/function10.frag | ||||
* | Add generate_temporary to generate an anonymous temporary | Ian Romanick | 2010-03-29 | 1 | -0/+1 |
| | |||||
* | IR print visitor: Remove most of the newlines from the printed output | Ian Romanick | 2010-03-25 | 1 | -0/+1 |
| | | | | This makes it a lot easier to read... if you have a really wide display. | ||||
* | Make the standalone parser return an exit code so we can automate testing. | Eric Anholt | 2010-03-25 | 1 | -1/+1 |
| | |||||
* | Disallow passing NULL for state to _mesa_glsl_error | Ian Romanick | 2010-03-23 | 1 | -2/+1 |
| | | | | | | 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. | ||||
* | Use glsl_symbol_table instead of using _mesa_symbol_table directly | Ian Romanick | 2010-03-19 | 1 | -3/+2 |
| | |||||
* | Factor ast_type_specifier code out to ast_type.cpp | Ian Romanick | 2010-03-15 | 1 | -77/+0 |
| | |||||
* | Track generation of errors and halt compilation appropriately | Ian Romanick | 2010-03-11 | 1 | -5/+12 |
| | |||||
* | Move top-level AST to HIR conversion to _mesa_ast_to_hir | Ian Romanick | 2010-03-10 | 1 | -3/+1 |
| | |||||
* | Require the shader target be specified to the driver program | Ian Romanick | 2010-03-10 | 1 | -2/+21 |
| | |||||
* | Use ir_print_visitor to dump IR tree | Ian Romanick | 2010-03-10 | 1 | -0/+8 |
| | |||||
* | Conver IR structures to use exec_list instead of simple_node | Ian Romanick | 2010-03-08 | 1 | -2/+1 |
| |