spirv: Move the emit a 'return value' store logic into own function
authorBoris Brezillon <boris.brezillon@collabora.com>
Thu, 26 Mar 2020 12:37:29 +0000 (13:37 +0100)
committerMarge Bot <eric+marge@anholt.net>
Fri, 14 Aug 2020 20:35:37 +0000 (20:35 +0000)
commit96dff31bc8f099651f4b96e9658bdb2a1c4b53cc
tree6d7839209c71c7552f8da03ed9611c2008dc10d8
parent4638de8b1b3e362b356587622b1178f2d83bc619
spirv: Move the emit a 'return value' store logic into own function

Right now, only the structured CF path emits 'return value' stores when
an SpvOpReturnValue opcode is found. Move the emit 'return value' logic
in a separate function so we can use it from the unstructured path as well.

v2 (Karol): rephrased and removed unstructured changes

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
src/compiler/spirv/vtn_cfg.c