summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/intel
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2013-02-06 09:50:22 -0800
committerPaul Berry <[email protected]>2013-02-08 06:51:22 -0800
commita4b9678a5451465b7df8a7fd8acc1fa9c5300181 (patch)
tree078f79863aba0302e75868a29dca29fbf71a808f /src/mesa/drivers/dri/intel
parentdc92b2d11fb939cf2a0ef330559d49304086c10a (diff)
Consolidate some redundant definitions of ARRAY_SIZE() macro.
Previous to this patch, there were 13 identical definitions of this macro in Mesa source. That's ridiculous. This patch consolidates 6 of them to a single definition in src/mesa/main/macros.h. Unfortunately, I wasn't able to eliminate the remaining definitions, since they occur in places that don't include src/mesa/main/macros.h: - include/pci_ids/pci_id_driver_map.h - src/egl/drivers/dri2/egl_dri2.h - src/egl/main/egldefines.h - src/gbm/main/backend.c - src/gbm/main/gbm.c - src/glx/glxclient.h - src/mapi/mapi/stub.c I'm open to suggestions as to how to deal with the remaining redundancy. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/intel')
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.h2
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.h1
2 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h
index af49ab137c3..cae8ecf7a4f 100644
--- a/src/mesa/drivers/dri/intel/intel_context.h
+++ b/src/mesa/drivers/dri/intel/intel_context.h
@@ -348,8 +348,6 @@ extern char *__progname;
#define SUBPIXEL_X 0.125
#define SUBPIXEL_Y 0.125
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
-
/**
* Align a value down to an alignment value
*
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.h b/src/mesa/drivers/dri/intel/intel_fbo.h
index f135dead3ee..ce744bf1384 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.h
+++ b/src/mesa/drivers/dri/intel/intel_fbo.h
@@ -31,6 +31,7 @@
#include <stdbool.h>
#include <assert.h>
#include "main/formats.h"
+#include "main/macros.h"
#include "intel_context.h"
#include "intel_screen.h"