glsl: fix needs_lowering() call in varying packing pass
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 6 Apr 2022 02:47:52 +0000 (12:47 +1000)
committerMarge Bot <emma+marge@anholt.net>
Thu, 7 Apr 2022 23:57:40 +0000 (23:57 +0000)
commit7d216f296afde47513b5f7f12e6675229e4adfd4
tree8c2567423d0776673c151c1899c008fb4782b6e1
parentb3abd3db33710f90ec8b8fef8def9756e6e78505
glsl: fix needs_lowering() call in varying packing pass

Here we remove the outer arrays on geom and tess shaders where
needed. Without this the pass can sometimes attempt to pack a
varying on only one side of the shader interface where it is not
actually needed. The result can be mismatching varying types.

Fixes: d6b9202873f0 ("glsl: disable varying packing when its not safe")

Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15761>
src/compiler/glsl/lower_packed_varyings.cpp