Lines Matching defs:dst

103 void computeQuadTexCoord2D (std::vector<float>& dst, const tcu::Vec2& bottomLeft, const tcu::Vec2& topRight)
105 dst.resize(4*2);
107 dst[0] = bottomLeft.x(); dst[1] = bottomLeft.y();
108 dst[2] = bottomLeft.x(); dst[3] = topRight.y();
109 dst[4] = topRight.x(); dst[5] = bottomLeft.y();
110 dst[6] = topRight.x(); dst[7] = topRight.y();
113 void computeQuadTexCoord2DArray (std::vector<float>& dst, int layerNdx, const tcu::Vec2& bottomLeft, const tcu::Vec2& topRight)
115 dst.resize(4*3);
117 dst[0] = bottomLeft.x(); dst[ 1] = bottomLeft.y(); dst[ 2] = (float)layerNdx;
118 dst[3] = bottomLeft.x(); dst[ 4] = topRight.y(); dst[ 5] = (float)layerNdx;
119 dst[6] = topRight.x(); dst[ 7] = bottomLeft.y(); dst[ 8] = (float)layerNdx;
120 dst[9] = topRight.x(); dst[10] = topRight.y(); dst[11] = (float)layerNdx;
123 void computeQuadTexCoordCube (std::vector<float>& dst, tcu::CubeFace face, const tcu::Vec2& bottomLeft, const tcu::Vec2& topRight)
145 dst.resize(3*4);
147 dst[0+mRow] = mSign;
148 dst[3+mRow] = mSign;
149 dst[6+mRow] = mSign;
150 dst[9+mRow] = mSign;
152 dst[0+sRow] = sSign * bottomLeft.x();
153 dst[3+sRow] = sSign * bottomLeft.x();
154 dst[6+sRow] = sSign * topRight.x();
155 dst[9+sRow] = sSign * topRight.x();
157 dst[0+tRow] = tSign * bottomLeft.y();
158 dst[3+tRow] = tSign * topRight.y();
159 dst[6+tRow] = tSign * bottomLeft.y();
160 dst[9+tRow] = tSign * topRight.y();
171 static void fillWithRandomColorTiles (const PixelBufferAccess& dst, const Vec4& minVal, const Vec4& maxVal, deUint32 seed)
173 const int numCols = dst.getWidth() >= 7 ? 7 : dst.getWidth();
174 const int numRows = dst.getHeight() >= 5 ? 5 : dst.getHeight();
177 for (int slice = 0; slice < dst.getDepth(); slice++)
181 const int yBegin = (row+0)*dst.getHeight()/numRows;
182 const int yEnd = (row+1)*dst.getHeight()/numRows;
183 const int xBegin = (col+0)*dst.getWidth()/numCols;
184 const int xEnd = (col+1)*dst.getWidth()/numCols;
187 tcu::clear(tcu::getSubregion(dst, xBegin, yBegin, slice, xEnd-xBegin, yEnd-yBegin, 1), color);
379 static void swizzlePixels (const PixelBufferAccess& dst, const ConstPixelBufferAccess& src, const MaybeTextureSwizzle& swizzle)
381 DE_ASSERT(dst.getWidth() == src.getWidth() &&
382 dst.getHeight() == src.getHeight() &&
383 dst.getDepth() == src.getDepth());
387 dst.setPixel(swizzleColor(src.getPixelT<T>(x, y, z), swizzle), x, y, z);
390 static void swizzlePixels (const PixelBufferAccess& dst, const ConstPixelBufferAccess& src, const MaybeTextureSwizzle& swizzle)
392 if (isDepthFormat(dst.getFormat()))
396 tcu::copy(dst, src);
397 else if (isUnormFormatType(dst.getFormat().type))
398 swizzlePixels<float>(dst, src, swizzle);
399 else if (isUIntFormatType(dst.getFormat().type))
400 swizzlePixels<deUint32>(dst, src, swizzle);
401 else if (isSIntFormatType(dst.getFormat().type))
402 swizzlePixels<deInt32>(dst, src, swizzle);
407 static void swizzleTexture (tcu::Texture2D& dst, const tcu::Texture2D& src, const MaybeTextureSwizzle& swizzle)
409 dst = tcu::Texture2D(src.getFormat(), src.getWidth(), src.getHeight());
414 dst.allocLevel(levelNdx);
415 swizzlePixels(dst.getLevel(levelNdx), src.getLevel(levelNdx), swizzle);
419 static void swizzleTexture (tcu::Texture2DArray& dst, const tcu::Texture2DArray& src, const MaybeTextureSwizzle& swizzle)
421 dst = tcu::Texture2DArray(src.getFormat(), src.getWidth(), src.getHeight(), src.getNumLayers());
426 dst.allocLevel(levelNdx);
427 swizzlePixels(dst.getLevel(levelNdx), src.getLevel(levelNdx), swizzle);
431 static void swizzleTexture (tcu::TextureCube& dst, const tcu::TextureCube& src, const MaybeTextureSwizzle& swizzle)
433 dst = tcu::TextureCube(src.getFormat(), src.getSize());
441 dst.allocLevel(face, levelNdx);
442 swizzlePixels(dst.getLevelFace(levelNdx, face), src.getLevelFace(levelNdx, face), swizzle);
470 virtual void operator() (const IVec2& pixCoord, IVec2 (&dst)[4]) const = 0;
488 void operator() (const IVec2& /* pixCoord */, IVec2 (&dst)[4]) const
490 for (int i = 0; i < DE_LENGTH_OF_ARRAY(dst); i++)
491 dst[i] = m_offsets[i];
515 void operator() (const IVec2& pixCoord, IVec2 (&dst)[4]) const
518 SinglePixelOffsets(tcu::mod(pixCoord.swizzle(1,0), IVec2(offsetRangeSize)) + m_offsetRange.x())(IVec2(), dst);
535 static inline void computeTexCoordVecs (const vector<float>& texCoords, tcu::Vector<float, N> (&dst)[4])
540 dst[i][j] = texCoords[i*N + j];
1972 virtual void initPrograms (vk::SourceCollections& dst) const;
2007 void TextureGather2DCase::initPrograms (vk::SourceCollections& dst) const
2014 genGatherPrograms(dst, m_baseParams, iterations);
2198 virtual void initPrograms (vk::SourceCollections& dst) const;
2233 void TextureGather2DArrayCase::initPrograms (vk::SourceCollections& dst) const
2241 genGatherPrograms(dst, m_baseParams, vector<GatherArgs>(iterations.begin(), iterations.end()));
2426 virtual void initPrograms (vk::SourceCollections& dst) const;
2459 void TextureGatherCubeCase::initPrograms (vk::SourceCollections& dst) const
2466 genGatherPrograms(dst, m_baseParams, vector<GatherArgs>(iterations.begin(), iterations.end()));