Lines Matching defs:dst

103 static void fillWithRandomColorTiles (const PixelBufferAccess& dst, const Vec4& minVal, const Vec4& maxVal, deUint32 seed)
105 const int numCols = dst.getWidth() >= 7 ? 7 : dst.getWidth();
106 const int numRows = dst.getHeight() >= 5 ? 5 : dst.getHeight();
109 for (int slice = 0; slice < dst.getDepth(); slice++)
113 const int yBegin = (row+0)*dst.getHeight()/numRows;
114 const int yEnd = (row+1)*dst.getHeight()/numRows;
115 const int xBegin = (col+0)*dst.getWidth()/numCols;
116 const int xEnd = (col+1)*dst.getWidth()/numCols;
120 tcu::clear(tcu::getSubregion(dst, xBegin, yBegin, slice, xEnd-xBegin, yEnd-yBegin, 1), color);
348 static void swizzlePixels (const PixelBufferAccess& dst, const ConstPixelBufferAccess& src, const MaybeTextureSwizzle& swizzle)
350 DE_ASSERT(dst.getWidth() == src.getWidth() &&
351 dst.getHeight() == src.getHeight() &&
352 dst.getDepth() == src.getDepth());
356 dst.setPixel(swizzleColor(src.getPixelT<T>(x, y, z), swizzle), x, y, z);
359 static void swizzlePixels (const PixelBufferAccess& dst, const ConstPixelBufferAccess& src, const MaybeTextureSwizzle& swizzle)
361 if (isDepthFormat(dst.getFormat()))
365 tcu::copy(dst, src);
366 else if (isUnormFormatType(dst.getFormat().type))
367 swizzlePixels<float>(dst, src, swizzle);
368 else if (isUIntFormatType(dst.getFormat().type))
369 swizzlePixels<deUint32>(dst, src, swizzle);
370 else if (isSIntFormatType(dst.getFormat().type))
371 swizzlePixels<deInt32>(dst, src, swizzle);
376 static void swizzleTexture (tcu::Texture2D& dst, const tcu::Texture2D& src, const MaybeTextureSwizzle& swizzle)
378 dst = tcu::Texture2D(src.getFormat(), src.getWidth(), src.getHeight());
383 dst.allocLevel(levelNdx);
384 swizzlePixels(dst.getLevel(levelNdx), src.getLevel(levelNdx), swizzle);
388 static void swizzleTexture (tcu::Texture2DArray& dst, const tcu::Texture2DArray& src, const MaybeTextureSwizzle& swizzle)
390 dst = tcu::Texture2DArray(src.getFormat(), src.getWidth(), src.getHeight(), src.getNumLayers());
395 dst.allocLevel(levelNdx);
396 swizzlePixels(dst.getLevel(levelNdx), src.getLevel(levelNdx), swizzle);
400 static void swizzleTexture (tcu::TextureCube& dst, const tcu::TextureCube& src, const MaybeTextureSwizzle& swizzle)
402 dst = tcu::TextureCube(src.getFormat(), src.getSize());
410 dst.allocLevel(face, levelNdx);
411 swizzlePixels(dst.getLevelFace(levelNdx, face), src.getLevelFace(levelNdx, face), swizzle);
439 virtual void operator() (const IVec2& pixCoord, IVec2 (&dst)[4]) const = 0;
457 void operator() (const IVec2& /* pixCoord */, IVec2 (&dst)[4]) const
459 for (int i = 0; i < DE_LENGTH_OF_ARRAY(dst); i++)
460 dst[i] = m_offsets[i];
484 void operator() (const IVec2& pixCoord, IVec2 (&dst)[4]) const
487 SinglePixelOffsets(tcu::mod(pixCoord.swizzle(1,0), IVec2(offsetRangeSize)) + m_offsetRange.x())(IVec2(), dst);
504 static inline void computeTexCoordVecs (const vector<float>& texCoords, tcu::Vector<float, N> (&dst)[4])
509 dst[i][j] = texCoords[i*N + j];