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 a88e110c6631eeaee07d6b6f148b676c6bcc9ee3..21016fefe3fa78925c191f1b79dc82d9c2029293 100644 (file)
@@ -56,6 +56,9 @@
 #include "lp_bld_type.h"
 
 
+#define LP_TEST_NUM_SAMPLES 32
+
+
 void
 write_tsv_header(FILE *fp);
 
index 94b661dcba42ce393d04bc65824c446ce3a8105d..e3af81cffb00721c2f8dc2921939a07afb4752c7 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 9dcf58e5dcde05002cbcc882defb99f466e65d6e..ac2a6d05e3264c9e71428493e3a269dcf5bb9c94 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;