nir/spirv: guard macros in case of redefinition
authorErik Faye-Lund <kusmabite@gmail.com>
Fri, 18 Feb 2022 17:29:34 +0000 (18:29 +0100)
committerMarge Bot <emma+marge@anholt.net>
Mon, 21 Feb 2022 19:47:17 +0000 (19:47 +0000)
commit2cd0779f831819d58994d15da23dbe49a8b7c992
treef08620654436c18785f8e73483e4cea0f8a03003
parent694fe73976b0f2d3ec99511e1fd42a0c7d46b296
nir/spirv: guard macros in case of redefinition

On some systems, these macros are already defined, and being defined
slightly differently causes them to emit redefinition-warnings.

Let's wrap them in ifdefs to avoid the warnings.

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15084>
src/compiler/glsl/builtin_functions.cpp
src/compiler/spirv/vtn_glsl450.c