Lines Matching refs:formatInfo
2729 deUint32 getPlaneSizeInBytes (const PlanarFormatDescription& formatInfo,
2735 VkExtent3D imageExtent = getPlaneExtent(formatInfo, baseExtents, planeNdx, mipmapLevel);
2736 imageExtent.width /= formatInfo.blockWidth;
2737 imageExtent.height /= formatInfo.blockHeight;
2738 return deAlign32( formatInfo.planes[planeNdx].elementSizeBytes * imageExtent.width * imageExtent.height * imageExtent.depth, mipmapMemoryAlignment);
2741 deUint32 getPlaneSizeInBytes (const PlanarFormatDescription& formatInfo,
2747 tcu::UVec2 mipExtents = getPlaneExtent(formatInfo, baseExtents, planeNdx, mipmapLevel) / tcu::UVec2(formatInfo.blockWidth, formatInfo.blockHeight);
2748 return deAlign32( formatInfo.planes[planeNdx].elementSizeBytes * mipExtents.x() * mipExtents.y(), mipmapMemoryAlignment);
2751 VkExtent3D getPlaneExtent(const PlanarFormatDescription& formatInfo,
2756 deUint32 widthDivisor = formatInfo.planes[planeNdx].widthDivisor;
2757 deUint32 heightDivisor = formatInfo.planes[planeNdx].heightDivisor;
2764 tcu::UVec2 getPlaneExtent(const PlanarFormatDescription& formatInfo,
2769 deUint32 widthDivisor = formatInfo.planes[planeNdx].widthDivisor;
2770 deUint32 heightDivisor = formatInfo.planes[planeNdx].heightDivisor;
2785 tcu::UVec3 getImageSizeAlignment(const PlanarFormatDescription& formatInfo)
2787 tcu::UVec3 imgAlignment{ formatInfo.blockWidth, formatInfo.blockHeight, 1 };
2788 for (deUint32 planeNdx = 0; planeNdx < formatInfo.numPlanes; ++planeNdx)
2790 imgAlignment.x() = std::max(imgAlignment.x(), static_cast<deUint32>(formatInfo.planes[planeNdx].widthDivisor));
2791 imgAlignment.y() = std::max(imgAlignment.y(), static_cast<deUint32>(formatInfo.planes[planeNdx].heightDivisor));
2801 tcu::UVec2 getBlockExtent(const PlanarFormatDescription& formatInfo)
2803 return tcu::UVec2{ formatInfo.blockWidth, formatInfo.blockHeight };
2811 VkFormat getPlaneCompatibleFormat(const PlanarFormatDescription& formatInfo, deUint32 planeNdx)
2813 DE_ASSERT(planeNdx < formatInfo.numPlanes);
2814 return formatInfo.planes[planeNdx].planeCompatibleFormat;
3582 tcu::PixelBufferAccess getChannelAccess (const PlanarFormatDescription& formatInfo,
3588 DE_ASSERT(formatInfo.hasChannelNdx(channelNdx));
3590 const deUint32 planeNdx = formatInfo.channels[channelNdx].planeNdx;
3591 const deUint32 planeOffsetBytes = formatInfo.channels[channelNdx].offsetBits / 8;
3592 const deUint32 valueOffsetBits = formatInfo.channels[channelNdx].offsetBits % 8;
3593 const deUint32 pixelStrideBytes = formatInfo.channels[channelNdx].strideBytes;
3595 DE_ASSERT(size.x() % (formatInfo.blockWidth * formatInfo.planes[planeNdx].widthDivisor) == 0);
3596 DE_ASSERT(size.y() % (formatInfo.blockHeight * formatInfo.planes[planeNdx].heightDivisor) == 0);
3598 const deUint32 accessHeight = size.y() / ( formatInfo.blockHeight * formatInfo.planes[planeNdx].heightDivisor );
3599 const deUint32 elementSizeBytes = formatInfo.planes[planeNdx].elementSizeBytes;
3605 std::max(formatInfo.blockWidth * formatInfo.planes[planeNdx].widthDivisor * pixelStrideBytes / elementSizeBytes, 1u),
3606 std::max(formatInfo.blockHeight * formatInfo.planes[planeNdx].heightDivisor * pixelStrideBytes / elementSizeBytes, 1u),
3609 return tcu::PixelBufferAccess(getChannelAccessFormat((tcu::TextureChannelClass)formatInfo.channels[channelNdx].type,
3611 formatInfo.channels[channelNdx].sizeBits),
3618 tcu::ConstPixelBufferAccess getChannelAccess (const PlanarFormatDescription& formatInfo,
3624 return getChannelAccess(formatInfo, size, planeRowPitches, const_cast<void* const*>(planePtrs), channelNdx);
3627 tcu::PixelBufferAccess getChannelAccess (const PlanarFormatDescription& formatInfo,
3633 DE_ASSERT(formatInfo.hasChannelNdx(channelNdx));
3635 const deUint32 planeNdx = formatInfo.channels[channelNdx].planeNdx;
3636 const deUint32 planeOffsetBytes = formatInfo.channels[channelNdx].offsetBits / 8;
3637 const deUint32 valueOffsetBits = formatInfo.channels[channelNdx].offsetBits % 8;
3638 const deUint32 pixelStrideBytes = formatInfo.channels[channelNdx].strideBytes;
3640 DE_ASSERT(size.x() % (formatInfo.blockWidth * formatInfo.planes[planeNdx].widthDivisor) == 0);
3641 DE_ASSERT(size.y() % (formatInfo.blockHeight * formatInfo.planes[planeNdx].heightDivisor) == 0);
3643 const deUint32 accessHeight = size.y() / ( formatInfo.blockHeight * formatInfo.planes[planeNdx].heightDivisor );
3644 const deUint32 elementSizeBytes = formatInfo.planes[planeNdx].elementSizeBytes;
3650 std::max(formatInfo.blockWidth * formatInfo.planes[planeNdx].widthDivisor * pixelStrideBytes / elementSizeBytes, 1u),
3651 std::max(formatInfo.blockHeight * formatInfo.planes[planeNdx].heightDivisor * pixelStrideBytes / elementSizeBytes, 1u),
3654 return tcu::PixelBufferAccess(getChannelAccessFormat((tcu::TextureChannelClass)formatInfo.channels[channelNdx].type,
3656 formatInfo.channels[channelNdx].sizeBits),
3663 tcu::ConstPixelBufferAccess getChannelAccess (const PlanarFormatDescription& formatInfo,
3669 return getChannelAccess(formatInfo, size, planeRowPitches, const_cast<void* const*>(planePtrs), channelNdx);