Lines Matching refs:tcu
93 bool isDepthFormat (deUint32 format, tcu::Sampler::DepthStencilMode mode) in isDepthFormat()
107 const tcu::TextureFormat fmt = glu::mapGLInternalFormat(format); in isDepthFormat()
109 if (fmt.order == tcu::TextureFormat::D) in isDepthFormat()
111 DE_ASSERT(mode == tcu::Sampler::MODE_DEPTH); in isDepthFormat()
114 else if (fmt.order == tcu::TextureFormat::DS && mode == tcu::Sampler::MODE_DEPTH) in isDepthFormat()
121 bool isStencilFormat (deUint32 format, tcu::Sampler::DepthStencilMode mode) in isStencilFormat()
135 const tcu::TextureFormat fmt = glu::mapGLInternalFormat(format); in isStencilFormat()
137 if (fmt.order == tcu::TextureFormat::S) in isStencilFormat()
139 DE_ASSERT(mode == tcu::Sampler::MODE_STENCIL); in isStencilFormat()
142 else if (fmt.order == tcu::TextureFormat::DS && mode == tcu::Sampler::MODE_STENCIL) in isStencilFormat()
149 tcu::TextureChannelClass getFormatChannelClass (deUint32 format, tcu::Sampler::DepthStencilMode mod… in getFormatChannelClass()
154 return tcu::TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT; in getFormatChannelClass()
158 const tcu::CompressedTexFormat compressedFmt = glu::mapGLCompressedTexFormat(format); in getFormatChannelClass()
159 const tcu::TextureFormat uncompressedFmt = tcu::getUncompressedFormat(compressedFmt); in getFormatChannelClass()
160 return tcu::getTextureChannelClass(uncompressedFmt.type); in getFormatChannelClass()
164 const tcu::TextureFormat fmt = glu::mapGLInternalFormat(format); in getFormatChannelClass()
165 const tcu::TextureFormat effectiveFmt = tcu::getEffectiveDepthStencilTextureFormat(fmt, mode); in getFormatChannelClass()
167 return tcu::getTextureChannelClass(effectiveFmt.type); in getFormatChannelClass()
177 void generateDummyCompressedData (tcu::CompressedTexture& dst, const tcu::CompressedTexFormat& form… in generateDummyCompressedData()
179 const int blockByteSize = tcu::getBlockSize(format); in generateDummyCompressedData()
180 const tcu::IVec3 blockPixelSize = tcu::getBlockPixelSize(format); in generateDummyCompressedData()
181 const tcu::IVec3 numBlocks (getDimensionNumBlocks(dst.getWidth(), blockPixelSize.x()), in generateDummyCompressedData()
189 if (tcu::isAstcFormat(format)) in generateDummyCompressedData()
217 typedef tcu::IVec2 SizeType;
219 …xtureFromInternalFormat (glu::RenderContext& renderCtx, deUint32 texFormat, const tcu::IVec2& size) in createTextureFromInternalFormat()
224 …tAndType (glu::RenderContext& renderCtx, deUint32 texFormat, deUint32 type, const tcu::IVec2& size) in createTextureFromFormatAndType()
231 const tcu::CompressedTexture& compressedLevel, in createTextureFromCompressedData()
232 const tcu::TexDecompressionParams& decompressionParams) in createTextureFromCompressedData()
241 static int getTextureNumLayers (const tcu::IVec2& size) in getTextureNumLayers()
252 typedef tcu::IVec3 SizeType;
254 …xtureFromInternalFormat (glu::RenderContext& renderCtx, deUint32 texFormat, const tcu::IVec3& size) in createTextureFromInternalFormat()
259 …tAndType (glu::RenderContext& renderCtx, deUint32 texFormat, deUint32 type, const tcu::IVec3& size) in createTextureFromFormatAndType()
266 const tcu::CompressedTexture& compressedLevel, in createTextureFromCompressedData()
267 const tcu::TexDecompressionParams& decompressionParams) in createTextureFromCompressedData()
276 static int getTextureNumLayers (const tcu::IVec3& size) in getTextureNumLayers()
288 …if (isDepthFormat(texFormat, tcu::Sampler::MODE_DEPTH) || isStencilFormat(texFormat, tcu::Sampler:… in genDummyTexture()
294 if (isDepthFormat(texFormat, tcu::Sampler::MODE_DEPTH)) in genDummyTexture()
297 …const tcu::PixelBufferAccess depthAccess = tcu::getEffectiveDepthStencilAccess(texture->getRefText… in genDummyTexture()
298 tcu::fillWithComponentGradients(depthAccess, tcu::Vec4(0.0f), tcu::Vec4(1.0f)); in genDummyTexture()
301 if (isStencilFormat(texFormat, tcu::Sampler::MODE_STENCIL)) in genDummyTexture()
304 …const tcu::PixelBufferAccess stencilAccess = tcu::getEffectiveDepthStencilAccess(texture->getRefTe… in genDummyTexture()
305 … const tcu::TextureFormatInfo texFormatInfo = tcu::getTextureFormatInfo(stencilAccess.getFormat()); in genDummyTexture()
308 …tcu::fillWithComponentGradients(tcu::flipYAccess(stencilAccess), texFormatInfo.valueMax, texFormat… in genDummyTexture()
325 …const tcu::TextureFormatInfo texFormatInfo = tcu::getTextureFormatInfo(texture->getRefTexture().ge… in genDummyTexture()
326 const tcu::Vec4 rampLow = texFormatInfo.valueMin; in genDummyTexture()
327 const tcu::Vec4 rampHigh = texFormatInfo.valueMax; in genDummyTexture()
328 tcu::fillWithComponentGradients(texture->getRefTexture().getLevel(0), rampLow, rampHigh); in genDummyTexture()
335 const tcu::CompressedTexFormat compressedFormat = glu::mapGLCompressedTexFormat(texFormat); in genDummyTexture()
337 tcu::CompressedTexture compressedLevel (compressedFormat, size.x(), size.y(), numLayers); in genDummyTexture()
338 const bool isAstcFormat = tcu::isAstcFormat(compressedFormat); in genDummyTexture()
339 …tcu::TexDecompressionParams decompressionParams ((isAstcFormat) ? (tcu::TexDecompressionParams::A… in genDummyTexture()
376 tcu::IVec4 getNBitIntegerVec4MaxValue (bool isSigned, const tcu::IVec4& numBits) in getNBitIntegerVec4MaxValue()
378 return tcu::IVec4(getNBitIntegerMaxValue(isSigned, numBits[0]), in getNBitIntegerVec4MaxValue()
384 tcu::IVec4 getNBitIntegerVec4MinValue (bool isSigned, const tcu::IVec4& numBits) in getNBitIntegerVec4MinValue()
386 return tcu::IVec4(getNBitIntegerMinValue(isSigned, numBits[0]), in getNBitIntegerVec4MinValue()
392 rr::GenericVec4 mapToFormatColorUnits (const tcu::TextureFormat& texFormat, const tcu::Vec4& normal… in mapToFormatColorUnits()
394 const tcu::TextureFormatInfo texFormatInfo = tcu::getTextureFormatInfo(texFormat); in mapToFormatColorUnits()
396 switch (tcu::getTextureChannelClass(texFormat.type)) in mapToFormatColorUnits()
398 case tcu::TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT: return rr::GenericVec4(normalizedRange); in mapToFormatColorUnits()
399 …case tcu::TEXTURECHANNELCLASS_SIGNED_FIXED_POINT: return rr::GenericVec4(normalizedRange * 2.0f -… in mapToFormatColorUnits()
400 …case tcu::TEXTURECHANNELCLASS_FLOATING_POINT: return rr::GenericVec4(texFormatInfo.valueMin + no… in mapToFormatColorUnits()
401 …case tcu::TEXTURECHANNELCLASS_SIGNED_INTEGER: return rr::GenericVec4(tcu::mix(texFormatInfo.valu… in mapToFormatColorUnits()
402 …case tcu::TEXTURECHANNELCLASS_UNSIGNED_INTEGER: return rr::GenericVec4(tcu::mix(texFormatInfo.va… in mapToFormatColorUnits()
410 rr::GenericVec4 mapToFormatColorRepresentable (const tcu::TextureFormat& texFormat, const tcu::Vec4… in mapToFormatColorRepresentable()
416 const tcu::BVec4 channelMask = tcu::getTextureFormatChannelMask(texFormat); in mapToFormatColorRepresentable()
418 tcu::PixelBufferAccess access (texFormat, tcu::IVec3(1, 1, 1), buffer.getPtr()); in mapToFormatColorRepresentable()
420 if (tcu::isSRGB(texFormat)) in mapToFormatColorRepresentable()
422 DE_ASSERT(texFormat.type == tcu::TextureFormat::UNORM_INT8); in mapToFormatColorRepresentable()
426 const tcu::Vec4 sRGB = tcu::linearToSRGB(normalizedRange); in mapToFormatColorRepresentable()
427 const tcu::IVec4 sRGB8 = tcu::IVec4(tcu::floatToU8(sRGB[0]), in mapToFormatColorRepresentable()
428 tcu::floatToU8(sRGB[1]), in mapToFormatColorRepresentable()
429 tcu::floatToU8(sRGB[2]), in mapToFormatColorRepresentable()
430 tcu::floatToU8(sRGB[3])); in mapToFormatColorRepresentable()
431 const tcu::Vec4 linearized = tcu::sRGBToLinear(tcu::Vec4(sRGB8[0] / 255.0f, in mapToFormatColorRepresentable()
436 return rr::GenericVec4(tcu::select(linearized, tcu::Vec4(0.0f), channelMask)); in mapToFormatColorRepresentable()
439 switch (tcu::getTextureChannelClass(texFormat.type)) in mapToFormatColorRepresentable()
441 case tcu::TEXTURECHANNELCLASS_SIGNED_FIXED_POINT: in mapToFormatColorRepresentable()
442 case tcu::TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT: in mapToFormatColorRepresentable()
443 case tcu::TEXTURECHANNELCLASS_FLOATING_POINT: in mapToFormatColorRepresentable()
446 return rr::GenericVec4(tcu::select(access.getPixel(0, 0), tcu::Vec4(0.0f), channelMask)); in mapToFormatColorRepresentable()
448 case tcu::TEXTURECHANNELCLASS_SIGNED_INTEGER: in mapToFormatColorRepresentable()
451 return rr::GenericVec4(tcu::select(access.getPixelInt(0, 0), tcu::IVec4(0), channelMask)); in mapToFormatColorRepresentable()
453 case tcu::TEXTURECHANNELCLASS_UNSIGNED_INTEGER: in mapToFormatColorRepresentable()
456 return rr::GenericVec4(tcu::select(access.getPixelUint(0, 0), tcu::UVec4(0u), channelMask)); in mapToFormatColorRepresentable()
466 bool isCoreFilterableFormat (deUint32 format, tcu::Sampler::DepthStencilMode mode) in isCoreFilterableFormat()
510 tcu::Vec2 p0;
511 tcu::Vec2 p1;
513 tcu::Vec4 lookupScale;
514 tcu::Vec4 lookupBias;
528 tcu::Sampler::DepthStencilMode mode,
546 void renderTo (tcu::Surface& surface,
552 void verifyImage (const tcu::Surface& image,
556 bool verifyTextureSampleResult (const tcu::ConstPixelBufferAccess& renderedFrame,
559 const tcu::LodPrecision& lodPrecision,
560 const tcu::LookupPrecision& lookupPrecision);
562 bool verifyTextureCompareResult (const tcu::ConstPixelBufferAccess& renderedFrame,
565 const tcu::TexComparePrecision& texComparePrecision,
566 const tcu::TexComparePrecision& lowQualityTexComparePrecision,
567 const tcu::LodPrecision& lodPrecision,
568 const tcu::LodPrecision& lowQualityLodPrecision);
570 bool verifyTextureGatherResult (const tcu::ConstPixelBufferAccess& renderedFrame,
573 const tcu::LookupPrecision& lookupPrecision);
575 bool verifyTextureGatherCmpResult(const tcu::ConstPixelBufferAccess& renderedFrame,
578 const tcu::TexComparePrecision& texComparePrecision,
579 const tcu::TexComparePrecision& lowQualityTexComparePrecision);
592 const tcu::Sampler::DepthStencilMode m_sampleMode;
593 const tcu::TextureChannelClass m_channelClass;
613 tcu::ResultCollector m_result;
620 tcu::Sampler::DepthStencilMode mode, in TextureBorderClampTest()
641 DE_ASSERT(m_channelClass != tcu::TEXTURECHANNELCLASS_LAST || mode != tcu::Sampler::MODE_LAST); in TextureBorderClampTest()
654 throw tcu::NotSupportedError("Test requires GL_EXT_texture_border_clamp extension"); in init()
657 tcu::isAstcFormat(glu::mapGLCompressedTexFormat(m_texFormat)) && in init()
660 throw tcu::NotSupportedError("Test requires GL_KHR_texture_compression_astc_ldr extension"); in init()
664 throw tcu::NotSupportedError("Test requires GL_EXT_texture_format_BGRA8888 extension"); in init()
669 …throw tcu::NotSupportedError("Test requires " + de::toString<int>(VIEWPORT_WIDTH) + "x" + de::toSt… in init()
674 …2D>(m_context.getRenderContext(), m_context.getContextInfo(), m_texFormat, tcu::IVec2(m_texWidth, … in init()
676 m_testCtx.getLog() << tcu::TestLog::Message in init()
680 << tcu::TestLog::EndMessage; in init()
690 m_testCtx.getLog() << tcu::TestLog::Message in init()
692 << tcu::TestLog::EndMessage in init()
696 throw tcu::TestError("failed to build program"); in init()
711 const tcu::ScopedLogSection section (m_testCtx.getLog(), "Iteration", iterationDesc); in iterate()
712 tcu::Surface renderedFrame (VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in iterate()
729 …const std::string borderColorString = (m_channelClass == tcu::TEXTURECHANNELCLASS_SIGNED_INTEGE… in logParams()
730 …: (m_channelClass == tcu::TEXTURECHANNELCLASS_UNSIGNED_INTEGER) ? (de::toString(config.borderColor… in logParams()
733 m_testCtx.getLog() << tcu::TestLog::Message in logParams()
742 << tcu::TestLog::EndMessage; in logParams()
744 if (m_sampleMode == tcu::Sampler::MODE_DEPTH) in logParams()
745 …m_testCtx.getLog() << tcu::TestLog::Message << "Depth stencil texture mode is DEPTH_COMPONENT" << … in logParams()
746 else if (m_sampleMode == tcu::Sampler::MODE_STENCIL) in logParams()
747 …m_testCtx.getLog() << tcu::TestLog::Message << "Depth stencil texture mode is STENCIL_INDEX" << tc… in logParams()
751 m_testCtx.getLog() << tcu::TestLog::Message in logParams()
754 << tcu::TestLog::EndMessage; in logParams()
758 void TextureBorderClampTest::renderTo (tcu::Surface& surface, in renderTo()
773 if (m_sampleMode == tcu::Sampler::MODE_DEPTH) in renderTo()
775 else if (m_sampleMode == tcu::Sampler::MODE_STENCIL) in renderTo()
799 case tcu::TEXTURECHANNELCLASS_SIGNED_FIXED_POINT: in renderTo()
800 case tcu::TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT: in renderTo()
801 case tcu::TEXTURECHANNELCLASS_FLOATING_POINT: in renderTo()
805 case tcu::TEXTURECHANNELCLASS_SIGNED_INTEGER: in renderTo()
809 case tcu::TEXTURECHANNELCLASS_UNSIGNED_INTEGER: in renderTo()
819 const tcu::Vec4 blue(0.0f, 0.0f, 1.0f, 1.0f); in renderTo()
838 case tcu::TEXTURECHANNELCLASS_SIGNED_FIXED_POINT: in renderTo()
839 case tcu::TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT: in renderTo()
840 case tcu::TEXTURECHANNELCLASS_FLOATING_POINT: in renderTo()
844 case tcu::TEXTURECHANNELCLASS_SIGNED_INTEGER: in renderTo()
848 case tcu::TEXTURECHANNELCLASS_UNSIGNED_INTEGER: in renderTo()
905 void TextureBorderClampTest::verifyImage (const tcu::Surface& renderedFrame, in verifyImage()
909 const tcu::PixelFormat pixelFormat = m_context.getRenderTarget().getPixelFormat(); in verifyImage()
911 tcu::LodPrecision lodPrecision; in verifyImage()
920 if (samplerParams.sampler.compare == tcu::Sampler::COMPAREMODE_NONE) in verifyImage()
922 …const tcu::TextureFormat texFormat = tcu::getEffectiveDepthStencilTextureFormat(m_texture->getR… in verifyImage()
923 …nFilter = samplerParams.sampler.minFilter == tcu::Sampler::NEAREST || samplerParams.sampler.minFil… in verifyImage()
924 const bool isNearestMagFilter = samplerParams.sampler.magFilter == tcu::Sampler::NEAREST; in verifyImage()
926 …const bool isSRGB = texFormat.order == tcu::TextureFormat::sRGB || texFormat.order == tcu:… in verifyImage()
928 …const tcu::IVec4 colorBits = tcu::max(gls::TextureTestUtil::getBitsVec(pixelFormat) - tcu::IV… in verifyImage()
929 tcu::LookupPrecision lookupPrecision; in verifyImage()
931 …lookupPrecision.colorThreshold = tcu::computeFixedPointThreshold(colorBits) / samplerParams.colorS… in verifyImage()
932 lookupPrecision.coordBits = tcu::IVec3(20,20,0); in verifyImage()
933 lookupPrecision.uvwBits = tcu::IVec3(5,5,0); in verifyImage()
959 tcu::TexComparePrecision texComparePrecision; in verifyImage()
960 tcu::TexComparePrecision lowQualityTexComparePrecision; in verifyImage()
961 tcu::LodPrecision lowQualityLodPrecision = lodPrecision; in verifyImage()
963 texComparePrecision.coordBits = tcu::IVec3(20,20,0); in verifyImage()
964 texComparePrecision.uvwBits = tcu::IVec3(7,7,0); in verifyImage()
969 lowQualityTexComparePrecision.coordBits = tcu::IVec3(20,20,0); in verifyImage()
970 lowQualityTexComparePrecision.uvwBits = tcu::IVec3(4,4,0); in verifyImage()
1006 bool TextureBorderClampTest::verifyTextureSampleResult (const tcu::ConstPixelBufferAccess& rende… in verifyTextureSampleResult()
1009 const tcu::LodPrecision& lodPrecision, in verifyTextureSampleResult()
1010 const tcu::LookupPrecision& lookupPrecision) in verifyTextureSampleResult()
1012 const tcu::PixelFormat pixelFormat = m_context.getRenderTarget().getPixelFormat(); in verifyTextureSampleResult()
1013 tcu::Surface reference (renderedFrame.getWidth(), renderedFrame.getHeight()); in verifyTextureSampleResult()
1014 tcu::Surface errorMask (renderedFrame.getWidth(), renderedFrame.getHeight()); in verifyTextureSampleResult()
1023 …estCtx.getLog() << tcu::TestLog::Message << "ERROR: Result verification failed, got " << numFailed… in verifyTextureSampleResult()
1024 m_testCtx.getLog() << tcu::TestLog::ImageSet("VerifyResult", "Verification result") in verifyTextureSampleResult()
1025 << tcu::TestLog::Image("Rendered", "Rendered image", renderedFrame); in verifyTextureSampleResult()
1028 m_testCtx.getLog() << tcu::TestLog::Image("Reference", "Ideal reference image", reference) in verifyTextureSampleResult()
1029 << tcu::TestLog::Image("ErrorMask", "Error mask", errorMask); in verifyTextureSampleResult()
1031 m_testCtx.getLog() << tcu::TestLog::EndImageSet; in verifyTextureSampleResult()
1036 bool TextureBorderClampTest::verifyTextureCompareResult (const tcu::ConstPixelBufferAccess& rend… in verifyTextureCompareResult()
1039 const tcu::TexComparePrecision& texComparePrecision, in verifyTextureCompareResult()
1040 const tcu::TexComparePrecision& lowQualityTexComparePrecision, in verifyTextureCompareResult()
1041 const tcu::LodPrecision& lodPrecision, in verifyTextureCompareResult()
1042 const tcu::LodPrecision& lowQualityLodPrecision) in verifyTextureCompareResult()
1044 const tcu::PixelFormat pixelFormat = m_context.getRenderTarget().getPixelFormat(); in verifyTextureCompareResult()
1046 …const tcu::IVec4 nonShadowBits = tcu::max(gls::TextureTestUtil::getBitsVec(pixelFormat) - … in verifyTextureCompareResult()
1047 …const tcu::Vec3 nonShadowThreshold = tcu::computeFixedPointThreshold(nonShadowBits).swizzl… in verifyTextureCompareResult()
1048 std::vector<tcu::ConstPixelBufferAccess> srcLevelStorage; in verifyTextureCompareResult()
1049 …const tcu::Texture2DView effectiveView = tcu::getEffectiveTextureView(m_texture->getRefTextu… in verifyTextureCompareResult()
1050 tcu::Surface reference (renderedFrame.getWidth(), renderedFrame.getHeight()); in verifyTextureCompareResult()
1051 tcu::Surface errorMask (renderedFrame.getWidth(), renderedFrame.getHeight()); in verifyTextureCompareResult()
1061 m_testCtx.getLog() << tcu::TestLog::Message in verifyTextureCompareResult()
1063 << tcu::TestLog::EndMessage; in verifyTextureCompareResult()
1069 …estCtx.getLog() << tcu::TestLog::Message << "ERROR: Verification against low precision requirement… in verifyTextureCompareResult()
1075 …estCtx.getLog() << tcu::TestLog::Message << "ERROR: Result verification failed, got " << numFailed… in verifyTextureCompareResult()
1076 m_testCtx.getLog() << tcu::TestLog::ImageSet("VerifyResult", "Verification result") in verifyTextureCompareResult()
1077 << tcu::TestLog::Image("Rendered", "Rendered image", renderedFrame); in verifyTextureCompareResult()
1080 m_testCtx.getLog() << tcu::TestLog::Image("Reference", "Ideal reference image", reference) in verifyTextureCompareResult()
1081 << tcu::TestLog::Image("ErrorMask", "Error mask", errorMask); in verifyTextureCompareResult()
1083 m_testCtx.getLog() << tcu::TestLog::EndImageSet; in verifyTextureCompareResult()
1097 bool TextureBorderClampTest::verifyTextureGatherResult (const tcu::ConstPixelBufferAccess& rende… in verifyTextureGatherResult()
1100 const tcu::LookupPrecision& lookupPrecision) in verifyTextureGatherResult()
1102 const tcu::Vec2 texCoords[4] = in verifyTextureGatherResult()
1104 tcu::Vec2(texCoordArray[0], texCoordArray[1]), in verifyTextureGatherResult()
1105 tcu::Vec2(texCoordArray[2], texCoordArray[3]), in verifyTextureGatherResult()
1106 tcu::Vec2(texCoordArray[4], texCoordArray[5]), in verifyTextureGatherResult()
1107 tcu::Vec2(texCoordArray[6], texCoordArray[7]), in verifyTextureGatherResult()
1110 const tcu::PixelFormat pixelFormat = m_context.getRenderTarget().getPixelFormat(); in verifyTextureGatherResult()
1113 std::vector<tcu::ConstPixelBufferAccess> srcLevelStorage; in verifyTextureGatherResult()
1114 …const tcu::Texture2DView effectiveView = tcu::getEffectiveTextureView(m_texture->getRefTextur… in verifyTextureGatherResult()
1116 tcu::Surface reference (renderedFrame.getWidth(), renderedFrame.getHeight()); in verifyTextureGatherResult()
1117 tcu::Surface errorMask (renderedFrame.getWidth(), renderedFrame.getHeight()); in verifyTextureGatherResult()
1120 tcu::clear(errorMask.getAccess(), tcu::RGBA::green.toVec()); in verifyTextureGatherResult()
1125 …const tcu::Vec2 viewportCoord = (tcu::Vec2((float)px, (float)py) + tcu::Vec2(0.5f)) / tcu::Vec2(… in verifyTextureGatherResult()
1126 const tcu::Vec2 texCoord = triQuadInterpolate(texCoords, viewportCoord.x(), viewportCoord.y()); in verifyTextureGatherResult()
1127 …const tcu::Vec4 referenceValue = effectiveView.gatherOffsets(samplerParams.sampler, texCoord.x()… in verifyTextureGatherResult()
1128 …const tcu::Vec4 referencePixel = referenceValue * samplerParams.colorScale + samplerParams.color… in verifyTextureGatherResult()
1129 const tcu::Vec4 resultPixel = renderedFrame.getPixel(px, py); in verifyTextureGatherResult()
1130 …const tcu::Vec4 resultValue = (resultPixel - samplerParams.colorBias) / samplerParams.colorScal… in verifyTextureGatherResult()
1134 if (tcu::boolAny(tcu::logicalAnd(lookupPrecision.colorMask, in verifyTextureGatherResult()
1135 tcu::greaterThan(tcu::absDiff(resultPixel, referencePixel), in verifyTextureGatherResult()
1138 …if (!tcu::isGatherOffsetsResultValid(effectiveView, samplerParams.sampler, lookupPrecision, texCoo… in verifyTextureGatherResult()
1140 errorMask.setPixel(px, py, tcu::RGBA::red); in verifyTextureGatherResult()
1147 …estCtx.getLog() << tcu::TestLog::Message << "ERROR: Result verification failed, got " << numFailed… in verifyTextureGatherResult()
1148 m_testCtx.getLog() << tcu::TestLog::ImageSet("VerifyResult", "Verification result") in verifyTextureGatherResult()
1149 << tcu::TestLog::Image("Rendered", "Rendered image", renderedFrame); in verifyTextureGatherResult()
1152 m_testCtx.getLog() << tcu::TestLog::Image("Reference", "Ideal reference image", reference) in verifyTextureGatherResult()
1153 << tcu::TestLog::Image("ErrorMask", "Error mask", errorMask); in verifyTextureGatherResult()
1155 m_testCtx.getLog() << tcu::TestLog::EndImageSet; in verifyTextureGatherResult()
1160 bool TextureBorderClampTest::verifyTextureGatherCmpResult (const tcu::ConstPixelBufferAccess& ren… in verifyTextureGatherCmpResult()
1163 const tcu::TexComparePrecision& texComparePrecision, in verifyTextureGatherCmpResult()
1164 const tcu::TexComparePrecision& lowQualityTexComparePrecision) in verifyTextureGatherCmpResult()
1166 const tcu::Vec2 texCoords[4] = in verifyTextureGatherCmpResult()
1168 tcu::Vec2(texCoordArray[0], texCoordArray[1]), in verifyTextureGatherCmpResult()
1169 tcu::Vec2(texCoordArray[2], texCoordArray[3]), in verifyTextureGatherCmpResult()
1170 tcu::Vec2(texCoordArray[4], texCoordArray[5]), in verifyTextureGatherCmpResult()
1171 tcu::Vec2(texCoordArray[6], texCoordArray[7]), in verifyTextureGatherCmpResult()
1174 std::vector<tcu::ConstPixelBufferAccess> srcLevelStorage; in verifyTextureGatherCmpResult()
1175 …const tcu::Texture2DView effectiveView = tcu::getEffectiveTextureView(m_texture->getRefTextur… in verifyTextureGatherCmpResult()
1177 const tcu::PixelFormat pixelFormat = m_context.getRenderTarget().getPixelFormat(); in verifyTextureGatherCmpResult()
1178 const tcu::BVec4 colorMask = gls::TextureTestUtil::getCompareMask(pixelFormat); in verifyTextureGatherCmpResult()
1180 tcu::Surface reference (renderedFrame.getWidth(), renderedFrame.getHeight()); in verifyTextureGatherCmpResult()
1181 tcu::Surface errorMask (renderedFrame.getWidth(), renderedFrame.getHeight()); in verifyTextureGatherCmpResult()
1185 tcu::clear(errorMask.getAccess(), tcu::RGBA::green.toVec()); in verifyTextureGatherCmpResult()
1190 …const tcu::Vec2 viewportCoord = (tcu::Vec2((float)px, (float)py) + tcu::Vec2(0.5f)) / tcu::Vec2(… in verifyTextureGatherCmpResult()
1191 const tcu::Vec2 texCoord = triQuadInterpolate(texCoords, viewportCoord.x(), viewportCoord.y()); in verifyTextureGatherCmpResult()
1193 …const tcu::Vec4 referenceValue = effectiveView.gatherOffsetsCompare(samplerParams.sampler, refZ,… in verifyTextureGatherCmpResult()
1194 const tcu::Vec4 resultValue = renderedFrame.getPixel(px, py); in verifyTextureGatherCmpResult()
1198 if (tcu::boolAny(tcu::logicalAnd(colorMask, tcu::notEqual(referenceValue, resultValue)))) in verifyTextureGatherCmpResult()
1200 …if (!tcu::isGatherOffsetsCompareResultValid(effectiveView, samplerParams.sampler, texComparePrecis… in verifyTextureGatherCmpResult()
1205 …if (!tcu::isGatherOffsetsCompareResultValid(effectiveView, samplerParams.sampler, lowQualityTexCom… in verifyTextureGatherCmpResult()
1207 errorMask.setPixel(px, py, tcu::RGBA::red); in verifyTextureGatherCmpResult()
1215 …estCtx.getLog() << tcu::TestLog::Message << "ERROR: Result verification failed, got " << numFailed… in verifyTextureGatherCmpResult()
1218 …m_testCtx.getLog() << tcu::TestLog::Message << "Warning: Verification assuming high-quality PCF fi… in verifyTextureGatherCmpResult()
1222 m_testCtx.getLog() << tcu::TestLog::ImageSet("VerifyResult", "Verification result") in verifyTextureGatherCmpResult()
1223 << tcu::TestLog::Image("Rendered", "Rendered image", renderedFrame); in verifyTextureGatherCmpResult()
1226 m_testCtx.getLog() << tcu::TestLog::Image("Reference", "Ideal reference image", reference) in verifyTextureGatherCmpResult()
1227 << tcu::TestLog::Image("ErrorMask", "Error mask", errorMask); in verifyTextureGatherCmpResult()
1229 m_testCtx.getLog() << tcu::TestLog::EndImageSet; in verifyTextureGatherCmpResult()
1241 tcu::SeedBuilder builder; in getIterationSeed()
1252 …const tcu::TextureFormat texFormat = tcu::getEffectiveDepthStencilTextureFormat(m_texture->get… in genSamplerParams()
1257 …refParams.sampler.compare = (!m_useShadowSampler) ? (tcu::Sampler::COMPAREMODE_NONE) : (glu::map… in genSamplerParams()
1267 DE_ASSERT(refParams.sampler.compare == tcu::Sampler::COMPAREMODE_NONE); in genSamplerParams()
1275 DE_ASSERT(refParams.colorScale == tcu::Vec4(refParams.colorScale.x())); in genSamplerParams()
1276 DE_ASSERT(refParams.colorBias == tcu::Vec4(refParams.colorBias.x())); in genSamplerParams()
1306 case tcu::TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT: in genGatherProgram()
1307 case tcu::TEXTURECHANNELCLASS_SIGNED_FIXED_POINT: in genGatherProgram()
1308 case tcu::TEXTURECHANNELCLASS_FLOATING_POINT: in genGatherProgram()
1313 case tcu::TEXTURECHANNELCLASS_SIGNED_INTEGER: in genGatherProgram()
1318 case tcu::TEXTURECHANNELCLASS_UNSIGNED_INTEGER: in genGatherProgram()
1352 tcu::Sampler::DepthStencilMode mode,
1375 tcu::Sampler::DepthStencilMode mode, in TextureBorderClampFormatCase()
1399 const tcu::CompressedTexFormat compressedFormat = glu::mapGLCompressedTexFormat(texFormat); in TextureBorderClampFormatCase()
1400 const tcu::IVec3 blockPixelSize = tcu::getBlockPixelSize(compressedFormat); in TextureBorderClampFormatCase()
1417 …const tcu::TextureFormat texFormat = tcu::getEffectiveDepthStencilTextureFormat(getTexture()->ge… in init()
1418 const tcu::TextureFormatInfo texFormatInfo = tcu::getTextureFormatInfo(texFormat); in init()
1424 iteration.p0 = tcu::Vec2(-1.5f, -3.0f); in init()
1425 iteration.p1 = tcu::Vec2( 1.5f, 2.5f); in init()
1426 …iteration.borderColor = mapToFormatColorRepresentable(texFormat, tcu::Vec4(0.3f, 0.7f, 0.2f, 0.5f)… in init()
1431 iteration.p0 = tcu::Vec2(-0.5f, 0.75f); in init()
1432 iteration.p1 = tcu::Vec2(0.25f, 1.25f); in init()
1433 …iteration.borderColor = mapToFormatColorRepresentable(texFormat, tcu::Vec4(0.9f, 0.2f, 0.4f, 0.6f)… in init()
1444 iteration.lookupScale = tcu::Vec4(texFormatInfo.lookupScale.x()); in init()
1445 iteration.lookupBias = tcu::Vec4(texFormatInfo.lookupBias.x()); in init()
1479 tcu::Sampler::DepthStencilMode mode,
1496 tcu::Sampler::DepthStencilMode mode, in TextureBorderClampRangeClampCase()
1507 …const tcu::TextureFormat texFormat = tcu::getEffectiveDepthStencilTextureFormat(getTexture()->get… in init()
1509 const bool isFloat = m_channelClass == tcu::TEXTURECHANNELCLASS_FLOATING_POINT; in init()
1510 …st bool isFixed = m_channelClass == tcu::TEXTURECHANNELCLASS_SIGNED_FIXED_POINT || m_channel… in init()
1511 … bool isPureInteger = m_channelClass == tcu::TEXTURECHANNELCLASS_SIGNED_INTEGER || m_channelCl… in init()
1518 iteration.p0 = tcu::Vec2(-1.2f, -3.0f); in init()
1519 iteration.p1 = tcu::Vec2( 1.2f, 2.5f); in init()
1520 iteration.borderColor = rr::GenericVec4(tcu::Vec4(std::numeric_limits<float>::infinity())); in init()
1521 …iteration.lookupScale = tcu::Vec4(0.5f); // scale & bias to [0.25, 0.5] range to make out-of-range… in init()
1522 iteration.lookupBias = tcu::Vec4(0.25f); in init()
1528 iteration.p0 = tcu::Vec2(-0.25f, -0.75f); in init()
1529 iteration.p1 = tcu::Vec2( 2.25f, 1.25f); in init()
1530 iteration.borderColor = rr::GenericVec4(tcu::Vec4(-std::numeric_limits<float>::infinity())); in init()
1531 iteration.lookupScale = tcu::Vec4(0.5f); in init()
1532 iteration.lookupBias = tcu::Vec4(0.25f); in init()
1539 const tcu::IVec4 numBits = tcu::getTextureFormatBitDepth(texFormat); in init()
1540 const bool isSigned = m_channelClass == tcu::TEXTURECHANNELCLASS_SIGNED_INTEGER; in init()
1546 const tcu::IVec4 minValue = getNBitIntegerVec4MinValue(isSigned, numBits); in init()
1547 const tcu::IVec4 maxValue = getNBitIntegerVec4MaxValue(isSigned, numBits); in init()
1548 const tcu::IVec4 valueRange = maxValue - minValue; in init()
1549 const tcu::IVec4 divSafeRange ((valueRange[0]==0) ? (1) : (valueRange[0]), in init()
1556 const tcu::IVec4 value = maxValue + tcu::IVec4(1); in init()
1559 iteration.p0 = tcu::Vec2(-1.2f, -3.0f); in init()
1560 iteration.p1 = tcu::Vec2( 1.2f, 2.5f); in init()
1562 iteration.lookupScale = tcu::Vec4(0.5f) / divSafeRange.cast<float>(); in init()
1563 iteration.lookupBias = (isSigned) ? (tcu::Vec4(0.5f)) : (tcu::Vec4(0.25f)); in init()
1570 const tcu::IVec4 value = minValue - tcu::IVec4(1); in init()
1573 iteration.p0 = tcu::Vec2(-0.25f, -0.75f); in init()
1574 iteration.p1 = tcu::Vec2( 2.25f, 1.25f); in init()
1576 iteration.lookupScale = tcu::Vec4(0.5f) / divSafeRange.cast<float>(); in init()
1577 iteration.lookupBias = tcu::Vec4(0.5f); in init()
1583 …const tcu::IVec4 value = (isSigned) ? (tcu::IVec4(std::numeric_limits<deInt32>::max())) : (tcu::IV… in init()
1586 iteration.p0 = tcu::Vec2(-1.6f, -2.1f); in init()
1587 iteration.p1 = tcu::Vec2( 1.2f, 3.5f); in init()
1589 iteration.lookupScale = tcu::Vec4(0.5f) / divSafeRange.cast<float>(); in init()
1590 iteration.lookupBias = tcu::Vec4(0.25f); in init()
1597 const tcu::IVec4 value = tcu::IVec4(std::numeric_limits<deInt32>::min()); in init()
1600 iteration.p0 = tcu::Vec2(-2.6f, -4.0f); in init()
1601 iteration.p1 = tcu::Vec2( 1.1f, 1.5f); in init()
1603 iteration.lookupScale = tcu::Vec4(0.5f) / divSafeRange.cast<float>(); in init()
1604 iteration.lookupBias = tcu::Vec4(0.25f); in init()
1611 const bool isSigned = m_channelClass == tcu::TEXTURECHANNELCLASS_SIGNED_FIXED_POINT;; in init()
1612 …const tcu::Vec4 lookupBias = (isSigned) ? (tcu::Vec4(0.5f)) : (tcu::Vec4(0.25f)); // scale & bi… in init()
1613 const tcu::Vec4 lookupScale = (isSigned) ? (tcu::Vec4(0.25f)) : (tcu::Vec4(0.5f)); in init()
1617 iteration.p0 = tcu::Vec2(-1.2f, -3.0f); in init()
1618 iteration.p1 = tcu::Vec2( 1.2f, 2.5f); in init()
1619 iteration.borderColor = mapToFormatColorUnits(texFormat, tcu::Vec4(1.1f, 1.3f, 2.2f, 1.3f)); in init()
1627 iteration.p0 = tcu::Vec2(-0.25f, -0.75f); in init()
1628 iteration.p1 = tcu::Vec2( 2.25f, 1.25f); in init()
1629 iteration.borderColor = mapToFormatColorUnits(texFormat, tcu::Vec4(-0.2f, -0.9f, -2.4f, -0.6f)); in init()
1670 tcu::Sampler::DepthStencilMode mode,
1694 tcu::Sampler::DepthStencilMode mode, in TextureBorderClampPerAxisCase2D()
1720 …const tcu::TextureFormat texFormat = tcu::getEffectiveDepthStencilTextureFormat(getTexture()->ge… in init()
1721 const tcu::TextureFormatInfo texFormatInfo = tcu::getTextureFormatInfo(texFormat); in init()
1724 iteration.p0 = tcu::Vec2(-0.25f, -0.75f); in init()
1725 iteration.p1 = tcu::Vec2( 2.25f, 1.25f); in init()
1726 …iteration.borderColor = mapToFormatColorRepresentable(texFormat, tcu::Vec4(0.4f, 0.9f, 0.1f, 0.2f)… in init()
1730 iteration.lookupScale = tcu::Vec4(texFormatInfo.lookupScale.x()); in init()
1731 iteration.lookupBias = tcu::Vec4(texFormatInfo.lookupBias.x()); in init()
1791 tcu::Sampler::MODE_DEPTH, in TextureBorderClampDepthCompareCase()
1808 iteration.p0 = tcu::Vec2(-0.15f, -0.35f); in init()
1809 iteration.p1 = tcu::Vec2( 1.25f, 1.1f); in init()
1810 iteration.borderColor = rr::GenericVec4(tcu::Vec4(0.7f, 0.0f, 0.0f, 0.0f)); in init()
1820 iteration.p0 = tcu::Vec2(-0.15f, -0.35f); in init()
1821 iteration.p1 = tcu::Vec2( 1.25f, 1.1f); in init()
1822 iteration.borderColor = rr::GenericVec4(tcu::Vec4(1.5f, 0.0f, 0.0f, 0.0f)); in init()
1832 iteration.p0 = tcu::Vec2(-0.15f, -0.35f); in init()
1833 iteration.p1 = tcu::Vec2( 1.25f, 1.1f); in init()
1834 iteration.borderColor = rr::GenericVec4(tcu::Vec4(-0.5f, 0.0f, 0.0f, 0.0f)); in init()
1844 iteration.p0 = tcu::Vec2(-0.15f, -0.35f); in init()
1845 iteration.p1 = tcu::Vec2( 1.25f, 1.1f); in init()
1846 …iteration.borderColor = rr::GenericVec4(tcu::Vec4(std::numeric_limits<float>::infinity(), 0.0f, 0.… in init()
1856 iteration.p0 = tcu::Vec2(-0.15f, -0.35f); in init()
1857 iteration.p1 = tcu::Vec2( 1.25f, 1.1f); in init()
1858 …iteration.borderColor = rr::GenericVec4(tcu::Vec4(-std::numeric_limits<float>::infinity(), 0.0f, 0… in init()
1870 iteration.lookupScale = tcu::Vec4(1.0); in init()
1871 iteration.lookupBias = tcu::Vec4(0.0); in init()
1896 tcu::Sampler::DepthStencilMode depthStencilMode);
1911 tcu::Sampler::DepthStencilMode depthStencilMode) in TextureBorderClampUnusedChannelCase()
1924 …const rr::GenericVec4& trueComponents, const rr::GenericVec4& falseComponents, const tcu::BVec4& m) in selectComponents()
1926 …return rr::GenericVec4(tcu::select(trueComponents.get<deUint32>(), falseComponents.get<deUint32>()… in selectComponents()
1934 …const tcu::TextureFormat texFormat = tcu::getEffectiveDepthStencilTextureFormat(getTexture()->g… in init()
1935 const tcu::TextureFormatInfo texFormatInfo = tcu::getTextureFormatInfo(texFormat); in init()
1936 const tcu::BVec4 channelMask = tcu::getTextureFormatChannelMask(texFormat); in init()
1942 …const rr::GenericVec4 effectiveColors = mapToFormatColorRepresentable(texFormat, tcu::Vec4(0.6f… in init()
1947 case tcu::TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT: in init()
1948 case tcu::TEXTURECHANNELCLASS_SIGNED_FIXED_POINT: in init()
1949 case tcu::TEXTURECHANNELCLASS_FLOATING_POINT: in init()
1950 nonEffectiveColors = rr::GenericVec4(tcu::Vec4(maxChannelValue * 0.8f)); in init()
1953 case tcu::TEXTURECHANNELCLASS_SIGNED_INTEGER: in init()
1954 nonEffectiveColors = rr::GenericVec4(tcu::Vec4(maxChannelValue * 0.8f).cast<deInt32>()); in init()
1957 case tcu::TEXTURECHANNELCLASS_UNSIGNED_INTEGER: in init()
1958 nonEffectiveColors = rr::GenericVec4(tcu::Vec4(maxChannelValue * 0.8f).cast<deUint32>()); in init()
1965 iteration.p0 = tcu::Vec2(-0.25f, -0.75f); in init()
1966 iteration.p1 = tcu::Vec2( 2.25f, 1.25f); in init()
2009 void renderTo (tcu::Surface& surface,
2014 void verifyImage (const tcu::Surface& image,
2027 const tcu::TextureChannelClass m_channelClass;
2028 const tcu::IVec3 m_size;
2039 tcu::Vec4 m_lookupScale;
2040 tcu::Vec4 m_lookupBias;
2054 , m_channelClass (getFormatChannelClass(texFormat, tcu::Sampler::MODE_LAST)) in TextureBorderClampPerAxisCase3D()
2055 , m_size ((size == SIZE_POT) ? (tcu::IVec3(8, 16, 4)) : (tcu::IVec3(13, 5, 7))) in TextureBorderClampPerAxisCase3D()
2066 throw tcu::NotSupportedError("Test requires GL_EXT_texture_border_clamp extension"); in init()
2069 tcu::isAstcFormat(glu::mapGLCompressedTexFormat(m_texFormat)) && in init()
2072 throw tcu::NotSupportedError("Test requires GL_KHR_texture_compression_astc_ldr extension"); in init()
2075 throw tcu::NotSupportedError("Test requires GL_EXT_texture_format_BGRA8888 extension"); in init()
2079 …throw tcu::NotSupportedError("Test requires " + de::toString<int>(VIEWPORT_WIDTH) + "x" + de::toSt… in init()
2087 m_testCtx.getLog() << tcu::TestLog::Message in init()
2090 << tcu::TestLog::EndMessage; in init()
2094 m_testCtx.getLog() << tcu::TestLog::Message in init()
2096 << tcu::TestLog::EndMessage; in init()
2108 const tcu::TextureFormat texFormat = m_texture->getRefTexture().getFormat(); in init()
2109 const tcu::TextureFormatInfo texFormatInfo = tcu::getTextureFormatInfo(texFormat); in init()
2111 m_borderColor = mapToFormatColorRepresentable(texFormat, tcu::Vec4(0.2f, 0.6f, 0.9f, 0.4f)); in init()
2126 tcu::Surface renderedFrame (VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in iterate()
2138 …const std::string borderColorString = (m_channelClass == tcu::TEXTURECHANNELCLASS_SIGNED_INTEGER) … in logParams()
2139 …: (m_channelClass == tcu::TEXTURECHANNELCLASS_UNSIGNED_INTEGER) ? (de::toString(m_borderColor.get<… in logParams()
2142 m_testCtx.getLog() << tcu::TestLog::Message in logParams()
2150 << tcu::TestLog::EndMessage; in logParams()
2153 void TextureBorderClampPerAxisCase3D::renderTo (tcu::Surface& surface, in renderTo()
2172 case tcu::TEXTURECHANNELCLASS_SIGNED_FIXED_POINT: in renderTo()
2173 case tcu::TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT: in renderTo()
2174 case tcu::TEXTURECHANNELCLASS_FLOATING_POINT: in renderTo()
2178 case tcu::TEXTURECHANNELCLASS_SIGNED_INTEGER: in renderTo()
2182 case tcu::TEXTURECHANNELCLASS_UNSIGNED_INTEGER: in renderTo()
2197 void TextureBorderClampPerAxisCase3D::verifyImage (const tcu::Surface& renderedFrame, in verifyImage()
2200 const tcu::PixelFormat pixelFormat = m_context.getRenderTarget().getPixelFormat(); in verifyImage()
2202 …const tcu::IVec4 colorBits = tcu::max(gls::TextureTestUtil::getBitsVec(pixelFormat) - tcu::IV… in verifyImage()
2203 tcu::Surface reference (renderedFrame.getWidth(), renderedFrame.getHeight()); in verifyImage()
2204 tcu::Surface errorMask (renderedFrame.getWidth(), renderedFrame.getHeight()); in verifyImage()
2205 tcu::LodPrecision lodPrecision; in verifyImage()
2206 tcu::LookupPrecision lookupPrecision; in verifyImage()
2212 …lookupPrecision.colorThreshold = tcu::computeFixedPointThreshold(colorBits) / samplerParams.colorS… in verifyImage()
2213 lookupPrecision.coordBits = tcu::IVec3(20,20,0); in verifyImage()
2214 lookupPrecision.uvwBits = tcu::IVec3(5,5,0); in verifyImage()
2223 …estCtx.getLog() << tcu::TestLog::Message << "ERROR: Result verification failed, got " << numFailed… in verifyImage()
2224 m_testCtx.getLog() << tcu::TestLog::ImageSet("VerifyResult", "Verification result") in verifyImage()
2225 << tcu::TestLog::Image("Rendered", "Rendered image", renderedFrame); in verifyImage()
2228 m_testCtx.getLog() << tcu::TestLog::Image("Reference", "Ideal reference image", reference) in verifyImage()
2229 << tcu::TestLog::Image("ErrorMask", "Error mask", errorMask); in verifyImage()
2231 m_testCtx.getLog() << tcu::TestLog::EndImageSet; in verifyImage()
2241 const tcu::TextureFormat texFormat = m_texture->getRefTexture().getFormat(); in getSamplerParams()
2256 tcu::SeedBuilder builder; in getCaseSeed()
2300 tcu::Sampler::DepthStencilMode mode; in init()
2303 { "luminance", GL_LUMINANCE, tcu::Sampler::MODE_LAST }, in init()
2304 { "alpha", GL_ALPHA, tcu::Sampler::MODE_LAST }, in init()
2305 { "luminance_alpha", GL_LUMINANCE_ALPHA, tcu::Sampler::MODE_LAST }, in init()
2306 { "bgra", GL_BGRA, tcu::Sampler::MODE_LAST }, in init()
2307 { "r8", GL_R8, tcu::Sampler::MODE_LAST }, in init()
2308 { "r8_snorm", GL_R8_SNORM, tcu::Sampler::MODE_LAST }, in init()
2309 { "rg8", GL_RG8, tcu::Sampler::MODE_LAST }, in init()
2310 { "rg8_snorm", GL_RG8_SNORM, tcu::Sampler::MODE_LAST }, in init()
2311 { "rgb8", GL_RGB8, tcu::Sampler::MODE_LAST }, in init()
2312 { "rgb8_snorm", GL_RGB8_SNORM, tcu::Sampler::MODE_LAST }, in init()
2313 { "rgb565", GL_RGB565, tcu::Sampler::MODE_LAST }, in init()
2314 { "rgba4", GL_RGBA4, tcu::Sampler::MODE_LAST }, in init()
2315 { "rgb5_a1", GL_RGB5_A1, tcu::Sampler::MODE_LAST }, in init()
2316 { "rgba8", GL_RGBA8, tcu::Sampler::MODE_LAST }, in init()
2317 { "rgba8_snorm", GL_RGBA8_SNORM, tcu::Sampler::MODE_LAST }, in init()
2318 { "rgb10_a2", GL_RGB10_A2, tcu::Sampler::MODE_LAST }, in init()
2319 { "rgb10_a2ui", GL_RGB10_A2UI, tcu::Sampler::MODE_LAST }, in init()
2320 { "srgb8", GL_SRGB8, tcu::Sampler::MODE_LAST }, in init()
2321 { "srgb8_alpha8", GL_SRGB8_ALPHA8, tcu::Sampler::MODE_LAST }, in init()
2322 { "r16f", GL_R16F, tcu::Sampler::MODE_LAST }, in init()
2323 { "rg16f", GL_RG16F, tcu::Sampler::MODE_LAST }, in init()
2324 { "rgb16f", GL_RGB16F, tcu::Sampler::MODE_LAST }, in init()
2325 { "rgba16f", GL_RGBA16F, tcu::Sampler::MODE_LAST }, in init()
2326 { "r32f", GL_R32F, tcu::Sampler::MODE_LAST }, in init()
2327 { "rg32f", GL_RG32F, tcu::Sampler::MODE_LAST }, in init()
2328 { "rgb32f", GL_RGB32F, tcu::Sampler::MODE_LAST }, in init()
2329 { "rgba32f", GL_RGBA32F, tcu::Sampler::MODE_LAST }, in init()
2330 { "r11f_g11f_b10f", GL_R11F_G11F_B10F, tcu::Sampler::MODE_LAST }, in init()
2331 { "rgb9_e5", GL_RGB9_E5, tcu::Sampler::MODE_LAST }, in init()
2332 { "r8i", GL_R8I, tcu::Sampler::MODE_LAST }, in init()
2333 { "r8ui", GL_R8UI, tcu::Sampler::MODE_LAST }, in init()
2334 { "r16i", GL_R16I, tcu::Sampler::MODE_LAST }, in init()
2335 { "r16ui", GL_R16UI, tcu::Sampler::MODE_LAST }, in init()
2336 { "r32i", GL_R32I, tcu::Sampler::MODE_LAST }, in init()
2337 { "r32ui", GL_R32UI, tcu::Sampler::MODE_LAST }, in init()
2338 { "rg8i", GL_RG8I, tcu::Sampler::MODE_LAST }, in init()
2339 { "rg8ui", GL_RG8UI, tcu::Sampler::MODE_LAST }, in init()
2340 { "rg16i", GL_RG16I, tcu::Sampler::MODE_LAST }, in init()
2341 { "rg16ui", GL_RG16UI, tcu::Sampler::MODE_LAST }, in init()
2342 { "rg32i", GL_RG32I, tcu::Sampler::MODE_LAST }, in init()
2343 { "rg32ui", GL_RG32UI, tcu::Sampler::MODE_LAST }, in init()
2344 { "rgb8i", GL_RGB8I, tcu::Sampler::MODE_LAST }, in init()
2345 { "rgb8ui", GL_RGB8UI, tcu::Sampler::MODE_LAST }, in init()
2346 { "rgb16i", GL_RGB16I, tcu::Sampler::MODE_LAST }, in init()
2347 { "rgb16ui", GL_RGB16UI, tcu::Sampler::MODE_LAST }, in init()
2348 { "rgb32i", GL_RGB32I, tcu::Sampler::MODE_LAST }, in init()
2349 { "rgb32ui", GL_RGB32UI, tcu::Sampler::MODE_LAST }, in init()
2350 { "rgba8i", GL_RGBA8I, tcu::Sampler::MODE_LAST }, in init()
2351 { "rgba8ui", GL_RGBA8UI, tcu::Sampler::MODE_LAST }, in init()
2352 { "rgba16i", GL_RGBA16I, tcu::Sampler::MODE_LAST }, in init()
2353 { "rgba16ui", GL_RGBA16UI, tcu::Sampler::MODE_LAST }, in init()
2354 { "rgba32i", GL_RGBA32I, tcu::Sampler::MODE_LAST }, in init()
2355 { "rgba32ui", GL_RGBA32UI, tcu::Sampler::MODE_LAST }, in init()
2356 { "depth_component16", GL_DEPTH_COMPONENT16, tcu::Sampler::MODE_DEPTH }, in init()
2357 { "depth_component24", GL_DEPTH_COMPONENT24, tcu::Sampler::MODE_DEPTH }, in init()
2358 { "depth_component32f", GL_DEPTH_COMPONENT32F, tcu::Sampler::MODE_DEPTH }, in init()
2359 { "stencil_index8", GL_STENCIL_INDEX8, tcu::Sampler::MODE_STENCIL }, in init()
2360 { "depth24_stencil8_sample_depth", GL_DEPTH24_STENCIL8, tcu::Sampler::MODE_DEPTH }, in init()
2361 { "depth32f_stencil8_sample_depth", GL_DEPTH32F_STENCIL8, tcu::Sampler::MODE_DEPTH }, in init()
2362 { "depth24_stencil8_sample_stencil", GL_DEPTH24_STENCIL8, tcu::Sampler::MODE_STENCIL }, in init()
2363 { "depth32f_stencil8_sample_stencil", GL_DEPTH32F_STENCIL8, tcu::Sampler::MODE_STENCIL }, in init()
2364 { "compressed_r11_eac", GL_COMPRESSED_R11_EAC, tcu::Sampler::MODE_LAST }, in init()
2365 { "compressed_signed_r11_eac", GL_COMPRESSED_SIGNED_R11_EAC, tcu::Sampler::MODE_LAST }, in init()
2366 { "compressed_rg11_eac", GL_COMPRESSED_RG11_EAC, tcu::Sampler::MODE_LAST }, in init()
2367 … { "compressed_signed_rg11_eac", GL_COMPRESSED_SIGNED_RG11_EAC, tcu::Sampler::MODE_LAST }, in init()
2368 { "compressed_rgb8_etc2", GL_COMPRESSED_RGB8_ETC2, tcu::Sampler::MODE_LAST }, in init()
2369 { "compressed_srgb8_etc2", GL_COMPRESSED_SRGB8_ETC2, tcu::Sampler::MODE_LAST }, in init()
2370 …{ "compressed_rgb8_punchthrough_alpha1_etc2", GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, tcu::Sa… in init()
2371 …{ "compressed_srgb8_punchthrough_alpha1_etc2", GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, tcu::… in init()
2372 { "compressed_rgba8_etc2_eac", GL_COMPRESSED_RGBA8_ETC2_EAC, tcu::Sampler::MODE_LAST }, in init()
2373 …{ "compressed_srgb8_alpha8_etc2_eac", GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, tcu::Sampler::MODE_… in init()
2376 …tcu::TestCaseGroup* const formatsGroup = new tcu::TestCaseGroup(m_testCtx, "formats", "Format test… in init()
2383 const tcu::Sampler::DepthStencilMode sampleMode = formats[formatNdx].mode; in init()
2386 …tcu::TestCaseGroup* const formatGroup = new tcu::TestCaseGroup(m_testCtx, formats[formatNdx].n… in init()
2431 tcu::Sampler::DepthStencilMode mode; in init()
2434 { "unorm_color", GL_R8, tcu::Sampler::MODE_LAST }, in init()
2435 { "snorm_color", GL_R8_SNORM, tcu::Sampler::MODE_LAST }, in init()
2436 { "float_color", GL_RG32F, tcu::Sampler::MODE_LAST }, in init()
2437 { "int_color", GL_R8I, tcu::Sampler::MODE_LAST }, in init()
2438 { "uint_color", GL_R16UI, tcu::Sampler::MODE_LAST }, in init()
2439 { "srgb_color", GL_SRGB8_ALPHA8, tcu::Sampler::MODE_LAST }, in init()
2440 { "unorm_depth", GL_DEPTH_COMPONENT24, tcu::Sampler::MODE_DEPTH }, in init()
2441 { "float_depth", GL_DEPTH_COMPONENT32F, tcu::Sampler::MODE_DEPTH }, in init()
2442 { "uint_stencil", GL_STENCIL_INDEX8, tcu::Sampler::MODE_STENCIL }, in init()
2443 { "float_depth_uint_stencil_sample_depth", GL_DEPTH32F_STENCIL8, tcu::Sampler::MODE_DEPTH }, in init()
2444 { "float_depth_uint_stencil_sample_stencil", GL_DEPTH32F_STENCIL8, tcu::Sampler::MODE_STENCIL }, in init()
2445 { "unorm_depth_uint_stencil_sample_depth", GL_DEPTH24_STENCIL8, tcu::Sampler::MODE_DEPTH }, in init()
2446 { "unorm_depth_uint_stencil_sample_stencil", GL_DEPTH24_STENCIL8, tcu::Sampler::MODE_STENCIL }, in init()
2447 { "compressed_color", GL_COMPRESSED_RG11_EAC, tcu::Sampler::MODE_LAST }, in init()
2450 …tcu::TestCaseGroup* const rangeClampGroup = new tcu::TestCaseGroup(m_testCtx, "range_clamp", "Rang… in init()
2457 const tcu::Sampler::DepthStencilMode sampleMode = formats[formatNdx].mode; in init()
2476 tcu::Sampler::DepthStencilMode mode; in init()
2479 { "unorm_color", GL_R8, tcu::Sampler::MODE_LAST }, in init()
2480 { "snorm_color", GL_R8_SNORM, tcu::Sampler::MODE_LAST }, in init()
2481 { "float_color", GL_RG32F, tcu::Sampler::MODE_LAST }, in init()
2482 { "int_color", GL_R8I, tcu::Sampler::MODE_LAST }, in init()
2483 { "uint_color", GL_R16UI, tcu::Sampler::MODE_LAST }, in init()
2484 { "unorm_depth", GL_DEPTH_COMPONENT24, tcu::Sampler::MODE_DEPTH }, in init()
2485 { "float_depth", GL_DEPTH_COMPONENT32F, tcu::Sampler::MODE_DEPTH }, in init()
2486 { "uint_stencil", GL_STENCIL_INDEX8, tcu::Sampler::MODE_STENCIL }, in init()
2487 { "compressed_color", GL_COMPRESSED_RG11_EAC, tcu::Sampler::MODE_LAST }, in init()
2490 …tcu::TestCaseGroup* const samplerGroup = new tcu::TestCaseGroup(m_testCtx, "sampler", "Sampler par… in init()
2496 const tcu::Sampler::DepthStencilMode sampleMode = formats[formatNdx].mode; in init()
2526 tcu::Sampler::DepthStencilMode mode; in init()
2530 { "unorm_color", GL_RG8, tcu::Sampler::MODE_LAST, true }, in init()
2531 { "snorm_color", GL_RG8_SNORM, tcu::Sampler::MODE_LAST, true }, in init()
2532 { "float_color", GL_R32F, tcu::Sampler::MODE_LAST, true }, in init()
2533 { "int_color", GL_RG16I, tcu::Sampler::MODE_LAST, true }, in init()
2534 { "uint_color", GL_R8UI, tcu::Sampler::MODE_LAST, true }, in init()
2535 { "unorm_depth", GL_DEPTH_COMPONENT16, tcu::Sampler::MODE_DEPTH, false }, in init()
2536 { "float_depth", GL_DEPTH32F_STENCIL8, tcu::Sampler::MODE_DEPTH, false }, in init()
2537 { "uint_stencil", GL_DEPTH32F_STENCIL8, tcu::Sampler::MODE_STENCIL, false }, in init()
2538 { "compressed_color", GL_COMPRESSED_RGB8_ETC2, tcu::Sampler::MODE_LAST, false }, in init()
2561 …tcu::TestCaseGroup* const perAxisGroup = new tcu::TestCaseGroup(m_testCtx, "per_axis_wrap_mode", "… in init()
2567 …tcu::TestCaseGroup* const targetGroup = new tcu::TestCaseGroup(m_testCtx, targets[targetNdx].name,… in init()
2578 const tcu::Sampler::DepthStencilMode sampleMode = formats[formatNdx].mode; in init()
2580 …tcu::TestCaseGroup* const formatGroup = new tcu::TestCaseGroup(m_testCtx, formats[formatNdx].n… in init()
2602 …tcu::TestCaseGroup* const filteringGroup = new tcu::TestCaseGroup(m_testCtx, s_filters[filterNdx].… in init()
2632 DE_ASSERT(sampleMode == tcu::Sampler::MODE_LAST); in init()
2667 …tcu::TestCaseGroup* const compareGroup = new tcu::TestCaseGroup(m_testCtx, "depth_compare_mode", "… in init()
2673 …tcu::TestCaseGroup* const formatGroup = new tcu::TestCaseGroup(m_testCtx, formats[formatNdx].n… in init()
2704 tcu::Sampler::DepthStencilMode mode; in init()
2707 { "r8", GL_R8, tcu::Sampler::MODE_LAST }, in init()
2708 { "rg8_snorm", GL_RG8_SNORM, tcu::Sampler::MODE_LAST }, in init()
2709 { "rgb8", GL_RGB8, tcu::Sampler::MODE_LAST }, in init()
2710 { "rg32f", GL_RG32F, tcu::Sampler::MODE_LAST }, in init()
2711 { "r16i", GL_RG16I, tcu::Sampler::MODE_LAST }, in init()
2712 { "luminance", GL_LUMINANCE, tcu::Sampler::MODE_LAST }, in init()
2713 { "alpha", GL_ALPHA, tcu::Sampler::MODE_LAST }, in init()
2714 { "luminance_alpha", GL_LUMINANCE_ALPHA, tcu::Sampler::MODE_LAST }, in init()
2715 { "depth_component16", GL_DEPTH_COMPONENT16, tcu::Sampler::MODE_DEPTH }, in init()
2716 { "depth_component32f", GL_DEPTH_COMPONENT32F, tcu::Sampler::MODE_DEPTH }, in init()
2717 { "stencil_index8", GL_STENCIL_INDEX8, tcu::Sampler::MODE_STENCIL }, in init()
2718 { "depth32f_stencil8_sample_depth", GL_DEPTH32F_STENCIL8, tcu::Sampler::MODE_DEPTH }, in init()
2719 { "depth32f_stencil8_sample_stencil", GL_DEPTH32F_STENCIL8, tcu::Sampler::MODE_STENCIL }, in init()
2720 { "depth24_stencil8_sample_depth", GL_DEPTH24_STENCIL8, tcu::Sampler::MODE_DEPTH }, in init()
2721 { "depth24_stencil8_sample_stencil", GL_DEPTH24_STENCIL8, tcu::Sampler::MODE_STENCIL }, in init()
2722 { "compressed_r11_eac", GL_COMPRESSED_R11_EAC, tcu::Sampler::MODE_LAST }, in init()
2725 …tcu::TestCaseGroup* const unusedGroup = new tcu::TestCaseGroup(m_testCtx, "unused_channels", "Test… in init()