X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=effect_chain_test.cpp;h=97b90ed5d331386cbef60725725c8a5d9a49e09b;hp=cb30d4d2e8a736c009c1381d5953fd41da4eb6e0;hb=425d68dcbdd681ad3157000360521e8f36eb6c4c;hpb=f216b7bef5a968c89f6fc78e83cc26a91e504a8a diff --git a/effect_chain_test.cpp b/effect_chain_test.cpp index cb30d4d..97b90ed 100644 --- a/effect_chain_test.cpp +++ b/effect_chain_test.cpp @@ -1319,6 +1319,9 @@ TEST(EffectChainTest, sRGBIntermediate) { << "Expected sRGB not to be able to represent 0.5 exactly (got " << out_data[1] << ")"; EXPECT_LT(fabs(out_data[1] - data[1]), 0.1f) << "Expected sRGB to be able to represent 0.5 approximately (got " << out_data[1] << ")"; + + // This state should have been preserved. + EXPECT_FALSE(glIsEnabled(GL_FRAMEBUFFER_SRGB)); } // An effect that is like IdentityEffect, but also does not require linear light. @@ -1364,8 +1367,8 @@ TEST(EffectChainTest, Linear10bitIntermediateAccuracy) { } // This maximum error is pretty bad; about 6.5 levels of a 10-bit sRGB - // framebuffer. - expect_equal(linear_data, out_data, size, 1, 7e-3, 2e-5); + // framebuffer. (Slightly more on NVIDIA cards.) + expect_equal(linear_data, out_data, size, 1, 7.5e-3, 2e-5); } TEST(EffectChainTest, SquareRoot10bitIntermediateAccuracy) { @@ -1394,7 +1397,7 @@ TEST(EffectChainTest, SquareRoot10bitIntermediateAccuracy) { // This maximum error is much better; about 0.7 levels of a 10-bit sRGB // framebuffer (ideal would be 0.5). That is an order of magnitude better // than in the linear test above. The RMS error is much better, too. - expect_equal(linear_data, out_data, size, 1, 7e-4, 5e-6); + expect_equal(linear_data, out_data, size, 1, 7.5e-4, 5e-6); } TEST(EffectChainTest, SquareRootIntermediateIsTurnedOffForNonLinearData) {