gallium/u_blitter: fix conflict with u_memory.h
authorMarek Olšák <maraeo@gmail.com>
Mon, 3 Dec 2012 20:31:04 +0000 (21:31 +0100)
committerMarek Olšák <maraeo@gmail.com>
Fri, 7 Dec 2012 13:19:28 +0000 (14:19 +0100)
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/util/u_blitter.h
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/r600/r600_state_common.c

index b96e68e9310616dc1729b81279a5b643b8ff3292..99175409be728bcb507cac9d1a75047936ea1ea9 100644 (file)
 
 #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" {
index 04ddbeabde49272c127df0d4725b76955732cf1a..4f0e2322cb0d06fc59fded62ada83ea5c672d1b2 100644 (file)
@@ -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"
index 926cb1ae88902963d93fd480e3c789157af77b07..b132850f0c783405b1db412e3ff944c38ccc7c4c 100644 (file)
@@ -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>