#include "libANGLE/renderer/vulkan/vk_format_utils.h"
#include "image_util/loadimage.h"
#include "libANGLE/Texture.h"
#include "libANGLE/formatutils.h"
#include "libANGLE/renderer/load_functions_table.h"
#include "libANGLE/renderer/vulkan/ContextVk.h"
#include "libANGLE/renderer/vulkan/vk_caps_utils.h"
#include "libANGLE/renderer/vulkan/vk_renderer.h"
namespace rx
{
namespace
{
void FillTextureFormatCaps(vk::Renderer *renderer,
angle::FormatID formatID,
gl::TextureCaps *outTextureCaps)
{ … }
bool HasFullBufferFormatSupport(vk::Renderer *renderer, angle::FormatID formatID)
{ … }
SupportTest;
template <class FormatInitInfo>
int FindSupportedFormat(vk::Renderer *renderer,
const FormatInitInfo *info,
size_t skip,
int numInfo,
SupportTest hasSupport)
{ … }
bool HasNonFilterableTextureFormatSupport(vk::Renderer *renderer, angle::FormatID formatID)
{ … }
}
namespace vk
{
Format::Format()
: … { … }
void Format::initImageFallback(Renderer *renderer, const ImageFormatInitInfo *info, int numInfo)
{ … }
void Format::initBufferFallback(Renderer *renderer,
const BufferFormatInitInfo *info,
int numInfo,
int compressedStartIndex)
{ … }
size_t Format::getVertexInputAlignment(bool compressed) const
{ … }
bool HasEmulatedImageChannels(const angle::Format &intendedFormat,
const angle::Format &actualFormat)
{ … }
bool HasEmulatedImageFormat(angle::FormatID intendedFormatID, angle::FormatID actualFormatID)
{ … }
bool operator==(const Format &lhs, const Format &rhs)
{ … }
bool operator!=(const Format &lhs, const Format &rhs)
{ … }
FormatTable::FormatTable() { … }
FormatTable::~FormatTable() { … }
void FormatTable::initialize(Renderer *renderer, gl::TextureCapsMap *outTextureCapsMap)
{ … }
angle::FormatID ExternalFormatTable::getOrAllocExternalFormatID(uint64_t externalFormat,
VkFormat colorAttachmentFormat,
VkFormatFeatureFlags formatFeatures)
{ … }
const ExternalYuvFormatInfo &ExternalFormatTable::getExternalFormatInfo(
angle::FormatID formatID) const
{ … }
bool IsYUVExternalFormat(angle::FormatID formatID)
{ … }
size_t GetImageCopyBufferAlignment(angle::FormatID actualFormatID)
{ … }
size_t GetValidImageCopyBufferAlignment(angle::FormatID intendedFormatID,
angle::FormatID actualFormatID)
{ … }
VkImageUsageFlags GetMaximalImageUsageFlags(Renderer *renderer, angle::FormatID formatID)
{ … }
VkImageCreateFlags GetMinimalImageCreateFlags(Renderer *renderer,
gl::TextureType textureType,
VkImageUsageFlags usage)
{ … }
}
bool HasFullTextureFormatSupport(vk::Renderer *renderer, angle::FormatID formatID)
{ … }
bool HasNonRenderableTextureFormatSupport(vk::Renderer *renderer, angle::FormatID formatID)
{ … }
bool IsETCFormat(angle::FormatID formatID)
{ … }
bool IsBCFormat(angle::FormatID formatID)
{ … }
static constexpr int kNumETCFormats = …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static const std::array<LoadImageFunction, kNumETCFormats> kEtcToBcLoadingFunc = …;
LoadImageFunctionInfo GetEtcToBcTransCodingFunc(angle::FormatID formatID)
{ … }
static constexpr angle::FormatID kEtcToBcFormatMapping[] = …;
angle::FormatID GetTranscodeBCFormatID(angle::FormatID formatID)
{ … }
GLenum GetSwizzleStateComponent(const gl::SwizzleState &swizzleState, GLenum component)
{ … }
gl::SwizzleState ApplySwizzle(const gl::SwizzleState &formatSwizzle,
const gl::SwizzleState &toApply)
{ … }
gl::SwizzleState GetFormatSwizzle(const angle::Format &angleFormat, const bool sized)
{ … }
}