aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_structure_splitting.cpp
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Add ir_var_shader_storageKristian Høgsberg2015-07-141-2/+3
| | | | | | | | | | | This will be used to identify buffer variables inside shader storage buffer objects, which are very similar to uniforms except for a few differences, most important of which is that they are writable. Since buffer variables are so similar to uniforms, we will almost always want them to go through the same paths as uniforms. Reviewed-by: Jordan Justen <[email protected]>
* glsl: Use typed foreach_in_list_safe instead of foreach_list_safe.Matt Turner2014-07-011-5/+2
| | | | Reviewed-by: Ian Romanick <[email protected]>
* glsl: Use typed foreach_in_list instead of foreach_list.Matt Turner2014-07-011-4/+2
| | | | Reviewed-by: Ian Romanick <[email protected]>
* glsl: Convert piles of foreach_iter to foreach_list_safe.Kenneth Graunke2014-01-131-4/+4
| | | | | | | | | In these cases, we edit the list (or at least might be), so we use the foreach_list_safe variant. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Convert piles of foreach_iter to the newer foreach_list macro.Kenneth Graunke2014-01-131-4/+4
| | | | | | | | | | | | | foreach_iter and exec_list_iterators have been deprecated for some time now; we just hadn't ever bothered to convert code to the newer foreach_list and foreach_list_safe macros. In these cases, we aren't editing the list, so we can use foreach_list rather than foreach_list_safe. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: move variables in to ir_variable::data, part ITapani Pälli2013-12-121-2/+2
| | | | | | | | | | This patch moves following bitfields in to the data structure: used, assigned, how_declared, mode, interpolation, origin_upper_left, pixel_center_integer Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: Remove ir_print_visitor.h includes and usageEric Anholt2013-06-211-1/+0
| | | | | | | | | | | | | We have ir->print() to do the old declaration of a visitor and having the IR accept the visitor (yuck!). And now you can call _mesa_print_ir() safely anywhere that you know what an ir_instruction is. A couple of missing printf("\n")s are added in error paths -- when an expression is handed to the visitor, it doesn't print '\n' (since it might be a step in printing a whole expression tree). Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: Disable structure splitting for shader ins/outs.Paul Berry2013-01-241-1/+2
| | | | | | | | | | | | Previously, it didn't matter whether structure splitting tried to split shader ins/outs, because structs were prohibited from being used for shader ins/outs. However, GLSL 3.00 ES supports varying structs. In order for varying structs to work, we need to make sure that structure splitting doesn't get applied to them, because if it does, then the linker won't be able to match up varyings properly. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Rename variable_entry2 back to variable_entry in struct splitting.Kenneth Graunke2012-09-291-21/+17
| | | | | | | | The anonymous namespace should keep these private classes to file scope, preventing clashes with other symbols of the same name elsewhere. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Put a bunch of optimization visitors under anonymous namespaces.Eric Anholt2012-06-111-0/+4
| | | | | | | | | | | | | | | | | Because these classes are used entirely from their own source files and not from separate DSOs, the linker gets to produce massively less code. This cuts about 13k of text in the libdricore case. In the non-libdricore case, the additional linkage information allows the compiler to inline some code, so libglsl.a size actually increases by about 300 bytes. For a dricore build, improves shader_runner runtime on glsl-fs-copy-propagation-texcoords-1 by 0.21% +/- 0.03% (n=353574, outliers removed). No statistically significant difference with n=322 on glslparsertest on a yofrankie shader intended to test compiler performance. Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Remove unused member mem_ctx from ir_dead_functions_visitor.Vinson Lee2012-04-261-1/+0
| | | | | | | Fix uninitialized pointer field defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Fix up some comments in structure splitting, based on array-split work.Eric Anholt2012-04-191-3/+8
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Reduce processing of expression trees in do_structure_splitting.Eric Anholt2011-03-151-0/+6
| | | | | | Most of the time we don't have a non-uniform struct variable in the shader, so this cuts the time spent in do_structure_splitting during glean texCombine by about 2/3.
* Use C-style system headers in C++ code to avoid issues with std:: namespaceIan Romanick2011-02-211-3/+0
|
* glsl: Add using statements for standard library functions.Vinson Lee2011-02-031-0/+3
| | | | | | | | | | | | | Standard library functions in C++ are in the std namespace. When using C++-style header files for the standard library, some compilers, such as Sun Studio, provide symbols only for the std namespace and not for the global namespace. This patch adds using statements for standard library functions. Another option could have been to prepend standard library function calls with 'std::'. This patch fixes several compilation errors with Sun Studio.
* Convert everything from the talloc API to the ralloc API.Kenneth Graunke2011-01-311-8/+8
|
* glsl: Fix Doxygen tag \file in recently renamed filesChad Versace2010-11-171-1/+1
|
* glsl: Rename various ir_* files to lower_* and opt_*.Kenneth Graunke2010-11-151-0/+361
This helps distinguish between lowering passes, optimization passes, and other compiler code.