nir: fix const-cast warning on MSVC
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Thu, 3 Sep 2020 13:21:23 +0000 (15:21 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 4 Sep 2020 10:12:52 +0000 (10:12 +0000)
commitaaa492e6c6a75ff910788cadfda453ad70a15a3f
treea74cd0bb26d96a8621779308a2247831c33e7993
parent0f4d09443eba0c5a219c943940ff970f3d583f56
nir: fix const-cast warning on MSVC

We're casting pointers to const memory to const pointers. MSVC complains
about this with the following warning:

warning C4090: 'initializing': different 'const' qualifiers

In this case, we can easily use both constnesses, because all we do is
read here. So let's avoid the warning by adding another const-keyword.

Fixes: 193765e26ba ("nir/lower_goto_if: Sort blocks in select_fork")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6582>
src/compiler/nir/nir_lower_goto_ifs.c