Fix some test breakage.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 13 Feb 2017 23:10:10 +0000 (00:10 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 13 Feb 2017 23:10:10 +0000 (00:10 +0100)
test_util.cpp

index fadb2d7..7956eb3 100644 (file)
@@ -227,7 +227,7 @@ void EffectChainTester::internal_run(T *out_data, T *out_data2, T *out_data3, GL
                        check_error();
                }
 
-               if (format == GL_RGBA && sizeof(*ptr) == 1) {
+               if (format == GL_RGBA && (type == GL_UNSIGNED_BYTE || type == GL_FLOAT)) {
                        vertical_flip(ptr, width * 4, height);
                } else {
                        vertical_flip(ptr, width, height);