mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 21:08:11 +02:00
main: Undefine MemoryBarrier for Windows
In winnt.h, MemoryBarrier can be defined in one of 4 ways, depending on which architecture is being targeted. - For x86, it's an inline function. - For x64, it's an object-like macro, which means that the MemoryBarrier function in the table actually ends up being called __faststorefence. - For arm and arm64, it's a function-like macro, and the preprocessor fails because the function table entry doesn't call it. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8485>
This commit is contained in:
parent
0e1447eb1b
commit
86b4f6ad43
1 changed files with 8 additions and 0 deletions
|
|
@ -36,6 +36,14 @@
|
|||
#include "menums.h"
|
||||
#include "compiler/shader_enums.h"
|
||||
|
||||
/* Windows winnt.h defines MemoryBarrier as a macro on some platforms,
|
||||
* including as a function-like macro in some cases. That either causes
|
||||
* the table entry below to have a weird name, or fail to compile.
|
||||
*/
|
||||
#ifdef MemoryBarrier
|
||||
#undef MemoryBarrier
|
||||
#endif
|
||||
|
||||
struct gl_bitmap_atlas;
|
||||
struct gl_buffer_object;
|
||||
struct gl_context;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue