summaryrefslogtreecommitdiff
path: root/src/glsl/opt_structure_splitting.cpp
AgeCommit message (Collapse)AuthorFilesLines
2013-01-24glsl: Disable structure splitting for shader ins/outs.Paul Berry1-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 <jordan.l.justen@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2012-09-29glsl: Rename variable_entry2 back to variable_entry in struct splitting.Kenneth Graunke1-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 <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
2012-06-11glsl: Put a bunch of optimization visitors under anonymous namespaces.Eric Anholt1-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 <kenneth@whitecape.org>
2012-04-26glsl: Remove unused member mem_ctx from ir_dead_functions_visitor.Vinson Lee1-1/+0
Fix uninitialized pointer field defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-04-19glsl: Fix up some comments in structure splitting, based on array-split work.Eric Anholt1-3/+8
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-03-15glsl: Reduce processing of expression trees in do_structure_splitting.Eric Anholt1-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.
2011-02-21Use C-style system headers in C++ code to avoid issues with std:: namespaceIan Romanick1-3/+0
2011-02-03glsl: Add using statements for standard library functions.Vinson Lee1-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.
2011-01-31Convert everything from the talloc API to the ralloc API.Kenneth Graunke1-8/+8
2010-11-17glsl: Fix Doxygen tag \file in recently renamed filesChad Versace1-1/+1
2010-11-15glsl: Rename various ir_* files to lower_* and opt_*.Kenneth Graunke1-0/+361
This helps distinguish between lowering passes, optimization passes, and other compiler code.