[Piglit] [PATCH 1/3] util: add ALIGN macro
Marek Olšák
maraeo at gmail.com
Sat Aug 23 09:38:16 PDT 2014
From: Marek Olšák <marek.olsak at amd.com>
---
tests/bugs/fdo10370.c | 1 +
tests/util/piglit-util.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/tests/bugs/fdo10370.c b/tests/bugs/fdo10370.c
index 95e3d56..7826543 100644
--- a/tests/bugs/fdo10370.c
+++ b/tests/bugs/fdo10370.c
@@ -15,6 +15,7 @@ PIGLIT_GL_TEST_CONFIG_END
#define BITMAP_WIDTH 1
#define BITMAP_HEIGHT 1
+#undef ALIGN
#define ALIGN 1
GLfloat read_buf[4 * BITMAP_WIDTH * BITMAP_HEIGHT];
static GLfloat r_map[] = { 0, 1 };
diff --git a/tests/util/piglit-util.h b/tests/util/piglit-util.h
index 0f112ab..2ee3d04 100644
--- a/tests/util/piglit-util.h
+++ b/tests/util/piglit-util.h
@@ -172,6 +172,7 @@ piglit_run_selected_subtests(const struct piglit_subtest *all_subtests,
#define CLAMP( X, MIN, MAX ) ( (X)<(MIN) ? (MIN) : ((X)>(MAX) ? (MAX) : (X)) )
#define MIN2(a, b) ((a) > (b) ? (b) : (a))
#define MAX2(a, b) ((a) > (b) ? (a) : (b))
+#define ALIGN(value, alignment) (((value) + alignment - 1) & ~(alignment - 1))
/**
--
1.9.1
More information about the Piglit
mailing list