Lines Matching defs:const
129 const char* viewClassToName (ViewClass viewClass)
167 const char* targetToName (deUint32 target)
225 const tcu::TextureChannelClass channelClass = tcu::getTextureChannelClass(glu::mapGLInternalFormat(format).type);
263 RandomizedRenderGrid (const IVec2& targetSize, const IVec2& cellSize, int maxCellCount, deUint32 seed);
265 IVec2 getOrigin (void) const;
267 const IVec2& getCellSize (void) const { return m_cellSize; }
268 IVec4 getUsedAreaBoundingBox (void) const;
269 int getCellCount (void) const { return m_cellCount; }
274 const IVec2 m_targetSize;
275 const IVec2 m_cellSize;
276 const IVec2 m_grid;
278 const int m_cellCount;
279 const IVec2 m_baseRandomOffset;
282 RandomizedRenderGrid::RandomizedRenderGrid (const IVec2& targetSize, const IVec2& cellSize, int maxCellCount, deUint32 seed)
325 IVec2 RandomizedRenderGrid::getOrigin (void) const
327 const int gridX = (m_currentCell - 1) % m_grid.x();
328 const int gridY = (m_currentCell - 1) / m_grid.x();
329 const IVec2 currentOrigin = (IVec2(gridX, gridY) * m_cellSize) + m_baseRandomOffset;
337 IVec4 RandomizedRenderGrid::getUsedAreaBoundingBox (void) const
339 const IVec2 lastCell (de::min(m_currentCell + 1, m_grid.x()), ((m_currentCell + m_grid.x() - 1) / m_grid.x()));
340 const IVec2 size = lastCell * m_cellSize;
348 ImageInfo (deUint32 format, deUint32 target, const IVec3& size);
350 deUint32 getFormat (void) const { return m_format; }
351 deUint32 getTarget (void) const { return m_target; }
352 const IVec3& getSize (void) const { return m_size; }
360 ImageInfo::ImageInfo (deUint32 format, deUint32 target, const IVec3& size)
370 SeedBuilder& operator<< (SeedBuilder& builder, const ImageInfo& info)
376 const glu::ObjectTraits& getObjectTraits (const ImageInfo& info)
384 int getLevelCount (const ImageInfo& info)
386 const deUint32 target = info.getTarget();
387 const IVec3 size = info.getSize();
393 const int maxSize = de::max(size.x(), size.y());
399 const int maxSize = de::max(size.x(), de::max(size.y(), size.z()));
405 IVec3 getLevelSize (deUint32 target, const IVec3& baseSize, int level)
427 const deUint32 cubeFaces[] =
446 TextureImageIterator (const ImageInfo info, int levelCount);
451 bool hasNextImage (void) const { return (m_currentLevel < (m_levelCount - 1)) || m_currentImage < (m_levelImageCount - 1); }
453 int getMipLevel (void) const { return m_currentLevel; }
454 int getMipLevelCount (void) const { return m_levelCount; }
455 int getCurrentImage (void) const { return m_currentImage;}
456 int getLevelImageCount (void) const { return m_levelImageCount; }
457 IVec2 getSize (void) const { return m_levelSize.toWidth<2>(); } // Assume that image sizes never grow over iteration
458 deUint32 getTarget (void) const { return m_info.getTarget(); }
462 const ImageInfo m_info;
466 const int m_levelCount;
469 TextureImageIterator::TextureImageIterator (const ImageInfo info, int levelCount)
543 void computeQuadTexCoords(vector<float>& texCoord, const TextureImageIterator& iteration)
545 const int currentImage = iteration.getCurrentImage();
554 const float r = (float(currentImage) + 0.5f) / (float)iteration.getLevelImageCount();
674 void genTexel (de::Random& rng, deUint32 glFormat, int texelBlockSize, const int texelCount, deUint8* buffer)
678 const tcu::TextureFormat format = glu::mapGLInternalFormat(glFormat);
679 const tcu::PixelBufferAccess access (format, texelCount, 1, 1, buffer);
680 const tcu::TextureFormatInfo info = tcu::getTextureFormatInfo(format);
684 const float red = rng.getFloat(info.valueMin.x(), info.valueMax.x());
685 const float green = rng.getFloat(info.valueMin.y(), info.valueMax.y());
686 const float blue = rng.getFloat(info.valueMin.z(), info.valueMax.z());
687 const float alpha = rng.getFloat(info.valueMin.w(), info.valueMax.w());
689 const Vec4 color (red, green, blue, alpha);
696 const tcu::CompressedTexFormat compressedFormat = glu::mapGLCompressedTexFormat(glFormat);
700 const int BLOCK_SIZE = 16;
701 const deUint8 blocks[][BLOCK_SIZE] =
718 const int blockNdx = rng.getInt(0, DE_LENGTH_OF_ARRAY(blocks)-1);
727 const deUint8 val = rng.getUint8();
737 const deUint8 val = rng.getUint8();
744 IVec3 divRoundUp (const IVec3& a, const IVec3& b)
759 void genericTexImage (const glw::Functions& gl,
763 const IVec3& size,
766 const void* data)
768 const deUint32 glTarget = (target == GL_TEXTURE_CUBE_MAP ? mapFaceNdxToFace(faceNdx) : target);
793 const deUint32 glFormat = getFormatForInternalFormat(format);
794 const deUint32 glType = getTypeForInternalFormat(format);
815 void genTextureImage (const glw::Functions& gl,
819 const ImageInfo& info,
822 const int texelBlockSize = getTexelBlockSize(info.getFormat());
823 const IVec3 texelBlockPixelSize = getTexelBlockPixelSize(info.getFormat());
837 const int faceCount = (info.getTarget() == GL_TEXTURE_CUBE_MAP ? 6 : 1);
839 const IVec3 levelPixelSize = getLevelSize(info.getTarget(), info.getSize(), levelNdx);
840 const IVec3 levelTexelBlockSize = divRoundUp(levelPixelSize, texelBlockPixelSize);
841 const int levelTexelBlockCount = levelTexelBlockSize.x() * levelTexelBlockSize.y() * levelTexelBlockSize.z();
842 const int levelSize = levelTexelBlockCount * texelBlockSize;
868 void genRenderbufferImage (const glw::Functions& gl,
872 const ImageInfo& info,
875 const IVec3 size = info.getSize();
876 const tcu::TextureFormat format = glu::mapGLInternalFormat(info.getFormat());
909 const deInt32 fill = rng.getBool() ? 0xFF : 0x0;
917 const tcu::ConstPixelBufferAccess texelAccess (format, 1, 1, 1, &(texelBlock[0]));
921 const tcu::IVec4 color = texelAccess.getPixelInt(0, 0, 0);
923 gl.clearBufferiv(GL_COLOR, 0, (const deInt32*)&color);
931 const tcu::IVec4 color = texelAccess.getPixelInt(0, 0, 0);
933 gl.clearBufferuiv(GL_COLOR, 0, (const deUint32*)&color);
941 const tcu::Vec4 rawColor = texelAccess.getPixel(0, 0, 0);
942 const tcu::Vec4 linearColor = (tcu::isSRGB(format) ? tcu::sRGBToLinear(rawColor) : rawColor);
951 gl.clearBufferfv(GL_COLOR, 0, (const float*)&linearColor);
971 void genImage (const glw::Functions& gl,
975 const ImageInfo& info,
984 IVec3 getTexelBlockStride (const ImageInfo& info, int level)
986 const IVec3 size = getLevelSize(info.getTarget(), info.getSize(), level);
987 const int texelBlockSize = getTexelBlockSize(info.getFormat());
988 const IVec3 texelBlockPixelSize = getTexelBlockPixelSize(info.getFormat());
989 const IVec3 textureTexelBlockSize = divRoundUp(size, texelBlockPixelSize);
994 int sumComponents (const IVec3& v)
1005 const ImageInfo& dstImageInfo,
1007 const IVec3& dstPos,
1009 const vector<ArrayBuffer<deUint8> >& srcImageData,
1010 const ImageInfo& srcImageInfo,
1012 const IVec3& srcPos,
1014 const IVec3& copySize)
1016 const ArrayBuffer<deUint8>& srcLevelData = srcImageData[srcLevel];
1019 const IVec3 srcTexelBlockPixelSize = getTexelBlockPixelSize(srcImageInfo.getFormat());
1020 const int srcTexelBlockSize = getTexelBlockSize(srcImageInfo.getFormat());
1021 const IVec3 srcTexelPos = srcPos / srcTexelBlockPixelSize;
1022 const IVec3 srcTexelBlockStride = getTexelBlockStride(srcImageInfo, srcLevel);
1024 const IVec3 dstTexelBlockPixelSize = getTexelBlockPixelSize(dstImageInfo.getFormat());
1025 const int dstTexelBlockSize = getTexelBlockSize(dstImageInfo.getFormat());
1026 const IVec3 dstTexelPos = dstPos / dstTexelBlockPixelSize;
1027 const IVec3 dstTexelBlockStride = getTexelBlockStride(dstImageInfo, dstLevel);
1029 const IVec3 copyTexelBlockCount = copySize / srcTexelBlockPixelSize;
1030 const int texelBlockSize = srcTexelBlockSize;
1046 const IVec3 blockPos (0, y, z);
1047 const deUint8* const srcPtr = srcLevelData.getElementPtr(sumComponents((srcTexelPos + blockPos) * srcTexelBlockStride));
1048 deUint8* const dstPtr = dstLevelData.getElementPtr(sumComponents((dstTexelPos + blockPos) * dstTexelBlockStride));
1049 const int copyLineSize = copyTexelBlockCount.x() * texelBlockSize;
1055 vector<tcu::ConstPixelBufferAccess> getLevelAccesses (const vector<ArrayBuffer<deUint8> >& data, const ImageInfo& info)
1057 const tcu::TextureFormat format = glu::mapGLInternalFormat(info.getFormat());
1058 const IVec3 size = info.getSize();
1066 const IVec3 levelSize = getLevelSize(info.getTarget(), size, level);
1074 vector<tcu::ConstPixelBufferAccess> getCubeLevelAccesses (const vector<ArrayBuffer<deUint8> >& data,
1075 const ImageInfo& info,
1078 const tcu::TextureFormat format = glu::mapGLInternalFormat(info.getFormat());
1079 const IVec3 size = info.getSize();
1080 const int texelBlockSize = getTexelBlockSize(info.getFormat());
1081 const IVec3 texelBlockPixelSize = getTexelBlockPixelSize(info.getFormat());
1089 const IVec3 levelPixelSize = getLevelSize(info.getTarget(), size, level);
1090 const IVec3 levelTexelBlockSize = divRoundUp(levelPixelSize, texelBlockPixelSize);
1091 const int levelTexelBlockCount = levelTexelBlockSize.x() * levelTexelBlockSize.y() * levelTexelBlockSize.z();
1092 const int levelSize = levelTexelBlockCount * texelBlockSize;
1100 void copyImage (const glw::Functions& gl,
1104 const ImageInfo& dstImageInfo,
1106 const IVec3& dstPos,
1109 const vector<ArrayBuffer<deUint8> >& srcImageData,
1110 const ImageInfo& srcImageInfo,
1112 const IVec3& srcPos,
1114 const IVec3& copySize)
1132 const TextureView& refTexture,
1133 const Verify verify,
1137 const tcu::RenderTarget& renderTarget = renderContext.getRenderTarget();
1138 const tcu::RGBA threshold = renderTarget.getPixelFormat().getColorThreshold() + tcu::RGBA(1,1,1,1);
1139 const glw::Functions& gl = renderContext.getFunctions();
1140 const IVec2 renderTargetSize = IVec2(renderTarget.getWidth(), renderTarget.getHeight());
1146 const int imagesOnLevel = imageIterator.getLevelImageCount();
1147 const int imageEstimate = (imageIterator.getMipLevelCount() - imageIterator.getMipLevel()) * imagesOnLevel;
1157 const int level = imageIterator.getMipLevel();
1158 const IVec2 levelSize = imageIterator.getSize();
1159 const IVec2 origin = renderGrid.getOrigin();
1181 const int target = imageIterator.getTarget();
1182 const int imageIndex = imageIterator.getCurrentImage();
1198 const IVec4 boundingBox = renderGrid.getUsedAreaBoundingBox();
1206 const CellContents& cell (cellContents[idx]);
1207 const IVec2 cellOrigin = cell.origin - boundingBox.toWidth<2>();
1208 const tcu::ConstPixelBufferAccess resultAccess = getSubregion(renderedFrame.getAccess(), cellOrigin.x(), cellOrigin.y(), cell.reference.getWidth(), cell.reference.getHeight());
1228 const ImageInfo& info,
1229 const tcu::Texture2DView& refTexture,
1233 const glw::Functions& gl = renderContext.getFunctions();
1234 const tcu::TextureFormat format = refTexture.getLevel(0).getFormat();
1235 const tcu::TextureFormatInfo spec = tcu::getTextureFormatInfo(format);
1261 void decompressTextureLevel (const tcu::TexDecompressionParams& params,
1264 const tcu::CompressedTexFormat& compressedFormat,
1265 const tcu::TextureFormat& decompressedFormat,
1266 const IVec3& levelPixelSize,
1267 const void* data)
1272 tcu::decompress(levelAccess, compressedFormat, (const deUint8*)data, params);
1278 const ImageInfo& info,
1279 const vector<ArrayBuffer<deUint8> >& data)
1281 const tcu::CompressedTexFormat compressedFormat = glu::mapGLCompressedTexFormat(info.getFormat());
1282 const tcu::TextureFormat decompressedFormat = tcu::getUncompressedFormat(compressedFormat);
1283 const IVec3 size = info.getSize();
1284 const bool isES32 = glu::contextSupports(renderContext.getType(), glu::ApiType::es(3, 2));
1304 const IVec3 levelPixelSize = getLevelSize(info.getTarget(), size, level);
1318 const vector<ArrayBuffer<deUint8> >& data,
1319 const ImageInfo& info,
1330 const tcu::Texture2DView refTexture((int)levelAccesses.size(), &(levelAccesses[0]));
1337 const vector<tcu::ConstPixelBufferAccess> levelAccesses = getLevelAccesses(data, info);
1338 const tcu::Texture2DView refTexture ((int)levelAccesses.size(), &(levelAccesses[0]));
1350 const ImageInfo& info,
1351 const tcu::Texture3DView& refTexture,
1355 const glw::Functions& gl = renderContext.getFunctions();
1356 const tcu::TextureFormat format = refTexture.getLevel(0).getFormat();
1357 const tcu::TextureFormatInfo spec = tcu::getTextureFormatInfo(format);
1390 const vector<ArrayBuffer<deUint8> >& data,
1391 const ImageInfo& info,
1402 const tcu::Texture3DView refTexture((int)levelAccesses.size(), &(levelAccesses[0]));
1409 const vector<tcu::ConstPixelBufferAccess> levelAccesses = getLevelAccesses(data, info);
1410 const tcu::Texture3DView refTexture ((int)levelAccesses.size(), &(levelAccesses[0]));
1422 const ImageInfo& info,
1423 const tcu::TextureCubeView& refTexture,
1427 const glw::Functions& gl = renderContext.getFunctions();
1428 const tcu::TextureFormat format = refTexture.getLevelFace(0, tcu::CUBEFACE_POSITIVE_X).getFormat();
1429 const tcu::TextureFormatInfo spec = tcu::getTextureFormatInfo(format);
1462 const vector<ArrayBuffer<deUint8> >& data,
1463 const ImageInfo& info,
1468 const tcu::CompressedTexFormat& compressedFormat = glu::mapGLCompressedTexFormat(info.getFormat());
1469 const tcu::TextureFormat& decompressedFormat = tcu::getUncompressedFormat(compressedFormat);
1471 const int texelBlockSize = getTexelBlockSize(info.getFormat());
1472 const IVec3 texelBlockPixelSize = getTexelBlockPixelSize(info.getFormat());
1474 const bool isES32 = glu::contextSupports(renderContext.getType(), glu::ApiType::es(3, 2));
1501 const IVec3 levelPixelSize = getLevelSize(info.getTarget(), info.getSize(), level);
1502 const IVec3 levelTexelBlockSize = divRoundUp(levelPixelSize, texelBlockPixelSize);
1503 const int levelTexelBlockCount = levelTexelBlockSize.x() * levelTexelBlockSize.y() * levelTexelBlockSize.z();
1504 const int levelSize = levelTexelBlockCount * texelBlockSize;
1506 const deUint8* dataPtr = data[level].getElementPtr(faceNdx * levelSize);
1514 const tcu::ConstPixelBufferAccess* levels[6];
1520 const tcu::TextureCubeView refTexture(getLevelCount(info), levels);
1527 const vector<tcu::ConstPixelBufferAccess> levelAccesses[6] =
1537 const tcu::ConstPixelBufferAccess* levels[6];
1543 const tcu::TextureCubeView refTexture(getLevelCount(info), levels);
1556 const ImageInfo& info,
1557 const tcu::Texture2DArrayView& refTexture,
1561 const glw::Functions& gl = renderContext.getFunctions();
1562 const tcu::TextureFormat format = refTexture.getLevel(0).getFormat();
1563 const tcu::TextureFormatInfo spec = tcu::getTextureFormatInfo(format);
1595 const vector<ArrayBuffer<deUint8> >& data,
1596 const ImageInfo& info,
1607 const tcu::Texture2DArrayView refTexture((int)levelAccesses.size(), &(levelAccesses[0]));
1614 const vector<tcu::ConstPixelBufferAccess> levelAccesses = getLevelAccesses(data, info);
1615 const tcu::Texture2DArrayView refTexture ((int)levelAccesses.size(), &(levelAccesses[0]));
1621 tcu::TextureFormat getReadPixelFormat (const tcu::TextureFormat& format)
1642 Vec4 calculateThreshold (const tcu::TextureFormat& sourceFormat, const tcu::TextureFormat& readPixelsFormat)
1654 const tcu::IVec4 srcBits = tcu::getTextureFormatBitDepth(sourceFormat);
1655 const tcu::IVec4 readBits = tcu::getTextureFormatBitDepth(readPixelsFormat);
1656 const tcu::IVec4 minBits = tcu::min(srcBits, readBits);
1670 const vector<ArrayBuffer<deUint8> >& data,
1671 const ImageInfo& info,
1674 const glw::Functions& gl = renderContext.getFunctions();
1677 const tcu::TextureFormat format = glu::mapGLInternalFormat(info.getFormat());
1678 const IVec3 size = info.getSize();
1679 const tcu::ConstPixelBufferAccess refRenderbuffer (format, size.x(), size.y(), 1, data[0].getPtr());
1680 const tcu::TextureFormat readPixelsFormat = getReadPixelFormat(format);
1708 const tcu::UVec4 threshold (2, 2, 2, 2);
1717 const tcu::UVec4 threshold (1, 1, 1, 1);
1726 const Vec4 threshold = calculateThreshold(format, readPixelsFormat);
1742 const vector<ArrayBuffer<deUint8> >& data,
1743 const ImageInfo& info,
1774 const ImageInfo& imageInfo)
1783 const ImageInfo& srcImageInfo,
1784 const ImageInfo& dstImageInfo)
1805 const ImageInfo& srcImage,
1806 const ImageInfo& dstImage,
1807 const char* name,
1808 const char* description);
1832 Iteration (int methodCount_, const IterationFunc* methods_)
1839 const IterationFunc* methods;
1871 const ImageInfo m_srcImageInfo;
1872 const ImageInfo m_dstImageInfo;
1879 const ImageInfo& srcImage,
1880 const ImageInfo& dstImage,
1881 const char* name,
1882 const char* description)
1899 const bool isES32 = glu::contextSupports(ctx.getType(), glu::ApiType::es(3, 2));
1928 const bool isES32orGL45 = glu::contextSupports(rc.getType(), glu::ApiType::es(3, 2)) ||
1965 const glw::Functions& gl = renderContext.getFunctions();
1966 const deUint32 moreRestrictiveFormat = getMoreRestrictiveFormat(m_srcImageInfo.getFormat(), m_dstImageInfo.getFormat());
2010 const tcu::ScopedLogSection sourceSection (log, "Source image verify.", "Source image verify.");
2025 const tcu::ScopedLogSection destinationSection (log, "Destination image verify.", "Destination image verify.");
2040 const tcu::ScopedLogSection sourceSection (log, "Source image verify.", "Source image verify.");
2055 const tcu::ScopedLogSection destinationSection (log, "Destination image verify.", "Destination image verify.");
2069 Copy (const IVec3& srcPos_,
2072 const IVec3& dstPos_,
2075 const IVec3& size_,
2076 const IVec3& dstSize_)
2096 int getLastFullLevel (const ImageInfo& info)
2098 const int levelCount = getLevelCount(info);
2099 const IVec3 blockPixelSize = getTexelBlockPixelSize(info.getFormat());
2103 const IVec3 levelSize = getLevelSize(info.getTarget(), info.getSize(), level);
2112 void generateCopies (vector<Copy>& copies, const ImageInfo& srcInfo, const ImageInfo& dstInfo)
2114 const deUint32 srcTarget = srcInfo.getTarget();
2115 const deUint32 dstTarget = dstInfo.getTarget();
2117 const bool srcIsTexture = isTextureTarget(srcInfo.getTarget());
2118 const bool dstIsTexture = isTextureTarget(dstInfo.getTarget());
2120 const bool srcIsCube = srcTarget == GL_TEXTURE_CUBE_MAP;
2121 const bool dstIsCube = dstTarget == GL_TEXTURE_CUBE_MAP;
2123 const IVec3 srcBlockPixelSize = getTexelBlockPixelSize(srcInfo.getFormat());
2124 const IVec3 dstBlockPixelSize = getTexelBlockPixelSize(dstInfo.getFormat());
2126 const int levels[] =
2133 const int srcLevel = (srcIsTexture ? (levels[levelNdx] >= 0 ? levels[levelNdx] : getLastFullLevel(srcInfo)) : 0);
2134 const int dstLevel = (dstIsTexture ? (levels[levelNdx] >= 0 ? levels[levelNdx] : getLastFullLevel(dstInfo)) : 0);
2136 const IVec3 srcSize = getLevelSize(srcInfo.getTarget(), srcInfo.getSize(), srcLevel);
2137 const IVec3 dstSize = getLevelSize(dstInfo.getTarget(), dstInfo.getSize(), dstLevel);
2140 const IVec3 srcCompleteBlockSize = IVec3(srcSize.x() / srcBlockPixelSize.x(), srcSize.y() / srcBlockPixelSize.y(), (srcIsCube ? 6 : srcSize.z() / srcBlockPixelSize.z()));
2141 const IVec3 dstCompleteBlockSize = IVec3(dstSize.x() / dstBlockPixelSize.x(), dstSize.y() / dstBlockPixelSize.y(), (dstIsCube ? 6 : dstSize.z() / dstBlockPixelSize.z()));
2143 const IVec3 maxCopyBlockSize = tcu::min(srcCompleteBlockSize, dstCompleteBlockSize);
2146 const int copyBlockWidth = de::max((2 * (maxCopyBlockSize.x() / 4)) - 1, 1);
2147 const int copyBlockHeight = de::max((2 * (maxCopyBlockSize.y() / 4)) - 1, 1);
2148 const int copyBlockDepth = de::max((2 * (maxCopyBlockSize.z() / 4)) - 1, 1);
2152 const IVec3 copyBlockSize (copyBlockWidth, copyBlockHeight, copyBlockDepth);
2153 const IVec3 srcBlockPos (srcCompleteBlockSize - copyBlockSize);
2154 const IVec3 dstBlockPos (0, 0, 0);
2156 const IVec3 srcPos (srcBlockPos * srcBlockPixelSize);
2157 const IVec3 dstPos (dstBlockPos * dstBlockPixelSize);
2158 const IVec3 srcCopySize (copyBlockSize * srcBlockPixelSize);
2159 const IVec3 dstCopySize (copyBlockSize * dstBlockPixelSize);
2166 const IVec3 copyBlockSize (copyBlockWidth, copyBlockHeight, copyBlockDepth);
2167 const IVec3 srcBlockPos (0, 0, 0);
2168 const IVec3 dstBlockPos (dstCompleteBlockSize - copyBlockSize);
2170 const IVec3 srcPos (srcBlockPos * srcBlockPixelSize);
2171 const IVec3 dstPos (dstBlockPos * dstBlockPixelSize);
2172 const IVec3 srcCopySize (copyBlockSize * srcBlockPixelSize);
2173 const IVec3 dstCopySize (copyBlockSize * dstBlockPixelSize);
2180 const IVec3 copyBlockSize (copyBlockWidth, copyBlockHeight, copyBlockDepth);
2181 const IVec3 srcBlockPos (tcu::max((srcCompleteBlockSize / 4) * 4 - copyBlockSize, IVec3(0)));
2182 const IVec3 dstBlockPos (tcu::max((dstCompleteBlockSize / 4) * 4 - copyBlockSize, IVec3(0)));
2184 const IVec3 srcPos (srcBlockPos * srcBlockPixelSize);
2185 const IVec3 dstPos (dstBlockPos * dstBlockPixelSize);
2186 const IVec3 srcCopySize (copyBlockSize * srcBlockPixelSize);
2187 const IVec3 dstCopySize (copyBlockSize * dstBlockPixelSize);
2197 const glw::Functions& gl = m_context.getRenderContext().getFunctions();
2209 const Copy& copy = copies[copyNdx];
2235 const IterationFunc iteration1[] =
2241 const IterationFunc iteration2[] =
2245 const IterationFunc iteration3[] =
2250 const IterationFunc iteration4[] =
2255 const IterationFunc iteration5[] =
2261 const IterationFunc iteration6[] =
2266 const Iteration iterations[] =
2302 CopyImageTests (const CopyImageTests& other);
2303 CopyImageTests& operator= (const CopyImageTests& other);
2336 IVec3 getTestedSize (deUint32 target, deUint32 format, const IVec3& targetSize)
2338 const IVec3 texelBlockPixelSize = getTexelBlockPixelSize(format);
2339 const bool isCube = target == GL_TEXTURE_CUBE_MAP;
2340 const bool is3D = target == GL_TEXTURE_3D || target == GL_TEXTURE_2D_ARRAY;
2344 const int multiplier = smallestCommonMultiple(texelBlockPixelSize.x(), texelBlockPixelSize.y());
2345 const int size = (1 + (targetSize.x() / multiplier)) * multiplier;
2355 const int width = (1 + targetSize.x() / texelBlockPixelSize.x()) * texelBlockPixelSize.x();
2356 const int height = ((targetSize.y() / texelBlockPixelSize.y()) - 1) * texelBlockPixelSize.y();
2364 const string groupName = string(formatToName(srcFormat)) + "_" + formatToName(dstFormat);
2365 TestCaseGroup* const group = new TestCaseGroup(root->getContext(), groupName.c_str(), groupName.c_str());
2367 const deUint32 targets[] =
2380 const deUint32 srcTarget = targets[srcTargetNdx];
2381 const bool srcIs3D = srcTarget == GL_TEXTURE_2D_ARRAY || srcTarget == GL_TEXTURE_3D;
2394 const deUint32 dstTarget = targets[dstTargetNdx];
2395 const bool dstIs3D = dstTarget == GL_TEXTURE_2D_ARRAY || dstTarget == GL_TEXTURE_3D;
2406 const string targetTestName = string(targetToName(srcTarget)) + "_to_" + targetToName(dstTarget);
2409 const bool isCompressedCase = glu::isCompressedFormat(srcFormat) || glu::isCompressedFormat(dstFormat);
2410 const IVec3 targetSize = isCompressedCase ? IVec3(128, 128, 16) : IVec3(64, 64, 8);
2411 const IVec3 srcSize = getTestedSize(srcTarget, srcFormat, targetSize);
2412 const IVec3 dstSize = getTestedSize(dstTarget, dstFormat, targetSize);
2663 TestCaseGroup* const nonCompressedGroup = new TestCaseGroup(m_context, "non_compressed", "Test copying between textures.");
2667 const vector<deUint32>& formats = viewClassIter->second;
2668 const ViewClass viewClass = viewClassIter->first;
2669 TestCaseGroup* const viewGroup = new TestCaseGroup(m_context, viewClassToName(viewClass), viewClassToName(viewClass));
2676 const deUint32 srcFormat = formats[srcFormatNdx];
2677 const deUint32 dstFormat = formats[dstFormatNdx];
2690 TestCaseGroup* const compressedGroup = new TestCaseGroup(m_context, "compressed", "Test copying between compressed textures.");
2695 const vector<deUint32>& formats = viewClassIter->second;
2696 const ViewClass viewClass = viewClassIter->first;
2697 TestCaseGroup* const viewGroup = new TestCaseGroup(m_context, viewClassToName(viewClass), viewClassToName(viewClass));
2704 const deUint32 srcFormat = formats[srcFormatNdx];
2705 const deUint32 dstFormat = formats[dstFormatNdx];
2718 TestCaseGroup* const mixedGroup = new TestCaseGroup(m_context, "mixed", "Test copying between compressed and non-compressed textures.");
2724 const ViewClass viewClass = iter->first;
2725 const string viewClassName = string(viewClassToName(viewClass)) + "_mixed";
2726 TestCaseGroup* const viewGroup = new TestCaseGroup(m_context, viewClassName.c_str(), viewClassName.c_str());
2728 const vector<deUint32> nonCompressedFormats = iter->second.first;
2729 const vector<deUint32> compressedFormats = iter->second.second;
2736 const deUint32 srcFormat = nonCompressedFormats[srcFormatNdx];
2737 const deUint32 dstFormat = compressedFormats[dstFormatNdx];