if (args.redBits > 8 || args.greenBits > 8 || args.blueBits > 8)
log << tcu::TestLog::Message << "Warning! More than 8 bits in a color channel, this may produce false negatives." << tcu::TestLog::EndMessage;
- // subpixel bits in in a valid range?
+ // subpixel bits in a valid range?
if (subPixelBits < 0)
{
tcu::Surface errorMask (surface.getWidth(), surface.getHeight());
bool result = false;
- // subpixel bits in in a valid range?
+ // subpixel bits in a valid range?
if (subPixelBits < 0)
{
tcu::clear(errorMask.getAccess(), tcu::Vec4(0.0f, 0.0f, 0.0f, 1.0f));
+ // Use these to sanity check there is something drawn when a test expects something else than an empty picture.
+ bool referenceEmpty = true;
+ bool resultEmpty = true;
+
for (int y = 0; y < surface.getHeight(); ++y)
for (int x = 0; x < surface.getWidth(); ++x)
{
const bool imageFullCoverage = compareColors(color, triangleColor, args.redBits, args.greenBits, args.blueBits);
CoverageType referenceCoverage = (CoverageType)coverageMap.getAccess().getPixelUint(x, y).x();
+ if (!imageNoCoverage)
+ resultEmpty = false;
+
switch (referenceCoverage)
{
case COVERAGE_NONE:
case COVERAGE_PARTIAL:
{
+ referenceEmpty = false;
bool foundFragment = false;
if (vulkanLinesTest == true)
{
break;
case COVERAGE_FULL:
+ referenceEmpty = false;
if (!imageFullCoverage)
{
// no coverage where there should be
if (((mode == VERIFICATIONMODE_STRICT) && (missingPixels + unexpectedPixels > 0)) ||
((mode == VERIFICATIONMODE_WEAK) && (missingPixels + unexpectedPixels > weakVerificationThreshold)) ||
((mode == VERIFICATIONMODE_WEAKER) && (missingPixels + unexpectedPixels > weakerVerificationThreshold)) ||
- ((mode == VERIFICATIONMODE_SMOOTH) && (missingPixels > weakVerificationThreshold)))
+ ((mode == VERIFICATIONMODE_SMOOTH) && (missingPixels > weakVerificationThreshold)) ||
+ referenceEmpty != resultEmpty)
{
result = false;
}