llvmpipe: Avoid variable size arrays.
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 22 Oct 2009 18:02:04 +0000 (19:02 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 22 Oct 2009 18:12:14 +0000 (19:12 +0100)
Not really variable size, but MSVC still doesn't like them.

src/gallium/drivers/llvmpipe/lp_test.h
src/gallium/drivers/llvmpipe/lp_test_blend.c
src/gallium/drivers/llvmpipe/lp_test_conv.c

index a88e110..21016fe 100644 (file)
@@ -56,6 +56,9 @@
 #include "lp_bld_type.h"
 
 
+#define LP_TEST_NUM_SAMPLES 32
+
+
 void
 write_tsv_header(FILE *fp);
 
index 94b661d..e3af81c 100644 (file)
@@ -477,8 +477,8 @@ test_one(unsigned verbose,
    char *error = NULL;
    blend_test_ptr_t blend_test_ptr;
    boolean success;
-   const unsigned n = 32;
-   int64_t cycles[n];
+   const unsigned n = LP_TEST_NUM_SAMPLES;
+   int64_t cycles[LP_TEST_NUM_SAMPLES];
    double cycles_avg = 0.0;
    unsigned i, j;
 
index 9dcf58e..ac2a6d0 100644 (file)
@@ -156,8 +156,8 @@ test_one(unsigned verbose,
    char *error = NULL;
    conv_test_ptr_t conv_test_ptr;
    boolean success;
-   const unsigned n = 32;
-   int64_t cycles[n];
+   const unsigned n = LP_TEST_NUM_SAMPLES;
+   int64_t cycles[LP_TEST_NUM_SAMPLES];
    double cycles_avg = 0.0;
    unsigned num_srcs;
    unsigned num_dsts;