mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-19 21:00:40 +02:00
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>
This commit is contained in:
parent
694fe73976
commit
2cd0779f83
2 changed files with 12 additions and 0 deletions
|
|
@ -85,9 +85,15 @@
|
|||
#include "builtin_functions.h"
|
||||
#include "util/hash_table.h"
|
||||
|
||||
#ifndef M_PIf
|
||||
#define M_PIf ((float) M_PI)
|
||||
#endif
|
||||
#ifndef M_PI_2f
|
||||
#define M_PI_2f ((float) M_PI_2)
|
||||
#endif
|
||||
#ifndef M_PI_4f
|
||||
#define M_PI_4f ((float) M_PI_4)
|
||||
#endif
|
||||
|
||||
using namespace ir_builder;
|
||||
|
||||
|
|
|
|||
|
|
@ -32,9 +32,15 @@
|
|||
#include "vtn_private.h"
|
||||
#include "GLSL.std.450.h"
|
||||
|
||||
#ifndef M_PIf
|
||||
#define M_PIf ((float) M_PI)
|
||||
#endif
|
||||
#ifndef M_PI_2f
|
||||
#define M_PI_2f ((float) M_PI_2)
|
||||
#endif
|
||||
#ifndef M_PI_4f
|
||||
#define M_PI_4f ((float) M_PI_4)
|
||||
#endif
|
||||
|
||||
static nir_ssa_def *build_det(nir_builder *b, nir_ssa_def **col, unsigned cols);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue