nir: reuse existing psiz-variable
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Tue, 2 Jun 2020 08:44:13 +0000 (10:44 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 4 Jun 2020 09:12:54 +0000 (09:12 +0000)
commite61a98877ccdaf7ec1f9f890f0f7c1a993ee70a1
treebcaa4b78920616c40f97526514a28c1160e95c25
parent57e4d0aa1c16d3be36ccee4065c55901cb6fad43
nir: reuse existing psiz-variable

For shaders where there's already a psiz-variable, we should rather
reuse it than create a second one. This can happen if a shader writes
gl_PointSize, but disables GL_PROGRAM_POINT_SIZE.

Fixes: 878c94288a8 ("nir: add lowering-pass for point-size mov")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5328>
src/compiler/nir/nir_lower_point_size_mov.c