compiler: use 4 instead ATOMIC_COUNTER_SIZE in glsl_types.h to avoid #include "mesa...
authorYonggang Luo <luoyonggang@gmail.com>
Sun, 6 Aug 2023 05:03:00 +0000 (13:03 +0800)
committerMarge Bot <emma+marge@anholt.net>
Thu, 24 Aug 2023 02:54:09 +0000 (02:54 +0000)
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24824>

src/compiler/glsl/glsl_parser_extras.h
src/compiler/glsl_types.h

index 061801e..8e69cfc 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <stdlib.h>
 #include "glsl_symbol_table.h"
+#include "mesa/main/config.h"
 #include "mesa/main/menums.h" /* for gl_api */
 
 /* THIS is a macro defined somewhere deep in the Windows MSVC header files.
index 8657e00..d5c0721 100644 (file)
 #include "util/macros.h"
 #include "util/simple_mtx.h"
 
-#ifdef __cplusplus
-#include "mesa/main/config.h"
-#endif
-
 struct glsl_type;
 
 #ifdef __cplusplus
@@ -1066,7 +1062,7 @@ public:
    unsigned atomic_size() const
    {
       if (is_atomic_uint())
-         return ATOMIC_COUNTER_SIZE;
+         return 4; /* ATOMIC_COUNTER_SIZE */
       else if (is_array())
          return length * fields.array->atomic_size();
       else