Lines Matching defs:dst
392 static void sampleTextureNonProjected (const tcu::SurfaceAccess& dst, const tcu::Texture1DView& rawSrc, const tcu::Vec4& sq, const ReferenceParams& params)
400 tcu::IVec2 dstSize = tcu::IVec2(dst.getWidth(), dst.getHeight());
408 for (int y = 0; y < dst.getHeight(); y++)
410 for (int x = 0; x < dst.getWidth(); x++)
412 float yf = ((float)y + 0.5f) / (float)dst.getHeight();
413 float xf = ((float)x + 0.5f) / (float)dst.getWidth();
422 dst.setPixel(execSample(src, params, s, lod) * params.colorScale + params.colorBias, x, y);
428 static void sampleTextureNonProjected (const PixelAccess& dst, const tcu::Texture2DView& rawSrc, const tcu::Vec4& sq, const tcu::Vec4& tq, const ReferenceParams& params)
436 tcu::IVec2 dstSize = tcu::IVec2(dst.getWidth(), dst.getHeight());
445 for (int y = 0; y < dst.getHeight(); y++)
447 for (int x = 0; x < dst.getWidth(); x++)
449 float yf = ((float)y + 0.5f) / (float)dst.getHeight();
450 float xf = ((float)x + 0.5f) / (float)dst.getWidth();
469 dst.setPixel(execSample(src, params, s, t, lod) * params.colorScale + params.colorBias, x, y);
474 static void sampleTextureProjected (const tcu::SurfaceAccess& dst, const tcu::Texture1DView& rawSrc, const tcu::Vec4& sq, const ReferenceParams& params)
481 float dstW = (float)dst.getWidth();
482 float dstH = (float)dst.getHeight();
490 for (int py = 0; py < dst.getHeight(); py++)
492 for (int px = 0; px < dst.getWidth(); px++)
506 float lod = computeProjectedTriLod(params.lodMode, triU[triNdx], triW[triNdx], triWx, triWy, (float)dst.getWidth(), (float)dst.getHeight())
509 dst.setPixel(execSample(src, params, s, lod) * params.colorScale + params.colorBias, px, py);
515 static void sampleTextureProjected (const PixelAccess& dst, const tcu::Texture2DView& rawSrc, const tcu::Vec4& sq, const tcu::Vec4& tq, const ReferenceParams& params)
522 float dstW = (float)dst.getWidth();
523 float dstH = (float)dst.getHeight();
534 for (int py = 0; py < dst.getHeight(); py++)
536 for (int px = 0; px < dst.getWidth(); px++)
551 float lod = computeProjectedTriLod(params.lodMode, triU[triNdx], triV[triNdx], triW[triNdx], triWx, triWy, (float)dst.getWidth(), (float)dst.getHeight())
554 dst.setPixel(execSample(src, params, s, t, lod) * params.colorScale + params.colorBias, px, py);
559 void sampleTexture (const tcu::PixelBufferAccess& dst, const tcu::Texture2DView& src, const float* texCoord, const ReferenceParams& params)
576 sampleTextureProjected(dst, view, sq, tq, params);
578 sampleTextureNonProjected(dst, view, sq, tq, params);
581 void sampleTexture (const tcu::SurfaceAccess& dst, const tcu::Texture2DView& src, const float* texCoord, const ReferenceParams& params)
598 sampleTextureProjected(dst, view, sq, tq, params);
600 sampleTextureNonProjected(dst, view, sq, tq, params);
603 void sampleTexture (const tcu::SurfaceAccess& dst, const tcu::Texture1DView& src, const float* texCoord, const ReferenceParams& params)
609 sampleTextureProjected(dst, view, sq, params);
611 sampleTextureNonProjected(dst, view, sq, params);
653 static void sampleTextureCube (const tcu::SurfaceAccess& dst, const tcu::TextureCubeView& rawSrc, const tcu::Vec4& sq, const tcu::Vec4& tq, const tcu::Vec4& rq, const ReferenceParams& params)
659 const tcu::IVec2 dstSize = tcu::IVec2(dst.getWidth(), dst.getHeight());
672 for (int py = 0; py < dst.getHeight(); py++)
674 for (int px = 0; px < dst.getWidth(); px++)
697 dst.setPixel(execSample(src, params, coord.x(), coord.y(), coord.z(), lod) * params.colorScale + params.colorBias, px, py);
702 void sampleTexture (const tcu::SurfaceAccess& dst, const tcu::TextureCubeView& src, const float* texCoord, const ReferenceParams& params)
719 return sampleTextureCube(dst, view, sq, tq, rq, params);
722 static void sampleTextureNonProjected (const tcu::SurfaceAccess& dst, const tcu::Texture2DArrayView& rawSrc, const tcu::Vec4& sq, const tcu::Vec4& tq, const tcu::Vec4& rq, const ReferenceParams& params)
730 tcu::IVec2 dstSize = tcu::IVec2(dst.getWidth(), dst.getHeight());
740 for (int y = 0; y < dst.getHeight(); y++)
742 for (int x = 0; x < dst.getWidth(); x++)
744 float yf = ((float)y + 0.5f) / (float)dst.getHeight();
745 float xf = ((float)x + 0.5f) / (float)dst.getWidth();
756 dst.setPixel(execSample(src, params, s, t, r, lod) * params.colorScale + params.colorBias, x, y);
761 void sampleTexture (const tcu::SurfaceAccess& dst, const tcu::Texture2DArrayView& src, const float* texCoord, const ReferenceParams& params)
768 sampleTextureNonProjected(dst, src, sq, tq, rq, params);
771 static void sampleTextureNonProjected (const tcu::SurfaceAccess& dst, const tcu::Texture1DArrayView& rawSrc, const tcu::Vec4& sq, const tcu::Vec4& tq, const ReferenceParams& params)
779 tcu::IVec2 dstSize = tcu::IVec2(dst.getWidth(), dst.getHeight());
788 for (int y = 0; y < dst.getHeight(); y++)
790 for (int x = 0; x < dst.getWidth(); x++)
792 float yf = ((float)y + 0.5f) / (float)dst.getHeight();
793 float xf = ((float)x + 0.5f) / (float)dst.getWidth();
803 dst.setPixel(execSample(src, params, s, t, lod) * params.colorScale + params.colorBias, x, y);
808 void sampleTexture (const tcu::SurfaceAccess& dst, const tcu::Texture1DArrayView& src, const float* texCoord, const ReferenceParams& params)
814 sampleTextureNonProjected(dst, src, sq, tq, params);
817 static void sampleTextureNonProjected (const tcu::SurfaceAccess& dst, const tcu::Texture3DView& rawSrc, const tcu::Vec4& sq, const tcu::Vec4& tq, const tcu::Vec4& rq, const ReferenceParams& params)
825 tcu::IVec2 dstSize = tcu::IVec2(dst.getWidth(), dst.getHeight());
835 for (int y = 0; y < dst.getHeight(); y++)
837 for (int x = 0; x < dst.getWidth(); x++)
839 float yf = ((float)y + 0.5f) / (float)dst.getHeight();
840 float xf = ((float)x + 0.5f) / (float)dst.getWidth();
854 dst.setPixel(src.sample(params.sampler, s, t, r, lod) * params.colorScale + params.colorBias, x, y);
859 static void sampleTextureProjected (const tcu::SurfaceAccess& dst, const tcu::Texture3DView& rawSrc, const tcu::Vec4& sq, const tcu::Vec4& tq, const tcu::Vec4& rq, const ReferenceParams& params)
866 float dstW = (float)dst.getWidth();
867 float dstH = (float)dst.getHeight();
881 for (int py = 0; py < dst.getHeight(); py++)
883 for (int px = 0; px < dst.getWidth(); px++)
899 float lod = computeProjectedTriLod(params.lodMode, triU[triNdx], triV[triNdx], triW[triNdx], triP[triNdx], triWx, triWy, (float)dst.getWidth(), (float)dst.getHeight())
902 dst.setPixel(src.sample(params.sampler, s, t, r, lod) * params.colorScale + params.colorBias, px, py);
907 void sampleTexture (const tcu::SurfaceAccess& dst, const tcu::Texture3DView& src, const float* texCoord, const ReferenceParams& params)
925 sampleTextureProjected(dst, view, sq, tq, rq, params);
927 sampleTextureNonProjected(dst, view, sq, tq, rq, params);
930 static void sampleTextureCubeArray (const tcu::SurfaceAccess& dst, const tcu::TextureCubeArrayView& rawSrc, const tcu::Vec4& sq, const tcu::Vec4& tq, const tcu::Vec4& rq, const tcu::Vec4& qq, const ReferenceParams& params)
936 const float dstW = (float)dst.getWidth();
937 const float dstH = (float)dst.getHeight();
948 for (int py = 0; py < dst.getHeight(); py++)
950 for (int px = 0; px < dst.getWidth(); px++)
976 dst.setPixel(execSample(src, params, coord.x(), coord.y(), coord.z(), coordQ, lod) * params.colorScale + params.colorBias, px, py);
981 void sampleTexture (const tcu::SurfaceAccess& dst, const tcu::TextureCubeArrayView& src, const float* texCoord, const ReferenceParams& params)
988 sampleTextureCubeArray(dst, src, sq, tq, rq, qq, params);
991 void fetchTexture (const tcu::SurfaceAccess& dst, const tcu::ConstPixelBufferAccess& src, const float* texCoord, const tcu::Vec4& colorScale, const tcu::Vec4& colorBias)
996 for (int y = 0; y < dst.getHeight(); y++)
998 for (int x = 0; x < dst.getWidth(); x++)
1000 const float yf = ((float)y + 0.5f) / (float)dst.getHeight();
1001 const float xf = ((float)x + 0.5f) / (float)dst.getWidth();
1009 dst.setPixel(src.getPixel((int)s, 0) * colorScale + colorBias, x, y);
1065 void computeQuadTexCoord1D (std::vector<float>& dst, float left, float right)
1067 dst.resize(4);
1069 dst[0] = left;
1070 dst[1] = left;
1071 dst[2] = right;
1072 dst[3] = right;
1075 void computeQuadTexCoord1DArray (std::vector<float>& dst, int layerNdx, float left, float right)
1077 dst.resize(4*2);
1079 dst[0] = left; dst[1] = (float)layerNdx;
1080 dst[2] = left; dst[3] = (float)layerNdx;
1081 dst[4] = right; dst[5] = (float)layerNdx;
1082 dst[6] = right; dst[7] = (float)layerNdx;
1085 void computeQuadTexCoord2D (std::vector<float>& dst, const tcu::Vec2& bottomLeft, const tcu::Vec2& topRight)
1087 dst.resize(4*2);
1089 dst[0] = bottomLeft.x(); dst[1] = bottomLeft.y();
1090 dst[2] = bottomLeft.x(); dst[3] = topRight.y();
1091 dst[4] = topRight.x(); dst[5] = bottomLeft.y();
1092 dst[6] = topRight.x(); dst[7] = topRight.y();
1095 void computeQuadTexCoord2DArray (std::vector<float>& dst, int layerNdx, const tcu::Vec2& bottomLeft, const tcu::Vec2& topRight)
1097 dst.resize(4*3);
1099 dst[0] = bottomLeft.x(); dst[ 1] = bottomLeft.y(); dst[ 2] = (float)layerNdx;
1100 dst[3] = bottomLeft.x(); dst[ 4] = topRight.y(); dst[ 5] = (float)layerNdx;
1101 dst[6] = topRight.x(); dst[ 7] = bottomLeft.y(); dst[ 8] = (float)layerNdx;
1102 dst[9] = topRight.x(); dst[10] = topRight.y(); dst[11] = (float)layerNdx;
1105 void computeQuadTexCoord3D (std::vector<float>& dst, const tcu::Vec3& p0, const tcu::Vec3& p1, const tcu::IVec3& dirSwz)
1117 dst.resize(4*3);
1119 dst[0] = v0.x(); dst[ 1] = v0.y(); dst[ 2] = v0.z();
1120 dst[3] = v1.x(); dst[ 4] = v1.y(); dst[ 5] = v1.z();
1121 dst[6] = v2.x(); dst[ 7] = v2.y(); dst[ 8] = v2.z();
1122 dst[9] = v3.x(); dst[10] = v3.y(); dst[11] = v3.z();
1125 void computeQuadTexCoordCube (std::vector<float>& dst, tcu::CubeFace face)
1186 dst.resize(texCoordSize);
1187 std::copy(texCoord, texCoord+texCoordSize, dst.begin());
1190 void computeQuadTexCoordCube (std::vector<float>& dst, tcu::CubeFace face, const tcu::Vec2& bottomLeft, const tcu::Vec2& topRight)
1212 dst.resize(3*4);
1214 dst[0+mRow] = mSign;
1215 dst[3+mRow] = mSign;
1216 dst[6+mRow] = mSign;
1217 dst[9+mRow] = mSign;
1219 dst[0+sRow] = sSign * bottomLeft.x();
1220 dst[3+sRow] = sSign * bottomLeft.x();
1221 dst[6+sRow] = sSign * topRight.x();
1222 dst[9+sRow] = sSign * topRight.x();
1224 dst[0+tRow] = tSign * bottomLeft.y();
1225 dst[3+tRow] = tSign * topRight.y();
1226 dst[6+tRow] = tSign * bottomLeft.y();
1227 dst[9+tRow] = tSign * topRight.y();
1230 void computeQuadTexCoordCubeArray (std::vector<float>& dst, tcu::CubeFace face, const tcu::Vec2& bottomLeft, const tcu::Vec2& topRight, const tcu::Vec2& layerRange)
1255 dst.resize(4*4);
1257 dst[ 0+mRow] = mSign;
1258 dst[ 4+mRow] = mSign;
1259 dst[ 8+mRow] = mSign;
1260 dst[12+mRow] = mSign;
1262 dst[ 0+sRow] = sSign * bottomLeft.x();
1263 dst[ 4+sRow] = sSign * bottomLeft.x();
1264 dst[ 8+sRow] = sSign * topRight.x();
1265 dst[12+sRow] = sSign * topRight.x();
1267 dst[ 0+tRow] = tSign * bottomLeft.y();
1268 dst[ 4+tRow] = tSign * topRight.y();
1269 dst[ 8+tRow] = tSign * bottomLeft.y();
1270 dst[12+tRow] = tSign * topRight.y();
1274 dst[ 0+qRow] = l0;
1275 dst[ 4+qRow] = l0*0.5f + l1*0.5f;
1276 dst[ 8+qRow] = l0*0.5f + l1*0.5f;
1277 dst[12+qRow] = l1;
1281 dst[ 0+qRow] = l0;
1282 dst[ 4+qRow] = l0;
1283 dst[ 8+qRow] = l0;
1284 dst[12+qRow] = l0;
3179 static int compareGenMipmapBilinear (const tcu::ConstPixelBufferAccess& dst, const tcu::ConstPixelBufferAccess& src, const tcu::PixelBufferAccess& errorMask, const GenMipmapPrecision& precision)
3181 DE_ASSERT(dst.getDepth() == 1 && src.getDepth() == 1); // \todo [2013-10-29 pyry] 3D textures.
3183 const float dstW = float(dst.getWidth());
3184 const float dstH = float(dst.getHeight());
3199 for (int y = 0; y < dst.getHeight(); y++)
3200 for (int x = 0; x < dst.getWidth(); x++)
3202 const tcu::Vec4 result = dst.getPixel(x, y);
3215 static int compareGenMipmapBox (const tcu::ConstPixelBufferAccess& dst, const tcu::ConstPixelBufferAccess& src, const tcu::PixelBufferAccess& errorMask, const GenMipmapPrecision& precision)
3217 DE_ASSERT(dst.getDepth() == 1 && src.getDepth() == 1); // \todo [2013-10-29 pyry] 3D textures.
3219 const float dstW = float(dst.getWidth());
3220 const float dstH = float(dst.getHeight());
3235 for (int y = 0; y < dst.getHeight(); y++)
3236 for (int x = 0; x < dst.getWidth(); x++)
3238 const tcu::Vec4 result = dst.getPixel(x, y);
3251 static int compareGenMipmapVeryLenient (const tcu::ConstPixelBufferAccess& dst, const tcu::ConstPixelBufferAccess& src, const tcu::PixelBufferAccess& errorMask, const GenMipmapPrecision& precision)
3253 DE_ASSERT(dst.getDepth() == 1 && src.getDepth() == 1); // \todo [2013-10-29 pyry] 3D textures.
3256 const float dstW = float(dst.getWidth());
3257 const float dstH = float(dst.getHeight());
3262 for (int y = 0; y < dst.getHeight(); y++)
3263 for (int x = 0; x < dst.getWidth(); x++)
3265 const tcu::Vec4 result = dst.getPixel(x, y);
3325 const tcu::ConstPixelBufferAccess dst = resultTexture.getLevel(levelNdx);
3326 tcu::Surface errorMask (dst.getWidth(), dst.getHeight());
3333 const int numFailed = compareGenMipmapBilinear(dst, src, errorMask.getAccess(), precision);
3342 const int numFailed = compareGenMipmapBox(dst, src, errorMask.getAccess(), precision);
3355 const int numFailed = compareGenMipmapVeryLenient(dst, src, errorMask.getAccess(), precision);
3366 << tcu::TestLog::Image("Result", "Result", dst);
3410 const tcu::ConstPixelBufferAccess dst = resultTexture.getLevelFace(levelNdx, face);
3411 tcu::Surface errorMask (dst.getWidth(), dst.getHeight());
3418 const int numFailed = compareGenMipmapBilinear(dst, src, errorMask.getAccess(), precision);
3427 const int numFailed = compareGenMipmapBox(dst, src, errorMask.getAccess(), precision);
3440 const int numFailed = compareGenMipmapVeryLenient(dst, src, errorMask.getAccess(), precision);
3451 << tcu::TestLog::Image("Result", "Result", dst);