[Piglit] [PATCH] draw-prim-rate: Fix Clang build error.

Vinson Lee vlee at freedesktop.org
Tue Jun 4 02:28:32 UTC 2019


draw-prim-rate.c:415:3: error: initializer element is not a compile-time constant
                ceil(sqrt(0.5 * 1000)),
                ^~~~~~~~~~~~~~~~~~~~~~

Fixes: 6e1bb1e769d2 ("Add a test that measures primitive rate")
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 tests/perf/draw-prim-rate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/perf/draw-prim-rate.c b/tests/perf/draw-prim-rate.c
index 85792b00ea99..c9e4e078cec9 100644
--- a/tests/perf/draw-prim-rate.c
+++ b/tests/perf/draw-prim-rate.c
@@ -410,7 +410,7 @@ piglit_display(void)
 		return PIGLIT_PASS;
 	}
 
-	static const unsigned num_quads_per_dim[] = {
+	const unsigned num_quads_per_dim[] = {
 		/* The second number is the approx. number of primitives. */
 		ceil(sqrt(0.5 * 1000)),
 		ceil(sqrt(0.5 * 2000)),
-- 
2.21.0



More information about the Piglit mailing list