Lines Matching refs:format

183 string formatToName (deUint32 format)
187 if (glu::isCompressedFormat(format))
188 enumName = glu::getCompressedTextureFormatStr(format).toString().substr(14); // Strip GL_COMPRESSED_
190 enumName = glu::getUncompressedTextureFormatStr(format).toString().substr(3); // Strip GL_
195 bool isFloatFormat (deUint32 format)
197 if (glu::isCompressedFormat(format))
200 return tcu::getTextureChannelClass(glu::mapGLInternalFormat(format).type) == tcu::TEXTURECHANNELCLASS_FLOATING_POINT;
203 bool isUintFormat (deUint32 format)
205 if (glu::isCompressedFormat(format))
208 return tcu::getTextureChannelClass(glu::mapGLInternalFormat(format).type) == tcu::TEXTURECHANNELCLASS_UNSIGNED_INTEGER;
211 bool isIntFormat (deUint32 format)
213 if (glu::isCompressedFormat(format))
216 return tcu::getTextureChannelClass(glu::mapGLInternalFormat(format).type) == tcu::TEXTURECHANNELCLASS_SIGNED_INTEGER;
219 bool isFixedPointFormat (deUint32 format)
221 if (glu::isCompressedFormat(format))
225 const tcu::TextureChannelClass channelClass = tcu::getTextureChannelClass(glu::mapGLInternalFormat(format).type);
348 ImageInfo (deUint32 format, deUint32 target, const IVec3& size);
360 ImageInfo::ImageInfo (deUint32 format, deUint32 target, const IVec3& size)
361 : m_format (format)
581 // Return format that has more restrictions on texel data.
614 int getTexelBlockSize (deUint32 format)
616 if (glu::isCompressedFormat(format))
617 return tcu::getBlockSize(glu::mapGLCompressedTexFormat(format));
619 return glu::mapGLInternalFormat(format).getPixelSize();
622 IVec3 getTexelBlockPixelSize (deUint32 format)
624 if (glu::isCompressedFormat(format))
625 return tcu::getBlockPixelSize(glu::mapGLCompressedTexFormat(format));
630 bool isColorRenderable (deUint32 format)
632 switch (format)
669 deUint32 getTypeForInternalFormat (deUint32 format)
671 return glu::getTransferFormat(glu::mapGLInternalFormat(format)).dataType;
678 const tcu::TextureFormat format = glu::mapGLInternalFormat(glFormat);
679 const tcu::PixelBufferAccess access (format, texelCount, 1, 1, buffer);
680 const tcu::TextureFormatInfo info = tcu::getTextureFormatInfo(format);
754 deUint32 getFormatForInternalFormat (deUint32 format)
756 return glu::getTransferFormat(glu::mapGLInternalFormat(format)).format;
764 deUint32 format,
772 if (glu::isCompressedFormat(format))
778 gl.compressedTexImage2D(glTarget, level, format, (glw::GLsizei)size.x(), (glw::GLsizei)size.y(), 0, (glw::GLsizei)dataSize, data);
783 gl.compressedTexImage3D(glTarget, level, format, (glw::GLsizei)size.x(), (glw::GLsizei)size.y(), (glw::GLsizei)size.z(), 0, (glw::GLsizei)dataSize, data);
793 const deUint32 glFormat = getFormatForInternalFormat(format);
794 const deUint32 glType = getTypeForInternalFormat(format);
800 gl.texImage2D(glTarget, level, format, (glw::GLsizei)size.x(), (glw::GLsizei)size.y(), 0, glFormat, glType, data);
805 gl.texImage3D(glTarget, level, format, (glw::GLsizei)size.x(), (glw::GLsizei)size.y(), (glw::GLsizei)size.z(), 0, glFormat, glType, data);
876 const tcu::TextureFormat format = glu::mapGLInternalFormat(info.getFormat());
886 levels[0].setStorage(format.getPixelSize() * size.x() * size.y());
887 tcu::PixelBufferAccess refAccess(format, size.x(), size.y(), 1, levels[0].getPtr());
898 vector<deUint8> texelBlock(format.getPixelSize());
914 genTexel(rng, moreRestrictiveFormat, format.getPixelSize(), 1, &(texelBlock[0]));
917 const tcu::ConstPixelBufferAccess texelAccess (format, 1, 1, 1, &(texelBlock[0]));
926 DE_ASSERT(!tcu::isSRGB(format));
936 DE_ASSERT(!tcu::isSRGB(format));
942 const tcu::Vec4 linearColor = (tcu::isSRGB(format) ? tcu::sRGBToLinear(rawColor) : rawColor);
944 // rawColor bit pattern has been chosen to be "safe" in the destination format. For sRGB
1057 const tcu::TextureFormat format = glu::mapGLInternalFormat(info.getFormat());
1068 result.push_back(tcu::ConstPixelBufferAccess(format, levelSize.x(), levelSize.y(), levelSize.z(), data[level].getPtr()));
1078 const tcu::TextureFormat format = glu::mapGLInternalFormat(info.getFormat());
1094 result.push_back(tcu::ConstPixelBufferAccess(format, levelPixelSize.x(), levelPixelSize.y(), levelPixelSize.z(), data[level].getElementPtr(levelSize * faceNdx)));
1234 const tcu::TextureFormat format = refTexture.getLevel(0).getFormat();
1235 const tcu::TextureFormatInfo spec = tcu::getTextureFormatInfo(format);
1240 renderParams.samplerType = getSamplerType(format);
1356 const tcu::TextureFormat format = refTexture.getLevel(0).getFormat();
1357 const tcu::TextureFormatInfo spec = tcu::getTextureFormatInfo(format);
1362 renderParams.samplerType = getSamplerType(format);
1428 const tcu::TextureFormat format = refTexture.getLevelFace(0, tcu::CUBEFACE_POSITIVE_X).getFormat();
1429 const tcu::TextureFormatInfo spec = tcu::getTextureFormatInfo(format);
1435 renderParams.samplerType = getSamplerType(format);
1562 const tcu::TextureFormat format = refTexture.getLevel(0).getFormat();
1563 const tcu::TextureFormatInfo spec = tcu::getTextureFormatInfo(format);
1568 renderParams.samplerType = getSamplerType(format);
1621 tcu::TextureFormat getReadPixelFormat (const tcu::TextureFormat& format)
1623 switch (tcu::getTextureChannelClass(format.type))
1677 const tcu::TextureFormat format = glu::mapGLInternalFormat(info.getFormat());
1679 const tcu::ConstPixelBufferAccess refRenderbuffer (format, size.x(), size.y(), 1, data[0].getPtr());
1680 const tcu::TextureFormat readPixelsFormat = getReadPixelFormat(format);
1726 const Vec4 threshold = calculateThreshold(format, readPixelsFormat);
1897 void checkFormatSupport (glu::ContextInfo& info, deUint32 format, deUint32 target, glu::RenderContext& ctx)
1901 if (glu::isCompressedFormat(format))
1903 if (isAstcFormat(glu::mapGLCompressedTexFormat(format)))
1918 if (!info.isCompressedTextureFormatSupported(format))
2215 << "Size in destination format is " << copy.dstSize
2336 IVec3 getTestedSize (deUint32 target, deUint32 format, const IVec3& targetSize)
2338 const IVec3 texelBlockPixelSize = getTexelBlockPixelSize(format);