aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/lower_vec_index_to_swizzle.cpp
Commit message (Collapse)AuthorAgeFilesLines
* glsl: pass mem_ctx to constant_expression_value(...) and friendsTimothy Arceri2017-08-111-3/+4
| | | | | | | | | | | | | | | | | | | | The main motivation for this is that threaded compilation can fall over if we were to allocate IR inside constant_expression_value() when calling it on a builtin. This is because builtins are shared across the whole OpenGL context. f81ede469910d worked around the problem by cloning the entire builtin before constant_expression_value() could be called on it. However cloning the whole function each time we referenced it lead to a significant reduction in the GLSL IR compiler performance. This change along with the following patch helps fix that performance regression. Other advantages are that we reduce the number of calls to ralloc_parent(), and for loop unrolling we free constants after they are used rather than leaving them hanging around. Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Convert lower_vec_index_to_swizzle to a rvalue visitor.Kenneth Graunke2016-04-291-83/+13
| | | | | | | | | | | | | | The old visitor missed some cases. For example, it wouldn't handle an ir_dereference_array with a vector_extract as the index. Rather than trying to add the missing cases, just rewrite it as an ir_rvalue_visitor. This makes it easy to replace any expression, and is much less code. Cc: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95164 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: move to compiler/Emil Velikov2016-01-261-0/+171
Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Jose Fonseca <[email protected]>