glsl_to_nir: Use a variable's constant_value if it wasn't const-propped out.
authorEmma Anholt <emma@anholt.net>
Tue, 7 Mar 2023 00:26:14 +0000 (16:26 -0800)
committerMarge Bot <emma+marge@anholt.net>
Wed, 15 Mar 2023 03:29:19 +0000 (03:29 +0000)
commit470214cb82facb6eeff7b5583ab84e63912287e1
tree46b0a0de878589ed591a0c0b4f9867b9db73fd4c
parentdccbecbef5bb216052c4796227b09f8517c8e4be
glsl_to_nir: Use a variable's constant_value if it wasn't const-propped out.

glsl has been constant-propagating out references to ir->constant_value
(the value of a variable declared as const), but we can get rid of that
whole pass if we just have glsl-to-nir hand the constant propagating
problem off to NIR.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21751>
src/compiler/glsl/glsl_to_nir.cpp