• Home
  • Raw
  • Download

Lines Matching refs:tcu

57 using tcu::TestLog;
65 throw tcu::NotSupportedError(string(extName) + " not supported"); in checkExtensionSupport()
122 tcu::TextureFormat getReadPixelFormat (const tcu::TextureFormat& format) in getReadPixelFormat()
124 switch (tcu::getTextureChannelClass(format.type)) in getReadPixelFormat()
126 case tcu::TEXTURECHANNELCLASS_UNSIGNED_INTEGER: in getReadPixelFormat()
127 return tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::UNSIGNED_INT32); in getReadPixelFormat()
129 case tcu::TEXTURECHANNELCLASS_SIGNED_INTEGER: in getReadPixelFormat()
130 return tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::SIGNED_INT32); in getReadPixelFormat()
132 case tcu::TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT: in getReadPixelFormat()
133 case tcu::TEXTURECHANNELCLASS_SIGNED_FIXED_POINT: in getReadPixelFormat()
134 return tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::UNORM_INT8); in getReadPixelFormat()
136 case tcu::TEXTURECHANNELCLASS_FLOATING_POINT: in getReadPixelFormat()
137 return tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::FLOAT); in getReadPixelFormat()
141 return tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::UNORM_INT8); in getReadPixelFormat()
145 tcu::Vec4 getFixedPointFormatThreshold (const tcu::TextureFormat& sourceFormat, const tcu::TextureF… in getFixedPointFormatThreshold()
147 …DE_ASSERT(tcu::getTextureChannelClass(sourceFormat.type) != tcu::TEXTURECHANNELCLASS_FLOATING_POIN… in getFixedPointFormatThreshold()
148 …DE_ASSERT(tcu::getTextureChannelClass(readPixelsFormat.type) != tcu::TEXTURECHANNELCLASS_FLOATING_… in getFixedPointFormatThreshold()
150 …DE_ASSERT(tcu::getTextureChannelClass(sourceFormat.type) != tcu::TEXTURECHANNELCLASS_SIGNED_INTEGE… in getFixedPointFormatThreshold()
151 …DE_ASSERT(tcu::getTextureChannelClass(readPixelsFormat.type) != tcu::TEXTURECHANNELCLASS_SIGNED_IN… in getFixedPointFormatThreshold()
153 …DE_ASSERT(tcu::getTextureChannelClass(sourceFormat.type) != tcu::TEXTURECHANNELCLASS_UNSIGNED_INTE… in getFixedPointFormatThreshold()
154 …DE_ASSERT(tcu::getTextureChannelClass(readPixelsFormat.type) != tcu::TEXTURECHANNELCLASS_UNSIGNED_… in getFixedPointFormatThreshold()
156 const tcu::IVec4 srcBits = tcu::getTextureFormatBitDepth(sourceFormat); in getFixedPointFormatThreshold()
157 const tcu::IVec4 readBits = tcu::getTextureFormatBitDepth(readPixelsFormat); in getFixedPointFormatThreshold()
159 …return tcu::Vec4(3.0f) / ((tcu::Vector<deUint64, 4>(1) << (tcu::min(srcBits, readBits).cast<deUint… in getFixedPointFormatThreshold()
162 tcu::UVec4 getFloatULPThreshold (const tcu::TextureFormat& sourceFormat, const tcu::TextureFormat& … in getFloatULPThreshold()
164 const tcu::IVec4 srcMantissaBits = tcu::getTextureFormatMantissaBitDepth(sourceFormat); in getFloatULPThreshold()
165 const tcu::IVec4 readMantissaBits = tcu::getTextureFormatMantissaBitDepth(readPixelsFormat); in getFloatULPThreshold()
166 tcu::IVec4 ULPDiff(0); in getFloatULPThreshold()
172 return tcu::UVec4(4) * (tcu::UVec4(1) << (ULPDiff.cast<deUint32>())); in getFloatULPThreshold()
188 static std::string getColorOutputType(tcu::TextureFormat format) in getColorOutputType()
190 switch (tcu::getTextureChannelClass(format.type)) in getColorOutputType()
192 case tcu::TEXTURECHANNELCLASS_UNSIGNED_INTEGER: return "uvec4"; in getColorOutputType()
193 case tcu::TEXTURECHANNELCLASS_SIGNED_INTEGER: return "ivec4"; in getColorOutputType()
194 case tcu::TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT: in getColorOutputType()
195 case tcu::TEXTURECHANNELCLASS_SIGNED_FIXED_POINT: in getColorOutputType()
196 case tcu::TEXTURECHANNELCLASS_FLOATING_POINT: return "vec4"; in getColorOutputType()
247 throw tcu::NotSupportedError("Format not supported"); in checkFormatSupport()
250 tcu::Vec4 scaleColorValue (tcu::TextureFormat format, const tcu::Vec4& color) in scaleColorValue()
252 const tcu::TextureFormatInfo fmtInfo = tcu::getTextureFormatInfo(format); in scaleColorValue()
253 const tcu::Vec4 cScale = fmtInfo.valueMax-fmtInfo.valueMin; in scaleColorValue()
254 const tcu::Vec4 cBias = fmtInfo.valueMin; in scaleColorValue()
256 return tcu::RGBA(color).toVec() * cScale + cBias; in scaleColorValue()
274 void genFramebufferWithTexture (const tcu::Vec4& color);
275 void genAttachementTexture (const tcu::Vec4& color);
276 void genUniformColor (const tcu::Vec4& color);
279 …ifyRenderbuffer (TestLog& log, const tcu::TextureFormat& format, const tcu::TextureLevel& refer…
288 tcu::TextureFormat m_texFmt;
389 void FramebufferFetchTestCase::genFramebufferWithTexture (const tcu::Vec4& color) in genFramebufferWithTexture()
401 void FramebufferFetchTestCase::genAttachementTexture (const tcu::Vec4& color) in genAttachementTexture()
403tcu::TextureLevel data (glu::mapGLTransferFormat(m_transferFmt.format, m_transferFmt.dataTyp… in genAttachementTexture()
404 tcu::TextureChannelClass textureChannelClass = tcu::getTextureChannelClass(m_texFmt.type); in genAttachementTexture()
415 if (textureChannelClass == tcu::TEXTURECHANNELCLASS_UNSIGNED_INTEGER) in genAttachementTexture()
416 tcu::clear(data.getAccess(), color.asUint()); in genAttachementTexture()
417 else if (textureChannelClass == tcu::TEXTURECHANNELCLASS_SIGNED_INTEGER) in genAttachementTexture()
418 tcu::clear(data.getAccess(), color.asInt()); in genAttachementTexture()
420 tcu::clear(data.getAccess(), color); in genAttachementTexture()
426 …verifyRenderbuffer (TestLog& log, const tcu::TextureFormat& format, const tcu::TextureLevel& refer… in verifyRenderbuffer()
430 switch (tcu::getTextureChannelClass(format.type)) in verifyRenderbuffer()
432 case tcu::TEXTURECHANNELCLASS_FLOATING_POINT: in verifyRenderbuffer()
436 const tcu::UVec4 threshold = getFloatULPThreshold(format, result.getFormat()); in verifyRenderbuffer()
438 …if (!tcu::floatUlpThresholdCompare(log, name.c_str(), desc.c_str(), reference, result, threshold, in verifyRenderbuffer()
444 case tcu::TEXTURECHANNELCLASS_SIGNED_INTEGER: in verifyRenderbuffer()
445 case tcu::TEXTURECHANNELCLASS_UNSIGNED_INTEGER: in verifyRenderbuffer()
449 const tcu::UVec4 threshold (1, 1, 1, 1); in verifyRenderbuffer()
451 …if (!tcu::intThresholdCompare(log, name.c_str(), desc.c_str(), reference, result, threshold, tcu::… in verifyRenderbuffer()
457 case tcu::TEXTURECHANNELCLASS_SIGNED_FIXED_POINT: in verifyRenderbuffer()
458 case tcu::TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT: in verifyRenderbuffer()
462 const tcu::Vec4 threshold = getFixedPointFormatThreshold(format, result.getFormat()); in verifyRenderbuffer()
464 …if (!tcu::floatThresholdCompare(log, name.c_str(), desc.c_str(), reference, result, threshold, tcu in verifyRenderbuffer()
478 void FramebufferFetchTestCase::genUniformColor (const tcu::Vec4& color) in genUniformColor()
482 switch (tcu::getTextureChannelClass(m_texFmt.type)) in genUniformColor()
484 case tcu::TEXTURECHANNELCLASS_UNSIGNED_INTEGER: in genUniformColor()
490 case tcu::TEXTURECHANNELCLASS_SIGNED_INTEGER: in genUniformColor()
495 case tcu::TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT: in genUniformColor()
496 case tcu::TEXTURECHANNELCLASS_SIGNED_FIXED_POINT: in genUniformColor()
497 case tcu::TEXTURECHANNELCLASS_FLOATING_POINT: in genUniformColor()
558 tcu::TextureLevel genReferenceTexture (const tcu::Vec4& fbColor, const tcu::Vec4& uniformColor);
566 tcu::TextureLevel TextureFormatTestCase::genReferenceTexture (const tcu::Vec4& fbColor, const tcu::… in genReferenceTexture()
568tcu::TextureLevel reference (glu::mapGLTransferFormat(m_transferFmt.format, m_transferFmt.data… in genReferenceTexture()
569 tcu::TextureChannelClass textureChannelClass = tcu::getTextureChannelClass(m_texFmt.type); in genReferenceTexture()
571 if (textureChannelClass == tcu::TEXTURECHANNELCLASS_UNSIGNED_INTEGER) in genReferenceTexture()
573 tcu::clear(reference.getAccess(), fbColor.asUint() + uniformColor.asUint()); in genReferenceTexture()
575 else if (textureChannelClass == tcu::TEXTURECHANNELCLASS_SIGNED_INTEGER) in genReferenceTexture()
577 tcu::clear(reference.getAccess(), fbColor.asInt() + uniformColor.asInt()); in genReferenceTexture()
581 if (tcu::isSRGB(m_texFmt)) in genReferenceTexture()
583 const tcu::Vec4 fragmentColor = tcu::sRGBToLinear(fbColor) + uniformColor; in genReferenceTexture()
584 tcu::clear(reference.getAccess(), tcu::linearToSRGB(fragmentColor)); in genReferenceTexture()
588 tcu::clear(reference.getAccess(), fbColor + uniformColor); in genReferenceTexture()
597 const tcu::Vec4 uniformColor = scaleColorValue(m_texFmt, tcu::Vec4(0.1f, 0.1f, 0.1f, 1.0f)); in iterate()
598 const tcu::Vec4 fbColor = scaleColorValue(m_texFmt, tcu::Vec4(0.5f, 0.0f, 0.0f, 1.0f)); in iterate()
600 tcu::TextureLevel reference = genReferenceTexture(fbColor, uniformColor); in iterate()
601 tcu::TextureLevel result (getReadPixelFormat(m_texFmt), VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in iterate()
629 void genFramebufferWithTextures (const vector<tcu::Vec4>& colors);
630 void genAttachmentTextures (const vector<tcu::Vec4>& colors);
631tcu::TextureLevel genReferenceTexture (const tcu::Vec4& fbColor, const tcu::Vec4& uniformColor…
670 void MultipleRenderTargetsTestCase::genFramebufferWithTextures (const vector<tcu::Vec4>& colors) in genFramebufferWithTextures()
686 void MultipleRenderTargetsTestCase::genAttachmentTextures (const vector<tcu::Vec4>& colors) in genAttachmentTextures()
688tcu::TextureLevel data (glu::mapGLTransferFormat(m_transferFmt.format, m_transferFmt.dataType), VI… in genAttachmentTextures()
710 tcu::TextureLevel MultipleRenderTargetsTestCase::genReferenceTexture (const tcu::Vec4& fbColor, con… in genReferenceTexture()
712tcu::TextureLevel reference (glu::mapGLTransferFormat(m_transferFmt.format, m_transferFmt.dataType… in genReferenceTexture()
713 tcu::clear(reference.getAccess(), fbColor + uniformColor); in genReferenceTexture()
744 const tcu::Vec4 uniformColor = scaleColorValue(m_texFmt, tcu::Vec4(0.1f, 0.1f, 0.1f, 1.0f)); in iterate()
745 tcu::TextureLevel result (getReadPixelFormat(m_texFmt), VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in iterate()
747 vector<tcu::Vec4> colors; in iterate()
748 colors.push_back(scaleColorValue(m_texFmt, tcu::Vec4(0.9f, 0.0f, 0.0f, 1.0f))); in iterate()
749 colors.push_back(scaleColorValue(m_texFmt, tcu::Vec4(0.0f, 0.9f, 0.0f, 1.0f))); in iterate()
750 colors.push_back(scaleColorValue(m_texFmt, tcu::Vec4(0.0f, 0.0f, 0.9f, 1.0f))); in iterate()
751 colors.push_back(scaleColorValue(m_texFmt, tcu::Vec4(0.0f, 0.9f, 0.9f, 1.0f))); in iterate()
759 tcu::TextureLevel reference = genReferenceTexture(colors[i], uniformColor); in iterate()
782 tcu::TextureLevel genReferenceTexture (const tcu::Vec4& fbColor, const tcu::Vec4& uniformColor);
816 tcu::TextureLevel LastFragDataTestCase::genReferenceTexture (const tcu::Vec4& fbColor, const tcu::V… in genReferenceTexture()
818tcu::TextureLevel reference (glu::mapGLTransferFormat(m_transferFmt.format, m_transferFmt.dataType… in genReferenceTexture()
819 tcu::clear(reference.getAccess(), fbColor + uniformColor); in genReferenceTexture()
826 const tcu::Vec4 uniformColor = scaleColorValue(m_texFmt, tcu::Vec4(0.1f, 0.1f, 0.1f, 1.0f)); in iterate()
827 const tcu::Vec4 fbColor = scaleColorValue(m_texFmt, tcu::Vec4(0.5f, 0.0f, 0.0f, 1.0f)); in iterate()
829 tcu::TextureLevel reference = genReferenceTexture(fbColor, uniformColor); in iterate()
830 tcu::TextureLevel result (getReadPixelFormat(m_texFmt), VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in iterate()
859tcu::TextureLevel genReferenceTexture (const tcu::Vec4& colorEven, const tcu::Vec4& colorOdd, con…
860 void genSamplerTexture (const tcu::Vec4& colorEven, const tcu::Vec4& colorOdd);
871 void TexelFetchTestCase::genSamplerTexture (const tcu::Vec4& colorEven, const tcu::Vec4& colorOdd) in genSamplerTexture()
873tcu::TextureLevel data (glu::mapGLTransferFormat(m_transferFmt.format, m_transferFmt.dataType), VI… in genSamplerTexture()
882 tcu::fillWithGrid(data.getAccess(), 8, colorEven, colorOdd); in genSamplerTexture()
911 tcu::TextureLevel TexelFetchTestCase::genReferenceTexture (const tcu::Vec4& colorEven, const tcu::V… in genReferenceTexture()
913tcu::TextureLevel reference (glu::mapGLTransferFormat(m_transferFmt.format, m_transferFmt.dataType… in genReferenceTexture()
914 tcu::fillWithGrid(reference.getAccess(), 8, colorEven + fbColor, colorOdd + fbColor); in genReferenceTexture()
921 const tcu::Vec4 fbColor = scaleColorValue(m_texFmt, tcu::Vec4(0.5f, 0.0f, 0.5f, 1.0f)); in iterate()
922 const tcu::Vec4 colorEven = scaleColorValue(m_texFmt, tcu::Vec4(0.5f, 0.5f, 0.0f, 1.0f)); in iterate()
923 const tcu::Vec4 colorOdd = scaleColorValue(m_texFmt, tcu::Vec4(0.5f, 0.0f, 0.5f, 1.0f)); in iterate()
926 tcu::TextureLevel reference = genReferenceTexture(colorEven, colorOdd, fbColor); in iterate()
927 tcu::TextureLevel result (getReadPixelFormat(m_texFmt), VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in iterate()
959 tcu::TextureLevel genReferenceTexture (const tcu::Vec4& fbColor, const tcu::Vec4& uniformColor);
1000 tcu::TextureLevel MultipleAssignmentTestCase::genReferenceTexture (const tcu::Vec4& fbColor, const in genReferenceTexture()
1002tcu::TextureLevel reference (glu::mapGLTransferFormat(m_transferFmt.format, m_transferFmt.dataType… in genReferenceTexture()
1009 tcu::Vec4 compositeColor(uniformColor * 2.0f); in genReferenceTexture()
1011tcu::clear(getSubregion(reference.getAccess(), left, 0, 0, width-left, top, 1), fbColor + compo… in genReferenceTexture()
1012tcu::clear(getSubregion(reference.getAccess(), 0, top, 0, left, height-top, 1), fbColor + unifo… in genReferenceTexture()
1013tcu::clear(getSubregion(reference.getAccess(), left, top, 0, width-left, height-top, 1), fbColor … in genReferenceTexture()
1014tcu::clear(getSubregion(reference.getAccess(), 0, 0, 0, left, top, 1), fbColor + uniformColor… in genReferenceTexture()
1021 const tcu::Vec4 fbColor = scaleColorValue(m_texFmt, tcu::Vec4(0.5f, 0.0f, 0.0f, 1.0f)); in iterate()
1022 const tcu::Vec4 uniformColor = scaleColorValue(m_texFmt, tcu::Vec4(0.25f, 0.0f, 0.0f, 1.0f)); in iterate()
1024 tcu::TextureLevel reference = genReferenceTexture(fbColor, uniformColor); in iterate()
1025 tcu::TextureLevel result (getReadPixelFormat(m_texFmt), VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in iterate()
1052 void genFramebufferWithGrid (const tcu::Vec4& fbColorEven, const tcu::Vec4& fbColorOdd);
1053tcu::TextureLevel genReferenceTexture (const tcu::Vec4& fbColorEven, const tcu::Vec4& fbColorOdd…
1084 void FragmentDiscardTestCase::genFramebufferWithGrid (const tcu::Vec4& fbColorEven, const tcu::Vec4… in genFramebufferWithGrid()
1086tcu::TextureLevel data (glu::mapGLTransferFormat(m_transferFmt.format, m_transferFmt.dataType), VI… in genFramebufferWithGrid()
1094 tcu::fillWithGrid(data.getAccess(), 8, fbColorEven, fbColorOdd); in genFramebufferWithGrid()
1103 tcu::TextureLevel FragmentDiscardTestCase::genReferenceTexture (const tcu::Vec4& fbColorEven, const… in genReferenceTexture()
1105tcu::TextureLevel reference (glu::mapGLTransferFormat(m_transferFmt.format, m_transferFmt.dataType… in genReferenceTexture()
1106 tcu::fillWithGrid(reference.getAccess(), 8, fbColorEven + fbColorEven, fbColorOdd); in genReferenceTexture()
1113 const tcu::Vec4 fbColorEven = scaleColorValue(m_texFmt, tcu::Vec4(0.5f, 0.0f, 1.0f, 1.0f)); in iterate()
1114 const tcu::Vec4 fbColorOdd = scaleColorValue(m_texFmt, tcu::Vec4(0.0f, 1.0f, 1.0f, 1.0f)); in iterate()
1116 tcu::TextureLevel reference = genReferenceTexture(fbColorEven, fbColorOdd); in iterate()
1117 tcu::TextureLevel result (getReadPixelFormat(m_texFmt), VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in iterate()
1146 void create2DTextureArrayMipMaps (const vector<tcu::Vec4>& colors);
1147tcu::TextureLevel genReferenceTexture (int level, const vector<tcu::Vec4>& colors, const tcu::V…
1148 void genReferenceMipmap (const tcu::Vec4& color, tcu::TextureLevel& reference);
1156 void TextureLevelTestCase::create2DTextureArrayMipMaps (const vector<tcu::Vec4>& colors) in create2DTextureArrayMipMaps()
1159tcu::TextureLevel levelData (glu::mapGLTransferFormat(m_transferFmt.format, m_transferFmt.dataTyp… in create2DTextureArrayMipMaps()
1182 tcu::TextureLevel TextureLevelTestCase::genReferenceTexture (int level, const vector<tcu::Vec4>& co… in genReferenceTexture()
1184tcu::TextureLevel reference (glu::mapGLTransferFormat(m_transferFmt.format, m_transferFmt.dataType… in genReferenceTexture()
1191 void TextureLevelTestCase::genReferenceMipmap (const tcu::Vec4& color, tcu::TextureLevel& reference) in genReferenceMipmap()
1206 const tcu::Vec4 uniformColor = scaleColorValue(m_texFmt, tcu::Vec4(0.1f, 0.0f, 0.0f, 1.0f)); in iterate()
1207 vector<tcu::Vec4> levelColors; in iterate()
1209 levelColors.push_back(scaleColorValue(m_texFmt, tcu::Vec4(0.4f, 0.0f, 0.0f, 1.0f))); in iterate()
1210 levelColors.push_back(scaleColorValue(m_texFmt, tcu::Vec4(0.2f, 0.0f, 0.0f, 1.0f))); in iterate()
1211 levelColors.push_back(scaleColorValue(m_texFmt, tcu::Vec4(0.0f, 0.0f, 0.0f, 1.0f))); in iterate()
1225 const tcu::ScopedLogSection section (m_testCtx.getLog(), name.str(), desc.str()); in iterate()
1226tcu::TextureLevel result (getReadPixelFormat(m_texFmt), VIEWPORT_WIDTH >> level, VIEWPORT_HEIG… in iterate()
1227 tcu::TextureLevel reference = genReferenceTexture(level, levelColors, uniformColor); in iterate()
1253 void create2DTextureArrayLayers (const vector<tcu::Vec4>& colors);
1254tcu::TextureLevel genReferenceTexture (int layer, const vector<tcu::Vec4>& colors, const tcu::Ve…
1262 void TextureLayerTestCase::create2DTextureArrayLayers (const vector<tcu::Vec4>& colors) in create2DTextureArrayLayers()
1265tcu::TextureLevel layerData (glu::mapGLTransferFormat(m_transferFmt.format, m_transferFmt.dataTyp… in create2DTextureArrayLayers()
1284 tcu::TextureLevel TextureLayerTestCase::genReferenceTexture (int layer, const vector<tcu::Vec4>& co… in genReferenceTexture()
1286tcu::TextureLevel reference (glu::mapGLTransferFormat(m_transferFmt.format, m_transferFmt.dataType… in genReferenceTexture()
1302 const tcu::Vec4 uniformColor = scaleColorValue(m_texFmt, tcu::Vec4(0.1f, 0.1f, 0.1f, 1.0f)); in iterate()
1303 tcu::TextureLevel result (getReadPixelFormat(m_texFmt), VIEWPORT_WIDTH, VIEWPORT_HEIGHT); in iterate()
1304 vector<tcu::Vec4> layerColors; in iterate()
1306 layerColors.push_back(scaleColorValue(m_texFmt, tcu::Vec4(0.4f, 0.0f, 0.0f, 1.0f))); in iterate()
1307 layerColors.push_back(scaleColorValue(m_texFmt, tcu::Vec4(0.2f, 0.0f, 0.0f, 1.0f))); in iterate()
1308 layerColors.push_back(scaleColorValue(m_texFmt, tcu::Vec4(0.0f, 0.0f, 0.0f, 1.0f))); in iterate()
1321 const tcu::ScopedLogSection section (m_testCtx.getLog(), name.str(), desc.str()); in iterate()
1322 tcu::TextureLevel reference = genReferenceTexture(layer, layerColors, uniformColor); in iterate()
1352tcu::TestCaseGroup* const basicTestGroup = new tcu::TestCaseGroup(m_testCtx, "basic", "Basic… in init()
1353tcu::TestCaseGroup* const framebufferFormatTestGroup = new tcu::TestCaseGroup(m_testCtx, "framebuf… in init()