From 223fbbe7c569feba046fc3533b9769943ed82612 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 26 Sep 2015 01:33:29 +0200 Subject: [PATCH] In ycbcr_conversion_effect_test, use a non-float framebuffer. This way, we let the card convert float-to-int, which we have reasonable control over, as opposed to glReadPixels(), which is rather unpredictable. Fixes unit test failures on Broadwell on Linux (Mesa 10.1). --- ycbcr_conversion_effect_test.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ycbcr_conversion_effect_test.cpp b/ycbcr_conversion_effect_test.cpp index aada42c..e127b4d 100644 --- a/ycbcr_conversion_effect_test.cpp +++ b/ycbcr_conversion_effect_test.cpp @@ -40,7 +40,7 @@ TEST(YCbCrConversionEffectTest, BasicInOut) { unsigned char out_data[width * height * 4]; - EffectChainTester tester(NULL, width, height); + EffectChainTester tester(NULL, width, height, FORMAT_GRAYSCALE, COLORSPACE_sRGB, GAMMA_LINEAR, GL_RGBA8); ImageFormat format; format.color_space = COLORSPACE_sRGB; @@ -96,7 +96,7 @@ TEST(YCbCrConversionEffectTest, ClampToValidRange) { unsigned char out_data[width * height * 4]; - EffectChainTester tester(NULL, width, height); + EffectChainTester tester(NULL, width, height, FORMAT_GRAYSCALE, COLORSPACE_sRGB, GAMMA_LINEAR, GL_RGBA8); ImageFormat format; format.color_space = COLORSPACE_sRGB; @@ -147,12 +147,12 @@ TEST(YCbCrConversionEffectTest, LimitedRangeToFullRange) { 255, 128, 128, 255, 76, 85, 255, 255, 150, 44, 21, 255, - 29, 255, 107, 255 + 29, 255, 108, 255 }; unsigned char out_data[width * height * 4]; - EffectChainTester tester(NULL, width, height); + EffectChainTester tester(NULL, width, height, FORMAT_GRAYSCALE, COLORSPACE_sRGB, GAMMA_LINEAR, GL_RGBA8); ImageFormat format; format.color_space = COLORSPACE_sRGB; @@ -200,7 +200,7 @@ TEST(YCbCrConversionEffectTest, PlanarOutput) { unsigned char out_y[width * height], out_cb[width * height], out_cr[width * height]; - EffectChainTester tester(NULL, width, height); + EffectChainTester tester(NULL, width, height, FORMAT_GRAYSCALE, COLORSPACE_sRGB, GAMMA_LINEAR, GL_RGBA8); ImageFormat format; format.color_space = COLORSPACE_sRGB; @@ -270,7 +270,7 @@ TEST(YCbCrConversionEffectTest, SplitLumaAndChroma) { unsigned char out_y[width * height * 4], out_cbcr[width * height * 4]; - EffectChainTester tester(NULL, width, height); + EffectChainTester tester(NULL, width, height, FORMAT_GRAYSCALE, COLORSPACE_sRGB, GAMMA_LINEAR, GL_RGBA8); ImageFormat format; format.color_space = COLORSPACE_sRGB; -- 2.39.2