1 /*-------------------------------------------------------------------------
2 * drawElements Quality Program OpenGL ES 3.0 Module
3 * -------------------------------------------------
5 * Copyright 2014 The Android Open Source Project
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
21 * \brief ASTC decompression tests
23 * \todo Parts of the block-generation code are same as in decompression
24 * code in tcuCompressedTexture.cpp ; could put them to some shared
27 * \todo Tests for void extents with nontrivial extent coordinates.
29 * \todo Better checking of the error color. Currently legitimate error
30 * pixels are just ignored in image comparison; however, spec says
31 * that error color is either magenta or all-NaNs. Can NaNs cause
32 * troubles, or can we assume that NaNs are well-supported in shader
33 * if the implementation chooses NaNs as error color?
34 *//*--------------------------------------------------------------------*/
36 #include "es3fASTCDecompressionCases.hpp"
37 #include "gluTexture.hpp"
38 #include "gluPixelTransfer.hpp"
39 #include "gluStrUtil.hpp"
40 #include "gluTextureUtil.hpp"
41 #include "glsTextureTestUtil.hpp"
42 #include "tcuCompressedTexture.hpp"
43 #include "tcuTestLog.hpp"
44 #include "tcuTextureUtil.hpp"
45 #include "tcuSurface.hpp"
46 #include "tcuVectorUtil.hpp"
47 #include "tcuImageCompare.hpp"
48 #include "deStringUtil.hpp"
49 #include "deRandom.hpp"
50 #include "deFloat16.h"
54 #include "glwFunctions.hpp"
55 #include "glwEnums.hpp"
62 using tcu::CompressedTexture;
63 using tcu::CompressedTexFormat;
71 using tcu::astc::BlockTestType;
78 using gls::TextureTestUtil::TextureRenderer;
79 using gls::TextureTestUtil::RandomViewport;
80 using namespace glu::TextureTestUtil;
87 namespace ASTCDecompressionCaseInternal
90 // Get a string describing the data of an ASTC block. Currently contains just hex and bin dumps of the block.
91 static string astcBlockDataStr (const deUint8* data)
94 result += " Hexadecimal (big endian: upper left hex digit is block bits 127 to 124):";
97 static const char* const hexDigits = "0123456789ABCDEF";
99 for (int i = tcu::astc::BLOCK_SIZE_BYTES-1; i >= 0; i--)
106 result += hexDigits[(data[i] & 0xf0) >> 4];
108 result += hexDigits[(data[i] & 0x0f) >> 0];
112 result += "\n\n Binary (big endian: upper left bit is block bit 127):";
114 for (int i = tcu::astc::BLOCK_SIZE_BYTES-1; i >= 0; i--)
121 for (int j = 8-1; j >= 0; j--)
126 result += (data[i] >> j) & 1 ? "1" : "0";
135 // Compare reference and result block images, reporting also the position of the first non-matching block.
136 static bool compareBlockImages (const Surface& reference,
137 const Surface& result,
138 const tcu::RGBA& thresholdRGBA,
139 const IVec2& blockSize,
140 int numNonDummyBlocks,
141 IVec2& firstFailedBlockCoordDst,
142 Surface& errorMaskDst,
145 TCU_CHECK_INTERNAL(reference.getWidth() == result.getWidth() && reference.getHeight() == result.getHeight());
147 const int width = result.getWidth();
148 const int height = result.getHeight();
149 const IVec4 threshold = thresholdRGBA.toIVec();
150 const int numXBlocks = width / blockSize.x();
152 DE_ASSERT(width % blockSize.x() == 0 && height % blockSize.y() == 0);
154 errorMaskDst.setSize(width, height);
156 firstFailedBlockCoordDst = IVec2(-1, -1);
157 maxDiffDst = IVec4(0);
159 for (int y = 0; y < height; y++)
160 for (int x = 0; x < width; x++)
162 const IVec2 blockCoord = IVec2(x, y) / blockSize;
164 if (blockCoord.y()*numXBlocks + blockCoord.x() < numNonDummyBlocks)
166 const IVec4 refPix = reference.getPixel(x, y).toIVec();
168 if (refPix == IVec4(255, 0, 255, 255))
170 // ASTC error color - allow anything in result.
171 errorMaskDst.setPixel(x, y, tcu::RGBA(255, 0, 255, 255));
175 const IVec4 resPix = result.getPixel(x, y).toIVec();
176 const IVec4 diff = tcu::abs(refPix - resPix);
177 const bool isOk = tcu::boolAll(tcu::lessThanEqual(diff, threshold));
179 maxDiffDst = tcu::max(maxDiffDst, diff);
181 errorMaskDst.setPixel(x, y, isOk ? tcu::RGBA::green() : tcu::RGBA::red());
183 if (!isOk && firstFailedBlockCoordDst.x() == -1)
184 firstFailedBlockCoordDst = blockCoord;
188 return boolAll(lessThanEqual(maxDiffDst, threshold));
191 enum ASTCSupportLevel
193 // \note Ordered from smallest subset to full, for convenient comparison.
194 ASTCSUPPORTLEVEL_NONE = 0,
195 ASTCSUPPORTLEVEL_LDR,
196 ASTCSUPPORTLEVEL_HDR,
197 ASTCSUPPORTLEVEL_FULL
200 static inline ASTCSupportLevel getASTCSupportLevel (const glu::ContextInfo& contextInfo, const glu::RenderContext& renderCtx)
202 const bool isES32 = glu::contextSupports(renderCtx.getType(), glu::ApiType::es(3, 2));
204 const vector<string>& extensions = contextInfo.getExtensions();
206 ASTCSupportLevel maxLevel = ASTCSUPPORTLEVEL_NONE;
208 for (int extNdx = 0; extNdx < (int)extensions.size(); extNdx++)
210 const string& ext = extensions[extNdx];
213 maxLevel = de::max(maxLevel, ext == "GL_KHR_texture_compression_astc_hdr" ? ASTCSUPPORTLEVEL_HDR
214 : ext == "GL_OES_texture_compression_astc" ? ASTCSUPPORTLEVEL_FULL
215 : ASTCSUPPORTLEVEL_LDR);
219 maxLevel = de::max(maxLevel, ext == "GL_KHR_texture_compression_astc_ldr" ? ASTCSUPPORTLEVEL_LDR
220 : ext == "GL_KHR_texture_compression_astc_hdr" ? ASTCSUPPORTLEVEL_HDR
221 : ext == "GL_OES_texture_compression_astc" ? ASTCSUPPORTLEVEL_FULL
222 : ASTCSUPPORTLEVEL_NONE);
229 // Class handling the common rendering stuff of ASTC cases.
233 ASTCRenderer2D (Context& context,
234 CompressedTexFormat format,
235 deUint32 randomSeed);
237 ~ASTCRenderer2D (void);
239 void initialize (int minRenderWidth, int minRenderHeight, const Vec4& colorScale, const Vec4& colorBias);
242 void render (Surface& referenceDst,
244 const glu::Texture2D& texture,
245 const tcu::TextureFormat& uncompressedFormat);
247 CompressedTexFormat getFormat (void) const { return m_format; }
248 IVec2 getBlockSize (void) const { return m_blockSize; }
249 ASTCSupportLevel getASTCSupport (void) const { DE_ASSERT(m_initialized); return m_astcSupport; }
253 TextureRenderer m_renderer;
255 const CompressedTexFormat m_format;
256 const IVec2 m_blockSize;
257 ASTCSupportLevel m_astcSupport;
266 } // ASTCDecompressionCaseInternal
268 using namespace ASTCDecompressionCaseInternal;
270 ASTCRenderer2D::ASTCRenderer2D (Context& context,
271 CompressedTexFormat format,
273 : m_context (context)
274 , m_renderer (context.getRenderContext(), context.getTestContext().getLog(), glu::GLSL_VERSION_300_ES, glu::PRECISION_HIGHP)
276 , m_blockSize (tcu::getBlockPixelSize(format).xy())
277 , m_astcSupport (ASTCSUPPORTLEVEL_NONE)
278 , m_colorScale (-1.0f)
279 , m_colorBias (-1.0f)
281 , m_initialized (false)
283 DE_ASSERT(tcu::getBlockPixelSize(format).z() == 1);
286 ASTCRenderer2D::~ASTCRenderer2D (void)
291 void ASTCRenderer2D::initialize (int minRenderWidth, int minRenderHeight, const Vec4& colorScale, const Vec4& colorBias)
293 DE_ASSERT(!m_initialized);
295 const tcu::RenderTarget& renderTarget = m_context.getRenderTarget();
296 TestLog& log = m_context.getTestContext().getLog();
298 m_astcSupport = getASTCSupportLevel(m_context.getContextInfo(), m_context.getRenderContext());
299 m_colorScale = colorScale;
300 m_colorBias = colorBias;
302 switch (m_astcSupport)
304 case ASTCSUPPORTLEVEL_NONE: log << TestLog::Message << "No ASTC support detected" << TestLog::EndMessage; throw tcu::NotSupportedError("ASTC not supported");
305 case ASTCSUPPORTLEVEL_LDR: log << TestLog::Message << "LDR ASTC support detected" << TestLog::EndMessage; break;
306 case ASTCSUPPORTLEVEL_HDR: log << TestLog::Message << "HDR ASTC support detected" << TestLog::EndMessage; break;
307 case ASTCSUPPORTLEVEL_FULL: log << TestLog::Message << "Full ASTC support detected" << TestLog::EndMessage; break;
312 if (renderTarget.getWidth() < minRenderWidth || renderTarget.getHeight() < minRenderHeight)
313 throw tcu::NotSupportedError("Render target must be at least " + de::toString(minRenderWidth) + "x" + de::toString(minRenderHeight));
315 log << TestLog::Message << "Using color scale and bias: result = raw * " << colorScale << " + " << colorBias << TestLog::EndMessage;
317 m_initialized = true;
320 void ASTCRenderer2D::clear (void)
325 void ASTCRenderer2D::render (Surface& referenceDst, Surface& resultDst, const glu::Texture2D& texture, const tcu::TextureFormat& uncompressedFormat)
327 DE_ASSERT(m_initialized);
329 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
330 const glu::RenderContext& renderCtx = m_context.getRenderContext();
331 const int textureWidth = texture.getRefTexture().getWidth();
332 const int textureHeight = texture.getRefTexture().getHeight();
333 const RandomViewport viewport (renderCtx.getRenderTarget(), textureWidth, textureHeight, m_rnd.getUint32());
334 ReferenceParams renderParams (TEXTURETYPE_2D);
335 vector<float> texCoord;
336 computeQuadTexCoord2D(texCoord, Vec2(0.0f, 0.0f), Vec2(1.0f, 1.0f));
338 renderParams.samplerType = getSamplerType(uncompressedFormat);
339 renderParams.sampler = Sampler(Sampler::CLAMP_TO_EDGE, Sampler::CLAMP_TO_EDGE, Sampler::CLAMP_TO_EDGE, Sampler::NEAREST, Sampler::NEAREST);
340 renderParams.colorScale = m_colorScale;
341 renderParams.colorBias = m_colorBias;
343 // Setup base viewport.
344 gl.viewport(viewport.x, viewport.y, viewport.width, viewport.height);
347 gl.activeTexture(GL_TEXTURE0);
348 gl.bindTexture(GL_TEXTURE_2D, texture.getGLTexture());
350 // Setup nearest neighbor filtering and clamp-to-edge.
351 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
352 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
353 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
354 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
356 GLU_EXPECT_NO_ERROR(gl.getError(), "Set texturing state");
359 m_renderer.renderQuad(0, &texCoord[0], renderParams);
362 // Compute reference.
363 sampleTexture(tcu::SurfaceAccess(referenceDst, renderCtx.getRenderTarget().getPixelFormat()), texture.getRefTexture(), &texCoord[0], renderParams);
365 // Read GL-rendered image.
366 glu::readPixels(renderCtx, viewport.x, viewport.y, resultDst.getAccess());
369 ASTCBlockCase2D::ASTCBlockCase2D (Context& context,
371 const char* description,
372 BlockTestType testType,
373 CompressedTexFormat format)
374 : TestCase (context, name, description)
375 , m_testType (testType)
377 , m_numBlocksTested (0)
378 , m_currentIteration (0)
379 , m_renderer (new ASTCRenderer2D(context, format, deStringHash(getName())))
381 DE_ASSERT(!(tcu::isAstcSRGBFormat(m_format) && tcu::astc::isBlockTestTypeHDROnly(m_testType))); // \note There is no HDR sRGB mode, so these would be redundant.
384 ASTCBlockCase2D::~ASTCBlockCase2D (void)
386 ASTCBlockCase2D::deinit();
389 void ASTCBlockCase2D::init (void)
391 m_renderer->initialize(64, 64, tcu::astc::getBlockTestTypeColorScale(m_testType), tcu::astc::getBlockTestTypeColorBias(m_testType));
393 generateBlockCaseTestData(m_blockData, m_format, m_testType);
394 DE_ASSERT(!m_blockData.empty());
395 DE_ASSERT(m_blockData.size() % tcu::astc::BLOCK_SIZE_BYTES == 0);
397 m_testCtx.getLog() << TestLog::Message << "Total " << m_blockData.size() / tcu::astc::BLOCK_SIZE_BYTES << " blocks to test" << TestLog::EndMessage
398 << TestLog::Message << "Note: Legitimate ASTC error pixels will be ignored when comparing to reference" << TestLog::EndMessage;
401 void ASTCBlockCase2D::deinit (void)
407 ASTCBlockCase2D::IterateResult ASTCBlockCase2D::iterate (void)
409 TestLog& log = m_testCtx.getLog();
411 if (m_renderer->getASTCSupport() == ASTCSUPPORTLEVEL_LDR && tcu::astc::isBlockTestTypeHDROnly(m_testType))
413 log << TestLog::Message << "Passing the case immediately, since only LDR support was detected and test only contains HDR blocks" << TestLog::EndMessage;
414 m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
418 const IVec2 blockSize = m_renderer->getBlockSize();
419 const int totalNumBlocks = (int)m_blockData.size() / tcu::astc::BLOCK_SIZE_BYTES;
420 const int numXBlocksPerImage = de::min(m_context.getRenderTarget().getWidth(), 512) / blockSize.x();
421 const int numYBlocksPerImage = de::min(m_context.getRenderTarget().getHeight(), 512) / blockSize.y();
422 const int numBlocksPerImage = numXBlocksPerImage * numYBlocksPerImage;
423 const int imageWidth = numXBlocksPerImage * blockSize.x();
424 const int imageHeight = numYBlocksPerImage * blockSize.y();
425 const int numBlocksRemaining = totalNumBlocks - m_numBlocksTested;
426 const int curNumNonDummyBlocks = de::min(numBlocksPerImage, numBlocksRemaining);
427 const int curNumDummyBlocks = numBlocksPerImage - curNumNonDummyBlocks;
428 const glu::RenderContext& renderCtx = m_context.getRenderContext();
429 const tcu::RGBA threshold = renderCtx.getRenderTarget().getPixelFormat().getColorThreshold() + (tcu::isAstcSRGBFormat(m_format) ? tcu::RGBA(2,2,2,2) : tcu::RGBA(1,1,1,1));
430 tcu::CompressedTexture compressed (m_format, imageWidth, imageHeight);
432 if (m_currentIteration == 0)
434 log << TestLog::Message << "Using texture of size "
435 << imageWidth << "x" << imageHeight
436 << ", with " << numXBlocksPerImage << " block columns and " << numYBlocksPerImage << " block rows "
437 << ", with block size " << blockSize.x() << "x" << blockSize.y()
438 << TestLog::EndMessage;
441 DE_ASSERT(compressed.getDataSize() == numBlocksPerImage*tcu::astc::BLOCK_SIZE_BYTES);
442 deMemcpy(compressed.getData(), &m_blockData[m_numBlocksTested*tcu::astc::BLOCK_SIZE_BYTES], curNumNonDummyBlocks*tcu::astc::BLOCK_SIZE_BYTES);
443 if (curNumDummyBlocks > 1)
444 tcu::astc::generateDummyVoidExtentBlocks((deUint8*)compressed.getData() + curNumNonDummyBlocks*tcu::astc::BLOCK_SIZE_BYTES, curNumDummyBlocks);
446 // Create texture and render.
448 const tcu::TexDecompressionParams::AstcMode decompressionMode = (m_renderer->getASTCSupport() == ASTCSUPPORTLEVEL_LDR || tcu::isAstcSRGBFormat(m_format))
449 ? tcu::TexDecompressionParams::ASTCMODE_LDR
450 : tcu::TexDecompressionParams::ASTCMODE_HDR;
451 glu::Texture2D texture (renderCtx, m_context.getContextInfo(), 1, &compressed, tcu::TexDecompressionParams(decompressionMode));
452 Surface renderedFrame (imageWidth, imageHeight);
453 Surface referenceFrame (imageWidth, imageHeight);
455 m_renderer->render(referenceFrame, renderedFrame, texture, getUncompressedFormat(compressed.getFormat()));
458 // \note Since a case can draw quite many images, only log the first iteration and failures.
462 IVec2 firstFailedBlockCoord;
464 const bool compareOk = compareBlockImages(referenceFrame, renderedFrame, threshold, blockSize, curNumNonDummyBlocks, firstFailedBlockCoord, errorMask, maxDiff);
466 if (m_currentIteration == 0 || !compareOk)
468 const char* const imageSetName = "ComparisonResult";
469 const char* const imageSetDesc = "Comparison Result";
472 tcu::ScopedLogSection section(log, "Iteration " + de::toString(m_currentIteration),
473 "Blocks " + de::toString(m_numBlocksTested) + " to " + de::toString(m_numBlocksTested + curNumNonDummyBlocks - 1));
475 if (curNumDummyBlocks > 0)
476 log << TestLog::Message << "Note: Only the first " << curNumNonDummyBlocks << " blocks in the image are relevant; rest " << curNumDummyBlocks << " are dummies and not checked" << TestLog::EndMessage;
480 log << TestLog::Message << "Image comparison failed: max difference = " << maxDiff << ", threshold = " << threshold << TestLog::EndMessage
481 << TestLog::ImageSet(imageSetName, imageSetDesc)
482 << TestLog::Image("Result", "Result", renderedFrame)
483 << TestLog::Image("Reference", "Reference", referenceFrame)
484 << TestLog::Image("ErrorMask", "Error mask", errorMask)
485 << TestLog::EndImageSet;
487 const int blockNdx = m_numBlocksTested + firstFailedBlockCoord.y()*numXBlocksPerImage + firstFailedBlockCoord.x();
488 DE_ASSERT(blockNdx < totalNumBlocks);
490 log << TestLog::Message << "First failed block at column " << firstFailedBlockCoord.x() << " and row " << firstFailedBlockCoord.y() << TestLog::EndMessage
491 << TestLog::Message << "Data of first failed block:\n" << astcBlockDataStr(&m_blockData[blockNdx*tcu::astc::BLOCK_SIZE_BYTES]) << TestLog::EndMessage;
493 m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Image comparison failed");
498 log << TestLog::ImageSet(imageSetName, imageSetDesc)
499 << TestLog::Image("Result", "Result", renderedFrame)
500 << TestLog::EndImageSet;
504 if (m_numBlocksTested + curNumNonDummyBlocks < totalNumBlocks)
505 log << TestLog::Message << "Note: not logging further images unless reference comparison fails" << TestLog::EndMessage;
509 m_currentIteration++;
510 m_numBlocksTested += curNumNonDummyBlocks;
512 if (m_numBlocksTested >= totalNumBlocks)
514 DE_ASSERT(m_numBlocksTested == totalNumBlocks);
515 m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
524 ASTCBlockSizeRemainderCase2D::ASTCBlockSizeRemainderCase2D (Context& context,
526 const char* description,
527 CompressedTexFormat format)
528 : TestCase (context, name, description)
530 , m_currentIteration (0)
531 , m_renderer (new ASTCRenderer2D(context, format, deStringHash(getName())))
535 ASTCBlockSizeRemainderCase2D::~ASTCBlockSizeRemainderCase2D (void)
537 ASTCBlockSizeRemainderCase2D::deinit();
540 void ASTCBlockSizeRemainderCase2D::init (void)
542 const IVec2 blockSize = m_renderer->getBlockSize();
543 m_renderer->initialize(MAX_NUM_BLOCKS_X*blockSize.x(), MAX_NUM_BLOCKS_Y*blockSize.y(), Vec4(1.0f), Vec4(0.0f));
546 void ASTCBlockSizeRemainderCase2D::deinit (void)
551 ASTCBlockSizeRemainderCase2D::IterateResult ASTCBlockSizeRemainderCase2D::iterate (void)
553 TestLog& log = m_testCtx.getLog();
554 const IVec2 blockSize = m_renderer->getBlockSize();
555 const int curRemainderX = m_currentIteration % blockSize.x();
556 const int curRemainderY = m_currentIteration / blockSize.x();
557 const int imageWidth = (MAX_NUM_BLOCKS_X-1)*blockSize.x() + curRemainderX;
558 const int imageHeight = (MAX_NUM_BLOCKS_Y-1)*blockSize.y() + curRemainderY;
559 const int numBlocksX = deDivRoundUp32(imageWidth, blockSize.x());
560 const int numBlocksY = deDivRoundUp32(imageHeight, blockSize.y());
561 const int totalNumBlocks = numBlocksX * numBlocksY;
562 const glu::RenderContext& renderCtx = m_context.getRenderContext();
563 const tcu::RGBA threshold = renderCtx.getRenderTarget().getPixelFormat().getColorThreshold() + (tcu::isAstcSRGBFormat(m_format) ? tcu::RGBA(2,2,2,2) : tcu::RGBA(1,1,1,1));
564 tcu::CompressedTexture compressed (m_format, imageWidth, imageHeight);
566 DE_ASSERT(compressed.getDataSize() == totalNumBlocks*tcu::astc::BLOCK_SIZE_BYTES);
567 tcu::astc::generateDummyNormalBlocks((deUint8*)compressed.getData(), totalNumBlocks, blockSize.x(), blockSize.y());
569 // Create texture and render.
571 const tcu::TexDecompressionParams::AstcMode decompressionMode = (m_renderer->getASTCSupport() == ASTCSUPPORTLEVEL_LDR || tcu::isAstcSRGBFormat(m_format))
572 ? tcu::TexDecompressionParams::ASTCMODE_LDR
573 : tcu::TexDecompressionParams::ASTCMODE_HDR;
574 Surface renderedFrame (imageWidth, imageHeight);
575 Surface referenceFrame (imageWidth, imageHeight);
576 glu::Texture2D texture (renderCtx, m_context.getContextInfo(), 1, &compressed, tcu::TexDecompressionParams(decompressionMode));
578 m_renderer->render(referenceFrame, renderedFrame, texture, getUncompressedFormat(compressed.getFormat()));
583 tcu::ScopedLogSection section(log, "Iteration " + de::toString(m_currentIteration),
584 "Remainder " + de::toString(curRemainderX) + "x" + de::toString(curRemainderY));
586 log << TestLog::Message << "Using texture of size "
587 << imageWidth << "x" << imageHeight
588 << " and block size "
589 << blockSize.x() << "x" << blockSize.y()
590 << "; the x and y remainders are "
591 << curRemainderX << " and " << curRemainderY << " respectively"
592 << TestLog::EndMessage;
594 const bool compareOk = tcu::pixelThresholdCompare(m_testCtx.getLog(), "ComparisonResult", "Comparison Result", referenceFrame, renderedFrame, threshold,
595 m_currentIteration == 0 ? tcu::COMPARE_LOG_RESULT : tcu::COMPARE_LOG_ON_ERROR);
599 m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Image comparison failed");
604 if (m_currentIteration == 0 && m_currentIteration+1 < blockSize.x()*blockSize.y())
605 log << TestLog::Message << "Note: not logging further images unless reference comparison fails" << TestLog::EndMessage;
607 m_currentIteration++;
609 if (m_currentIteration >= blockSize.x()*blockSize.y())
611 DE_ASSERT(m_currentIteration == blockSize.x()*blockSize.y());
612 m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");