]> git.sesse.net Git - movit/commitdiff
Stop the FFTPassEffect Repeat test after FFT size 128.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 22 Mar 2014 15:12:47 +0000 (16:12 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 22 Mar 2014 15:12:47 +0000 (16:12 +0100)
The reason is that the 256 test uses texture sizes of 256*31=7936,
and above ~3900, some cards (at least both my Intel and NVidia card)
start having accuracy issues on some sizes. The test happens not to
die on this for semi-obscure reasons, but that's mostly by accident,
and in any case, requiring 8k textures for a unit test might be
a bit on the upper side.

fft_pass_effect_test.cpp

index 284aa5fd28ee815af0ea976006e3837d661cea31..7eafbd9da5bc99b875efb82576b4a8af9fade1ea 100644 (file)
@@ -126,7 +126,7 @@ TEST(FFTPassEffectTest, SingleFrequency) {
 
 TEST(FFTPassEffectTest, Repeat) {
        srand(12345);
-       for (int fft_size = 2; fft_size < 512; fft_size *= 2) {
+       for (int fft_size = 2; fft_size <= 128; fft_size *= 2) {
                const int num_repeats = 31;  // Prime, to make things more challenging.
                float data[num_repeats * fft_size * 4];
                float expected_data[num_repeats * fft_size * 4], out_data[num_repeats * fft_size * 4];