summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2017-09-06 11:33:15 +0100
committerEric Engestrom <[email protected]>2017-09-08 10:29:40 +0100
commitf77d06fb28fb23b8acaf6a70ff236b040f81a8a2 (patch)
treeb526768b30de0e787d1ab26339f62dcfde6954f2
parentdb8c5ae853ea34f17ef94c5a873c0cca8231f353 (diff)
gallium/tests: use ARRAY_SIZE macro
Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r--src/gallium/tests/graw/fs-fragcoord.c4
-rw-r--r--src/gallium/tests/graw/fs-frontface.c4
-rw-r--r--src/gallium/tests/graw/fs-write-z.c4
3 files changed, 9 insertions, 3 deletions
diff --git a/src/gallium/tests/graw/fs-fragcoord.c b/src/gallium/tests/graw/fs-fragcoord.c
index cf7642c7822..9afea0caa0b 100644
--- a/src/gallium/tests/graw/fs-fragcoord.c
+++ b/src/gallium/tests/graw/fs-fragcoord.c
@@ -7,6 +7,8 @@
#include "graw_util.h"
+#include "util/macros.h"
+
static int width = 300;
static int height = 300;
@@ -44,7 +46,7 @@ static struct vertex vertices[] =
}
};
-#define NUM_VERTS (sizeof(vertices) / sizeof(vertices[0]))
+#define NUM_VERTS ARRAY_SIZE(vertices)
static void
diff --git a/src/gallium/tests/graw/fs-frontface.c b/src/gallium/tests/graw/fs-frontface.c
index 32a13cb9e2b..3ad89f6b646 100644
--- a/src/gallium/tests/graw/fs-frontface.c
+++ b/src/gallium/tests/graw/fs-frontface.c
@@ -5,6 +5,8 @@
#include "graw_util.h"
+#include "util/macros.h"
+
static int width = 300;
static int height = 300;
@@ -65,7 +67,7 @@ static struct vertex vertices[] =
},
};
-#define NUM_VERTS (sizeof(vertices) / sizeof(vertices[0]))
+#define NUM_VERTS ARRAY_SIZE(vertices)
diff --git a/src/gallium/tests/graw/fs-write-z.c b/src/gallium/tests/graw/fs-write-z.c
index 12267ed820d..196c67bc368 100644
--- a/src/gallium/tests/graw/fs-write-z.c
+++ b/src/gallium/tests/graw/fs-write-z.c
@@ -7,6 +7,8 @@
#include "graw_util.h"
+#include "util/macros.h"
+
static int width = 300;
static int height = 300;
@@ -69,7 +71,7 @@ static struct vertex vertices[] =
},
};
-#define NUM_VERTS (sizeof(vertices) / sizeof(vertices[0]))
+#define NUM_VERTS ARRAY_SIZE(vertices)