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

Marek Olšák maraeo at gmail.com
Tue Jun 4 04:18:17 UTC 2019


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Mon, Jun 3, 2019 at 10:28 PM Vinson Lee <vlee at freedesktop.org> wrote:

> 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
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20190604/df8e08ef/attachment.html>


More information about the Piglit mailing list