[Mesa-dev] [PATCH 04/10] gallium/u_blitter: fix conflict with u_memory.h
Marek Olšák
maraeo at gmail.com
Mon Dec 3 16:07:13 PST 2012
---
src/gallium/auxiliary/util/u_blitter.h | 6 +++++-
src/gallium/drivers/r600/r600_pipe.c | 1 +
src/gallium/drivers/r600/r600_state_common.c | 1 +
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/gallium/auxiliary/util/u_blitter.h b/src/gallium/auxiliary/util/u_blitter.h
index b96e68e..9917540 100644
--- a/src/gallium/auxiliary/util/u_blitter.h
+++ b/src/gallium/auxiliary/util/u_blitter.h
@@ -29,10 +29,14 @@
#include "util/u_framebuffer.h"
#include "util/u_inlines.h"
-#include "util/u_memory.h"
#include "pipe/p_state.h"
+/* u_memory.h conflicts with st/mesa */
+#ifndef Elements
+#define Elements(x) (sizeof(x)/sizeof((x)[0]))
+#endif
+
#ifdef __cplusplus
extern "C" {
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index 04ddbea..4f0e232 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -27,6 +27,7 @@
#include "pipe/p_shader_tokens.h"
#include "util/u_blitter.h"
#include "util/u_format_s3tc.h"
+#include "util/u_memory.h"
#include "util/u_simple_shaders.h"
#include "util/u_upload_mgr.h"
#include "vl/vl_decoder.h"
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index 926cb1a..b132850 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -30,6 +30,7 @@
#include "util/u_draw_quad.h"
#include "util/u_index_modify.h"
+#include "util/u_memory.h"
#include "util/u_upload_mgr.h"
#include "tgsi/tgsi_parse.h"
#include <byteswap.h>
--
1.7.10.4
More information about the mesa-dev
mailing list