chromium/third_party/angle/src/libANGLE/renderer/vulkan/vk_format_utils.cpp

//
// Copyright 2016 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// vk_format_utils:
//   Helper for Vulkan format code.

#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)
{}
}  // anonymous namespace

namespace vk
{
// Format implementation.
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 implementation.
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)
{}

}  // namespace vk

bool HasFullTextureFormatSupport(vk::Renderer *renderer, angle::FormatID formatID)
{}

bool HasNonRenderableTextureFormatSupport(vk::Renderer *renderer, angle::FormatID formatID)
{}

// Checks if it is a ETC texture format
bool IsETCFormat(angle::FormatID formatID)
{}
// Checks if it is a BC texture format
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)
{}
}  // namespace rx