diff options
author | José Fonseca <jfonseca@vmware.com> | 2009-10-22 19:02:04 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2009-10-22 19:12:14 +0100 |
commit | 9aafa1fbd247cd6d1bb0ab47bc5b318bd0d67bc5 (patch) | |
tree | ed834c9b2b5f2400325cee960000fa408d551847 | |
parent | 01b85e292352d710586344348fff5a81459e5486 (diff) |
llvmpipe: Avoid variable size arrays.
Not really variable size, but MSVC still doesn't like them.
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_test.h | 3 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_test_blend.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_test_conv.c | 4 |
3 files changed, 7 insertions, 4 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_test.h b/src/gallium/drivers/llvmpipe/lp_test.h index a88e110c66..21016fefe3 100644 --- a/src/gallium/drivers/llvmpipe/lp_test.h +++ b/src/gallium/drivers/llvmpipe/lp_test.h @@ -56,6 +56,9 @@ #include "lp_bld_type.h" +#define LP_TEST_NUM_SAMPLES 32 + + void write_tsv_header(FILE *fp); diff --git a/src/gallium/drivers/llvmpipe/lp_test_blend.c b/src/gallium/drivers/llvmpipe/lp_test_blend.c index 94b661dcba..e3af81cffb 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_blend.c +++ b/src/gallium/drivers/llvmpipe/lp_test_blend.c @@ -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; diff --git a/src/gallium/drivers/llvmpipe/lp_test_conv.c b/src/gallium/drivers/llvmpipe/lp_test_conv.c index 9dcf58e5dc..ac2a6d05e3 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_conv.c +++ b/src/gallium/drivers/llvmpipe/lp_test_conv.c @@ -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; |