glsl: fix potential slow compile times for GLSLOptimizeConservatively
authorTimothy Arceri <tarceri@itsqueeze.com>
Fri, 5 Jun 2020 03:57:40 +0000 (13:57 +1000)
committerMarge Bot <eric+marge@anholt.net>
Sun, 7 Jun 2020 03:28:30 +0000 (03:28 +0000)
commite43ab7bb05857461609ed2bd43703eb272a3ebe1
treea2ce07fc7d2366a79c8fdf11642bc9cb6eecd792
parentdd81f4853c879c38987909f5e6e670b325f9f6af
glsl: fix potential slow compile times for GLSLOptimizeConservatively

See code comment for full description of the change.

Fixes: 0a5018c1a483 ("mesa: add gl_constants::GLSLOptimizeConservatively")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3034
Tested-by: Witold Baryluk <witold.baryluk@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5346>
src/compiler/glsl/glsl_parser_extras.cpp