glsl: fix function inlining for images
authorTimothy Arceri <tarceri@itsqueeze.com>
Mon, 12 Dec 2022 02:06:54 +0000 (13:06 +1100)
committerMarge Bot <emma+marge@anholt.net>
Mon, 12 Dec 2022 21:28:44 +0000 (21:28 +0000)
commit9e9b8dc7f8a25c1d0ff7e8f93ea7603b08f62d36
tree4ca7716a6183a76a8eef3bb3d445a86fd1ba273d
parent92959061a92b2d82ec61fe757602cb22cb630c3d
glsl: fix function inlining for images

Here we skip replacing parameters with their actual values for
images as glsl_to_nir() expects them to be copied to temps first.
Tree grafting has a similiar rule to avoid this happening also.

Fixes: 8d10a6835f32 ("glsl: dont create temps for builtin function inputs")

Tested-by: Martin Roukala <martin.roukala@mupuf.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20274>
src/compiler/glsl/opt_function_inlining.cpp