compiler: use 4 instead ATOMIC_COUNTER_SIZE in glsl_types.h to avoid #include "mesa/main/config.h"

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>
This commit is contained in:
Yonggang Luo
2023-08-06 13:03:00 +08:00
committed by Marge Bot
parent 26a23a7c1f
commit 01ddb18427
2 changed files with 2 additions and 5 deletions

View 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.

View File

@@ -36,10 +36,6 @@
#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