#ifndef LIBANGLE_RENDERER_VULKAN_VK_CACHE_UTILS_H_
#define LIBANGLE_RENDERER_VULKAN_VK_CACHE_UTILS_H_
#include "common/Color.h"
#include "common/FixedVector.h"
#include "common/SimpleMutex.h"
#include "common/WorkerThread.h"
#include "libANGLE/Uniform.h"
#include "libANGLE/renderer/vulkan/ShaderInterfaceVariableInfoMap.h"
#include "libANGLE/renderer/vulkan/vk_resource.h"
#include "libANGLE/renderer/vulkan/vk_utils.h"
namespace gl
{
class ProgramExecutable;
}
namespace rx
{
class ShaderInterfaceVariableInfoMap;
class UpdateDescriptorSetsBuilder;
enum class DescriptorSetIndex : uint32_t
{ … };
namespace vk
{
class BufferHelper;
class DynamicDescriptorPool;
class SamplerHelper;
enum class ImageLayout;
class PipelineCacheAccess;
class RenderPassCommandBufferHelper;
class PackedClearValuesArray;
class AttachmentOpsArray;
RefCountedDescriptorSetLayout;
RefCountedPipelineLayout;
RefCountedSamplerYcbcrConversion;
ANGLE_ENABLE_STRUCT_PADDING_WARNINGS
enum class ResourceAccess
{ … };
inline void UpdateAccess(ResourceAccess *oldAccess, ResourceAccess newAccess)
{ … }
inline bool HasResourceWriteAccess(ResourceAccess access)
{ … }
enum class RenderPassLoadOp
{ … };
enum class RenderPassStoreOp
{ … };
constexpr size_t kMaxFramebufferAttachments = …;
FramebufferAttachmentArray;
FramebufferAttachmentsVector;
FramebufferAttachmentMask;
constexpr size_t kMaxFramebufferNonResolveAttachments = …;
FramebufferNonResolveAttachmentArray;
FramebufferNonResolveAttachmentMask;
class PackedAttachmentIndex;
class alignas(4) RenderPassDesc final
{ … };
bool operator==(const RenderPassDesc &lhs, const RenderPassDesc &rhs);
constexpr size_t kRenderPassDescSize = …;
static_assert …;
enum class GraphicsPipelineSubset
{ … };
enum class CacheLookUpFeedback
{ … };
struct PackedAttachmentOpsDesc final
{ … };
static_assert …;
class AttachmentOpsArray final
{ … };
bool operator==(const AttachmentOpsArray &lhs, const AttachmentOpsArray &rhs);
static_assert …;
struct PackedAttribDesc final
{ … };
constexpr size_t kPackedAttribDescSize = …;
static_assert …;
struct PackedVertexInputAttributes final
{ … };
constexpr size_t kPackedVertexInputAttributesSize = …;
static_assert …;
struct PackedInputAssemblyState final
{ … };
constexpr size_t kPackedInputAssemblyStateSize = …;
static_assert …;
struct PackedStencilOpState final
{ … };
constexpr size_t kPackedStencilOpSize = …;
static_assert …;
struct PackedPreRasterizationAndFragmentStates final
{ … };
constexpr size_t kPackedPreRasterizationAndFragmentStatesSize = …;
static_assert …;
struct PackedMultisampleAndSubpassState final
{ … };
constexpr size_t kPackedMultisampleAndSubpassStateSize = …;
static_assert …;
struct PackedColorBlendAttachmentState final
{ … };
constexpr size_t kPackedColorBlendAttachmentStateSize = …;
static_assert …;
struct PackedColorBlendState final
{ … };
constexpr size_t kPackedColorBlendStateSize = …;
static_assert …;
struct PackedBlendMaskAndLogicOpState final
{ … };
constexpr size_t kPackedBlendMaskAndLogicOpStateSize = …;
static_assert …;
struct PipelineVertexInputState final
{ … };
struct PipelineShadersState final
{ … };
struct PipelineSharedNonVertexInputState final
{ … };
struct PipelineFragmentOutputState final
{ … };
constexpr size_t kGraphicsPipelineVertexInputStateSize = …;
constexpr size_t kGraphicsPipelineShadersStateSize = …;
constexpr size_t kGraphicsPipelineSharedNonVertexInputStateSize = …;
constexpr size_t kGraphicsPipelineFragmentOutputStateSize = …;
constexpr size_t kGraphicsPipelineDescSumOfSizes = …;
constexpr size_t kGraphicsPipelineDirtyBitBytes = …;
constexpr static size_t kNumGraphicsPipelineDirtyBits = …;
static_assert …;
GraphicsPipelineTransitionBits;
GraphicsPipelineTransitionBits GetGraphicsPipelineTransitionBitsMask(GraphicsPipelineSubset subset);
ANGLE_DISABLE_STRUCT_PADDING_WARNINGS
struct GraphicsPipelineVertexInputVulkanStructs
{ … };
struct GraphicsPipelineShadersVulkanStructs
{ … };
struct GraphicsPipelineSharedNonVertexInputVulkanStructs
{ … };
struct GraphicsPipelineFragmentOutputVulkanStructs
{ … };
ANGLE_ENABLE_STRUCT_PADDING_WARNINGS
GraphicsPipelineDynamicStateList;
enum class PipelineRobustness
{ … };
enum class PipelineProtectedAccess
{ … };
class GraphicsPipelineDesc final
{ … };
constexpr size_t kGraphicsPipelineDescSize = …;
static_assert …;
constexpr size_t kDefaultDescriptorSetLayoutBindingsCount = …;
constexpr size_t kDefaultImmutableSamplerBindingsCount = …;
DescriptorSetLayoutBindingVector;
class DescriptorSetLayoutDesc final
{ … };
constexpr size_t kMaxDescriptorSetLayouts = …;
PackedPushConstantRange;
static_assert …;
DescriptorSetArray;
DescriptorSetLayoutPointerArray;
class PipelineLayoutDesc final
{ … };
static_assert …;
enum class YcbcrLinearFilterSupport
{ … };
class YcbcrConversionDesc final
{ … };
static_assert …;
class SamplerDesc final
{ … };
static_assert …;
ANGLE_DISABLE_STRUCT_PADDING_WARNINGS
class PipelineHelper;
struct GraphicsPipelineTransition
{ … };
ANGLE_INLINE GraphicsPipelineTransition::GraphicsPipelineTransition() = default;
ANGLE_INLINE GraphicsPipelineTransition::GraphicsPipelineTransition(
const GraphicsPipelineTransition &other) = default;
ANGLE_INLINE GraphicsPipelineTransition::GraphicsPipelineTransition(
GraphicsPipelineTransitionBits bits,
const GraphicsPipelineDesc *desc,
PipelineHelper *pipeline)
: … { … }
ANGLE_INLINE bool GraphicsPipelineTransitionMatch(GraphicsPipelineTransitionBits bitsA,
GraphicsPipelineTransitionBits bitsB,
const GraphicsPipelineDesc &descA,
const GraphicsPipelineDesc &descB)
{ … }
class PipelineCacheAccess
{ … };
class CreateMonolithicPipelineTask : public Context, public angle::Closure
{ … };
class WaitableMonolithicPipelineCreationTask
{ … };
class PipelineHelper final : public Resource
{ … };
class FramebufferHelper : public Resource
{ … };
ANGLE_INLINE PipelineHelper::PipelineHelper(Pipeline &&pipeline, CacheLookUpFeedback feedback)
: … { … }
ANGLE_INLINE PipelineHelper &PipelineHelper::operator=(PipelineHelper &&other)
{ … }
struct ImageSubresourceRange
{ … };
static_assert …;
inline bool operator==(const ImageSubresourceRange &a, const ImageSubresourceRange &b)
{ … }
constexpr ImageSubresourceRange kInvalidImageSubresourceRange = …;
struct ImageOrBufferViewSubresourceSerial
{ … };
inline bool operator==(const ImageOrBufferViewSubresourceSerial &a,
const ImageOrBufferViewSubresourceSerial &b)
{ … }
constexpr ImageOrBufferViewSubresourceSerial kInvalidImageOrBufferViewSubresourceSerial = …;
struct WriteDescriptorDesc
{ … };
static_assert …;
struct DescriptorInfoDesc
{ … };
static_assert …;
static constexpr size_t kFastDescriptorSetDescLimit = …;
struct DescriptorDescHandles
{ … };
class WriteDescriptorDescs
{ … };
class DescriptorSetDesc
{ … };
class DescriptorPoolHelper;
RefCountedDescriptorPoolHelper;
struct DescriptorSetDescAndPool
{ … };
DescriptorSetAndPoolPointer;
SharedDescriptorSetCacheKey;
ANGLE_INLINE const SharedDescriptorSetCacheKey
CreateSharedDescriptorSetCacheKey(const DescriptorSetDesc &desc, DynamicDescriptorPool *pool)
{ … }
constexpr VkDescriptorType kStorageBufferDescriptorType = …;
class DescriptorSetDescBuilder final
{ … };
void UpdatePreCacheActiveTextures(const gl::ProgramExecutable &executable,
const std::vector<gl::SamplerBinding> &samplerBindings,
const gl::ActiveTextureMask &activeTextures,
const gl::ActiveTextureArray<TextureVk *> &textures,
const gl::SamplerBindingVector &samplers,
DescriptorSetDesc *desc);
constexpr size_t kFramebufferDescDepthStencilIndex = …;
constexpr size_t kFramebufferDescColorIndexOffset = …;
constexpr size_t kFramebufferDescDepthStencilResolveIndexOffset = …;
constexpr size_t kFramebufferDescColorResolveIndexOffset = …;
constexpr size_t kFramebufferDescFragmentShadingRateAttachmentIndexOffset = …;
ANGLE_ENABLE_STRUCT_PADDING_WARNINGS
class FramebufferDesc
{ … };
constexpr size_t kFramebufferDescSize = …;
static_assert …;
ANGLE_DISABLE_STRUCT_PADDING_WARNINGS
FramebufferDescPointer;
SharedFramebufferCacheKey;
ANGLE_INLINE const SharedFramebufferCacheKey
CreateSharedFramebufferCacheKey(const FramebufferDesc &desc)
{ … }
class SamplerHelper final : angle::NonCopyable
{ … };
RefCountedSampler;
SamplerBinding;
class RenderPassHelper final : angle::NonCopyable
{ … };
template <class SharedCacheKeyT>
class SharedCacheKeyManager
{ … };
FramebufferCacheManager;
DescriptorSetCacheManager;
}
}
std
namespace rx
{
enum class VulkanCacheType
{ … };
class CacheStats final : angle::NonCopyable
{ … };
template <VulkanCacheType CacheType>
class HasCacheStats : angle::NonCopyable
{ … };
VulkanCacheStats;
class FramebufferCache final : angle::NonCopyable
{ … };
class RenderPassCache final : angle::NonCopyable
{ … };
enum class PipelineSource
{ … };
struct GraphicsPipelineDescCompleteHash
{ … };
struct GraphicsPipelineDescVertexInputHash
{ … };
struct GraphicsPipelineDescShadersHash
{ … };
struct GraphicsPipelineDescFragmentOutputHash
{ … };
struct GraphicsPipelineDescCompleteKeyEqual
{ … };
struct GraphicsPipelineDescVertexInputKeyEqual
{ … };
struct GraphicsPipelineDescShadersKeyEqual
{ … };
struct GraphicsPipelineDescFragmentOutputKeyEqual
{ … };
template <typename Hash>
struct GraphicsPipelineCacheTypeHelper
{ … };
template <>
struct GraphicsPipelineCacheTypeHelper<GraphicsPipelineDescVertexInputHash>
{ … };
template <>
struct GraphicsPipelineCacheTypeHelper<GraphicsPipelineDescShadersHash>
{ … };
template <>
struct GraphicsPipelineCacheTypeHelper<GraphicsPipelineDescFragmentOutputHash>
{ … };
template <typename Hash>
class GraphicsPipelineCache final : public HasCacheStats<VulkanCacheType::GraphicsPipeline>
{ … };
CompleteGraphicsPipelineCache;
VertexInputGraphicsPipelineCache;
ShadersGraphicsPipelineCache;
FragmentOutputGraphicsPipelineCache;
class DescriptorSetLayoutCache final : angle::NonCopyable
{ … };
class PipelineLayoutCache final : public HasCacheStats<VulkanCacheType::PipelineLayout>
{ … };
class SamplerCache final : public HasCacheStats<VulkanCacheType::Sampler>
{ … };
class SamplerYcbcrConversionCache final
: public HasCacheStats<VulkanCacheType::SamplerYcbcrConversion>
{ … };
class DescriptorSetCache final : angle::NonCopyable
{ … };
constexpr uint32_t kReservedPerStageDefaultUniformBindingCount = …;
class UpdateDescriptorSetsBuilder final : angle::NonCopyable
{ … };
}
#endif