{
for (int x = 2; x < width / 2 - 2; ++x)
{
- GLubyte value = pixels[x + y * width];
- if (value < 190 || value > 194)
+ int value = pixels[x + y * width];
+ // Support 5-bit precision for the framebuffer, re-quantized to 8-bits from glReadPixels.
+ if (value < 189 || value > 197)
{
m_testCtx.getLog() << tcu::TestLog::Message << "First quad verification failed. "
<< "Wrong value read from framebuffer at " << x << "/" << y << " value: " << value
- << ", expected: <190-194>" << tcu::TestLog::EndMessage;
+ << ", expected: <189-197>" << tcu::TestLog::EndMessage;
return false;
}
}
{
for (int x = width / 2 + 2; x < width - 2; ++x)
{
- GLubyte value = pixels[x + y * width];
- if (value < 126 || value > 130)
+ int value = pixels[x + y * width];
+ // Support 5-bit precision for the framebuffer, re-quantized to 8-bits from glReadPixels.
+ if (value < 123 || value > 132)
{
m_testCtx.getLog() << tcu::TestLog::Message << "Second quad verification failed. "
<< "Wrong value read from framebuffer at " << x << "/" << y << " value: " << value
- << ", expected: <126-130>" << tcu::TestLog::EndMessage;
+ << ", expected: <123-132>" << tcu::TestLog::EndMessage;
return false;
}
}
bool ShaderAtomicCounterOpsTestBase::validateColor(tcu::Vec4 testedColor, tcu::Vec4 desiredColor)
{
- const float epsilon = 0.008f;
+ const float epsilon = 1.1f / 31.0f; // Accommodate framebuffers with 5-bit channels.
return de::abs(testedColor.x() - desiredColor.x()) < epsilon &&
de::abs(testedColor.y() - desiredColor.y()) < epsilon &&
de::abs(testedColor.z() - desiredColor.z()) < epsilon;
bool ShaderViewportLayerArrayUtils::validateColor(tcu::Vec4 renderedColor, tcu::Vec4 referenceColor)
{
- const float epsilon = 0.008f;
+ const float epsilon = 1.1f / 31.0f; // Accommodate framebuffers with 5-bit channels.
return de::abs(renderedColor.x() - referenceColor.x()) < epsilon &&
de::abs(renderedColor.y() - referenceColor.y()) < epsilon &&
de::abs(renderedColor.z() - referenceColor.z()) < epsilon &&