Skip to content

nir: fix const-cast warning on MSVC

Erik Faye-Lund requested to merge kusma/mesa:fix-const-warning-msvc into master

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: 193765e2 ("nir/lower_goto_if: Sort blocks in select_fork")

/cc @jekstrand

Edited by Erik Faye-Lund

Merge request reports