#include "libANGLE/renderer/vulkan/vk_helpers.h"
#include "common/utilities.h"
#include "common/vulkan/vk_headers.h"
#include "image_util/loadimage.h"
#include "libANGLE/Context.h"
#include "libANGLE/Display.h"
#include "libANGLE/renderer/driver_utils.h"
#include "libANGLE/renderer/renderer_utils.h"
#include "libANGLE/renderer/vulkan/BufferVk.h"
#include "libANGLE/renderer/vulkan/ContextVk.h"
#include "libANGLE/renderer/vulkan/DisplayVk.h"
#include "libANGLE/renderer/vulkan/FramebufferVk.h"
#include "libANGLE/renderer/vulkan/RenderTargetVk.h"
#include "libANGLE/renderer/vulkan/android/vk_android_utils.h"
#include "libANGLE/renderer/vulkan/vk_ref_counted_event.h"
#include "libANGLE/renderer/vulkan/vk_renderer.h"
#include "libANGLE/renderer/vulkan/vk_utils.h"
namespace rx
{
namespace vk
{
namespace
{
constexpr VkClearColorValue kRobustInitColorValue = …;
constexpr VkClearColorValue kEmulatedInitColorValue = …;
constexpr VkClearDepthStencilValue kRobustInitDepthStencilValue = …;
constexpr VkImageAspectFlags kDepthStencilAspects = …;
constexpr angle::PackedEnumMap<PipelineStage, VkPipelineStageFlagBits> kPipelineStageFlagBitMap = …;
constexpr gl::ShaderMap<PipelineStage> kPipelineStageShaderMap = …;
constexpr angle::PackedEnumMap<ImageLayout, ImageMemoryBarrierData> kImageMemoryBarrierData = …;
EventStage GetImageLayoutEventStage(ImageLayout layout)
{ … }
bool HasBothDepthAndStencilAspects(VkImageAspectFlags aspectFlags)
{ … }
uint8_t GetContentDefinedLayerRangeBits(uint32_t layerStart,
uint32_t layerCount,
uint32_t maxLayerCount)
{ … }
uint32_t GetImageLayerCountForView(const ImageHelper &image)
{ … }
void ReleaseImageViews(ImageViewVector *imageViewVector, GarbageObjects *garbage)
{ … }
void DestroyImageViews(ImageViewVector *imageViewVector, VkDevice device)
{ … }
ImageView *GetLevelImageView(ImageViewVector *imageViews, LevelIndex levelVk, uint32_t levelCount)
{ … }
ImageView *GetLevelLayerImageView(LayerLevelImageViewVector *imageViews,
LevelIndex levelVk,
uint32_t layer,
uint32_t levelCount,
uint32_t layerCount)
{ … }
const angle::Format &GetDepthStencilImageToBufferFormat(const angle::Format &imageFormat,
VkImageAspectFlagBits copyAspect)
{ … }
VkClearValue GetRobustResourceClearValue(const angle::Format &intendedFormat,
const angle::Format &actualFormat)
{ … }
bool IsShaderReadOnlyLayout(const ImageMemoryBarrierData &imageLayout)
{ … }
bool IsAnySubresourceContentDefined(const gl::TexLevelArray<angle::BitSet8<8>> &contentDefined)
{ … }
void ExtendRenderPassInvalidateArea(const gl::Rectangle &invalidateArea, gl::Rectangle *out)
{ … }
bool CanCopyWithTransferForCopyImage(Renderer *renderer,
ImageHelper *srcImage,
VkImageTiling srcTilingMode,
ImageHelper *dstImage,
VkImageTiling dstTilingMode)
{ … }
void ReleaseBufferListToRenderer(Renderer *renderer, BufferHelperQueue *buffers)
{ … }
void DestroyBufferList(Renderer *renderer, BufferHelperQueue *buffers)
{ … }
char GetLoadOpShorthand(RenderPassLoadOp loadOp)
{ … }
char GetStoreOpShorthand(RenderPassStoreOp storeOp)
{ … }
bool IsClear(UpdateSource updateSource)
{ … }
bool IsClearOfAllChannels(UpdateSource updateSource)
{ … }
angle::Result InitDynamicDescriptorPool(Context *context,
const DescriptorSetLayoutDesc &descriptorSetLayoutDesc,
const DescriptorSetLayout &descriptorSetLayout,
uint32_t descriptorCountMultiplier,
DynamicDescriptorPool *poolToInit)
{ … }
bool CheckSubpassCommandBufferCount(uint32_t count)
{ … }
bool IsAnyLayout(VkImageLayout needle, const VkImageLayout *haystack, uint32_t haystackCount)
{ … }
gl::TexLevelMask AggregateSkipLevels(const gl::CubeFaceArray<gl::TexLevelMask> &skipLevels)
{ … }
ImageLayerWriteMask GetImageLayerWriteMask(uint32_t layerStart, uint32_t layerCount)
{ … }
}
uint32_t DynamicDescriptorPool::mMaxSetsPerPool = …;
uint32_t DynamicDescriptorPool::mMaxSetsPerPoolMultiplier = …;
ImageLayout GetImageLayoutFromGLImageLayout(Context *context, GLenum layout)
{ … }
GLenum ConvertImageLayoutToGLImageLayout(ImageLayout layout)
{ … }
VkImageLayout ConvertImageLayoutToVkImageLayout(Renderer *renderer, ImageLayout imageLayout)
{ … }
PipelineStageGroup GetPipelineStageGroupFromStageFlags(VkPipelineStageFlags dstStageMask)
{ … }
void InitializeImageLayoutAndMemoryBarrierDataMap(
angle::PackedEnumMap<ImageLayout, ImageMemoryBarrierData> *map,
VkPipelineStageFlags supportedVulkanPipelineStageMask)
{ … }
bool EventAndPipelineBarrierHaveMatchingStageFlags(
const angle::PackedEnumMap<EventStage, VkPipelineStageFlags> &eventStageMap,
const angle::PackedEnumMap<ImageLayout, ImageMemoryBarrierData> &barrierDataMap)
{ … }
bool FormatHasNecessaryFeature(Renderer *renderer,
angle::FormatID formatID,
VkImageTiling tilingMode,
VkFormatFeatureFlags featureBits)
{ … }
bool CanCopyWithTransfer(Renderer *renderer,
angle::FormatID srcFormatID,
VkImageTiling srcTilingMode,
angle::FormatID dstFormatID,
VkImageTiling dstTilingMode)
{ … }
PackedClearValuesArray::PackedClearValuesArray() : … { … }
PackedClearValuesArray::~PackedClearValuesArray() = default;
PackedClearValuesArray::PackedClearValuesArray(const PackedClearValuesArray &other) = default;
PackedClearValuesArray &PackedClearValuesArray::operator=(const PackedClearValuesArray &rhs) =
default;
void PackedClearValuesArray::store(PackedAttachmentIndex index,
VkImageAspectFlags aspectFlags,
const VkClearValue &clearValue)
{ … }
void PackedClearValuesArray::storeNoDepthStencil(PackedAttachmentIndex index,
const VkClearValue &clearValue)
{ … }
RenderPassAttachment::RenderPassAttachment()
{ … }
void RenderPassAttachment::init(ImageHelper *image,
UniqueSerial imageSiblingSerial,
gl::LevelIndex levelIndex,
uint32_t layerIndex,
uint32_t layerCount,
VkImageAspectFlagBits aspect)
{ … }
void RenderPassAttachment::reset()
{ … }
void RenderPassAttachment::onAccess(ResourceAccess access, uint32_t currentCmdCount)
{ … }
void RenderPassAttachment::invalidate(const gl::Rectangle &invalidateArea,
bool isAttachmentEnabled,
uint32_t currentCmdCount)
{ … }
void RenderPassAttachment::onRenderAreaGrowth(ContextVk *contextVk,
const gl::Rectangle &newRenderArea)
{ … }
void RenderPassAttachment::finalizeLoadStore(Context *context,
uint32_t currentCmdCount,
bool hasUnresolveAttachment,
bool hasResolveAttachment,
RenderPassLoadOp *loadOp,
RenderPassStoreOp *storeOp,
bool *isInvalidatedOut)
{ … }
void RenderPassAttachment::restoreContent()
{ … }
bool RenderPassAttachment::hasWriteAfterInvalidate(uint32_t currentCmdCount) const
{ … }
bool RenderPassAttachment::isInvalidated(uint32_t currentCmdCount) const
{ … }
bool RenderPassAttachment::onAccessImpl(ResourceAccess access, uint32_t currentCmdCount)
{ … }
CommandBufferHelperCommon::CommandBufferHelperCommon()
: … { … }
CommandBufferHelperCommon::~CommandBufferHelperCommon() { … }
void CommandBufferHelperCommon::initializeImpl()
{ … }
void CommandBufferHelperCommon::resetImpl(Context *context)
{ … }
template <class DerivedT>
angle::Result CommandBufferHelperCommon::attachCommandPoolImpl(Context *context,
SecondaryCommandPool *commandPool)
{ … }
template <class DerivedT, bool kIsRenderPassBuffer>
angle::Result CommandBufferHelperCommon::detachCommandPoolImpl(
Context *context,
SecondaryCommandPool **commandPoolOut)
{ … }
template <class DerivedT>
void CommandBufferHelperCommon::releaseCommandPoolImpl()
{ … }
template <class DerivedT>
void CommandBufferHelperCommon::attachAllocatorImpl(SecondaryCommandMemoryAllocator *allocator)
{ … }
template <class DerivedT>
SecondaryCommandMemoryAllocator *CommandBufferHelperCommon::detachAllocatorImpl()
{ … }
template <class DerivedT>
void CommandBufferHelperCommon::assertCanBeRecycledImpl()
{ … }
void CommandBufferHelperCommon::bufferWrite(VkAccessFlags writeAccessType,
PipelineStage writeStage,
BufferHelper *buffer)
{ … }
void CommandBufferHelperCommon::executeBarriers(Renderer *renderer, CommandsState *commandsState)
{ … }
void CommandBufferHelperCommon::bufferReadImpl(VkAccessFlags readAccessType,
PipelineStage readStage,
BufferHelper *buffer)
{ … }
void CommandBufferHelperCommon::imageReadImpl(Context *context,
VkImageAspectFlags aspectFlags,
ImageLayout imageLayout,
BarrierType barrierType,
ImageHelper *image)
{ … }
void CommandBufferHelperCommon::imageWriteImpl(Context *context,
gl::LevelIndex level,
uint32_t layerStart,
uint32_t layerCount,
VkImageAspectFlags aspectFlags,
ImageLayout imageLayout,
BarrierType barrierType,
ImageHelper *image)
{ … }
void CommandBufferHelperCommon::updateImageLayoutAndBarrier(Context *context,
ImageHelper *image,
VkImageAspectFlags aspectFlags,
ImageLayout imageLayout,
BarrierType barrierType)
{ … }
void CommandBufferHelperCommon::retainImageWithEvent(Context *context, ImageHelper *image)
{ … }
template <typename CommandBufferT>
void CommandBufferHelperCommon::flushSetEventsImpl(Context *context, CommandBufferT *commandBuffer)
{ … }
template void CommandBufferHelperCommon::flushSetEventsImpl<priv::SecondaryCommandBuffer>(
Context *context,
priv::SecondaryCommandBuffer *commandBuffer);
template void CommandBufferHelperCommon::flushSetEventsImpl<VulkanSecondaryCommandBuffer>(
Context *context,
VulkanSecondaryCommandBuffer *commandBuffer);
void CommandBufferHelperCommon::addCommandDiagnosticsCommon(std::ostringstream *out)
{ … }
void CommandBufferHelperCommon::setBufferReadQueueSerial(BufferHelper *buffer)
{ … }
OutsideRenderPassCommandBufferHelper::OutsideRenderPassCommandBufferHelper() { … }
OutsideRenderPassCommandBufferHelper::~OutsideRenderPassCommandBufferHelper() { … }
angle::Result OutsideRenderPassCommandBufferHelper::initialize(Context *context)
{ … }
angle::Result OutsideRenderPassCommandBufferHelper::initializeCommandBuffer(Context *context)
{ … }
angle::Result OutsideRenderPassCommandBufferHelper::reset(
Context *context,
SecondaryCommandBufferCollector *commandBufferCollector)
{ … }
void OutsideRenderPassCommandBufferHelper::imageRead(ContextVk *contextVk,
VkImageAspectFlags aspectFlags,
ImageLayout imageLayout,
ImageHelper *image)
{ … }
void OutsideRenderPassCommandBufferHelper::imageWrite(ContextVk *contextVk,
gl::LevelIndex level,
uint32_t layerStart,
uint32_t layerCount,
VkImageAspectFlags aspectFlags,
ImageLayout imageLayout,
ImageHelper *image)
{ … }
void OutsideRenderPassCommandBufferHelper::retainImage(ImageHelper *image)
{ … }
void OutsideRenderPassCommandBufferHelper::trackImageWithEvent(Context *context, ImageHelper *image)
{ … }
void OutsideRenderPassCommandBufferHelper::collectRefCountedEventsGarbage(
RefCountedEventsGarbageRecycler *garbageRecycler)
{ … }
angle::Result OutsideRenderPassCommandBufferHelper::flushToPrimary(Context *context,
CommandsState *commandsState)
{ … }
angle::Result OutsideRenderPassCommandBufferHelper::endCommandBuffer(Context *context)
{ … }
angle::Result OutsideRenderPassCommandBufferHelper::attachCommandPool(
Context *context,
SecondaryCommandPool *commandPool)
{ … }
angle::Result OutsideRenderPassCommandBufferHelper::detachCommandPool(
Context *context,
SecondaryCommandPool **commandPoolOut)
{ … }
void OutsideRenderPassCommandBufferHelper::releaseCommandPool()
{ … }
void OutsideRenderPassCommandBufferHelper::attachAllocator(
SecondaryCommandMemoryAllocator *allocator)
{ … }
SecondaryCommandMemoryAllocator *OutsideRenderPassCommandBufferHelper::detachAllocator()
{ … }
void OutsideRenderPassCommandBufferHelper::assertCanBeRecycled()
{ … }
std::string OutsideRenderPassCommandBufferHelper::getCommandDiagnostics()
{ … }
void RenderPassFramebuffer::reset()
{ … }
void RenderPassFramebuffer::addResolveAttachment(size_t viewIndex, VkImageView view)
{ … }
angle::Result RenderPassFramebuffer::packResolveViewsAndCreateFramebuffer(
Context *context,
const RenderPass &renderPass,
Framebuffer *framebufferOut)
{ … }
void RenderPassFramebuffer::packResolveViewsForRenderPassBegin(
VkRenderPassAttachmentBeginInfo *beginInfoOut)
{ … }
void RenderPassFramebuffer::PackViews(FramebufferAttachmentsVector<VkImageView> *views)
{ … }
RenderPassCommandBufferHelper::RenderPassCommandBufferHelper()
: … { … }
RenderPassCommandBufferHelper::~RenderPassCommandBufferHelper() { … }
angle::Result RenderPassCommandBufferHelper::initialize(Context *context)
{ … }
angle::Result RenderPassCommandBufferHelper::initializeCommandBuffer(Context *context)
{ … }
angle::Result RenderPassCommandBufferHelper::reset(
Context *context,
SecondaryCommandBufferCollector *commandBufferCollector)
{ … }
void RenderPassCommandBufferHelper::imageRead(ContextVk *contextVk,
VkImageAspectFlags aspectFlags,
ImageLayout imageLayout,
ImageHelper *image)
{ … }
void RenderPassCommandBufferHelper::imageWrite(ContextVk *contextVk,
gl::LevelIndex level,
uint32_t layerStart,
uint32_t layerCount,
VkImageAspectFlags aspectFlags,
ImageLayout imageLayout,
ImageHelper *image)
{ … }
void RenderPassCommandBufferHelper::colorImagesDraw(gl::LevelIndex level,
uint32_t layerStart,
uint32_t layerCount,
ImageHelper *image,
ImageHelper *resolveImage,
UniqueSerial imageSiblingSerial,
PackedAttachmentIndex packedAttachmentIndex)
{ … }
void RenderPassCommandBufferHelper::depthStencilImagesDraw(gl::LevelIndex level,
uint32_t layerStart,
uint32_t layerCount,
ImageHelper *image,
ImageHelper *resolveImage,
UniqueSerial imageSiblingSerial)
{ … }
void RenderPassCommandBufferHelper::fragmentShadingRateImageRead(ImageHelper *image)
{ … }
void RenderPassCommandBufferHelper::onColorAccess(PackedAttachmentIndex packedAttachmentIndex,
ResourceAccess access)
{ … }
void RenderPassCommandBufferHelper::onDepthAccess(ResourceAccess access)
{ … }
void RenderPassCommandBufferHelper::onStencilAccess(ResourceAccess access)
{ … }
void RenderPassCommandBufferHelper::updateDepthReadOnlyMode(RenderPassUsageFlags dsUsageFlags)
{ … }
void RenderPassCommandBufferHelper::updateStencilReadOnlyMode(RenderPassUsageFlags dsUsageFlags)
{ … }
void RenderPassCommandBufferHelper::updateDepthStencilReadOnlyMode(
RenderPassUsageFlags dsUsageFlags,
VkImageAspectFlags dsAspectFlags)
{ … }
void RenderPassCommandBufferHelper::updateStartedRenderPassWithDepthStencilMode(
RenderPassAttachment *resolveAttachment,
bool renderPassHasWriteOrClear,
RenderPassUsageFlags dsUsageFlags,
RenderPassUsage readOnlyAttachmentUsage)
{ … }
void RenderPassCommandBufferHelper::finalizeColorImageLayout(
Context *context,
ImageHelper *image,
PackedAttachmentIndex packedAttachmentIndex,
bool isResolveImage)
{ … }
void RenderPassCommandBufferHelper::finalizeColorImageLoadStore(
Context *context,
PackedAttachmentIndex packedAttachmentIndex)
{ … }
void RenderPassCommandBufferHelper::finalizeDepthStencilImageLayout(Context *context)
{ … }
void RenderPassCommandBufferHelper::finalizeDepthStencilResolveImageLayout(Context *context)
{ … }
void RenderPassCommandBufferHelper::finalizeFragmentShadingRateImageLayout(Context *context)
{ … }
void RenderPassCommandBufferHelper::finalizeImageLayout(Context *context,
const ImageHelper *image,
UniqueSerial imageSiblingSerial)
{ … }
void RenderPassCommandBufferHelper::finalizeDepthStencilLoadStore(Context *context)
{ … }
void RenderPassCommandBufferHelper::finalizeColorImageLayoutAndLoadStore(
Context *context,
PackedAttachmentIndex packedAttachmentIndex)
{ … }
void RenderPassCommandBufferHelper::finalizeDepthStencilImageLayoutAndLoadStore(Context *context)
{ … }
void RenderPassCommandBufferHelper::executeSetEvents(Context *context,
PrimaryCommandBuffer *primary)
{ … }
void RenderPassCommandBufferHelper::collectRefCountedEventsGarbage(
RefCountedEventsGarbageRecycler *garbageRecycler)
{ … }
void RenderPassCommandBufferHelper::updatePerfCountersForDynamicRenderingInstance(
Context *context,
angle::VulkanPerfCounters *countersOut)
{ … }
angle::Result RenderPassCommandBufferHelper::beginRenderPass(
ContextVk *contextVk,
RenderPassFramebuffer &&framebuffer,
const gl::Rectangle &renderArea,
const RenderPassDesc &renderPassDesc,
const AttachmentOpsArray &renderPassAttachmentOps,
const PackedAttachmentCount colorAttachmentCount,
const PackedAttachmentIndex depthStencilAttachmentIndex,
const PackedClearValuesArray &clearValues,
const QueueSerial &queueSerial,
RenderPassCommandBuffer **commandBufferOut)
{ … }
angle::Result RenderPassCommandBufferHelper::beginRenderPassCommandBuffer(ContextVk *contextVk)
{ … }
angle::Result RenderPassCommandBufferHelper::endRenderPass(ContextVk *contextVk)
{ … }
angle::Result RenderPassCommandBufferHelper::endRenderPassCommandBuffer(ContextVk *contextVk)
{ … }
angle::Result RenderPassCommandBufferHelper::nextSubpass(ContextVk *contextVk,
RenderPassCommandBuffer **commandBufferOut)
{ … }
void RenderPassCommandBufferHelper::beginTransformFeedback(size_t validBufferCount,
const VkBuffer *counterBuffers,
const VkDeviceSize *counterBufferOffsets,
bool rebindBuffers)
{ … }
void RenderPassCommandBufferHelper::endTransformFeedback()
{ … }
void RenderPassCommandBufferHelper::invalidateRenderPassColorAttachment(
const gl::State &state,
size_t colorIndexGL,
PackedAttachmentIndex attachmentIndex,
const gl::Rectangle &invalidateArea)
{ … }
void RenderPassCommandBufferHelper::invalidateRenderPassDepthAttachment(
const gl::DepthStencilState &dsState,
const gl::Rectangle &invalidateArea)
{ … }
void RenderPassCommandBufferHelper::invalidateRenderPassStencilAttachment(
const gl::DepthStencilState &dsState,
const gl::Rectangle &invalidateArea)
{ … }
angle::Result RenderPassCommandBufferHelper::flushToPrimary(Context *context,
CommandsState *commandsState,
const RenderPass &renderPass,
VkFramebuffer framebufferOverride)
{ … }
void RenderPassCommandBufferHelper::addColorResolveAttachment(size_t colorIndexGL,
ImageHelper *image,
VkImageView view,
gl::LevelIndex level,
uint32_t layerStart,
uint32_t layerCount,
UniqueSerial imageSiblingSerial)
{ … }
void RenderPassCommandBufferHelper::addDepthStencilResolveAttachment(
ImageHelper *image,
VkImageView view,
VkImageAspectFlags aspects,
gl::LevelIndex level,
uint32_t layerStart,
uint32_t layerCount,
UniqueSerial imageSiblingSerial)
{ … }
void RenderPassCommandBufferHelper::resumeTransformFeedback()
{ … }
void RenderPassCommandBufferHelper::pauseTransformFeedback()
{ … }
void RenderPassCommandBufferHelper::updateRenderPassColorClear(PackedAttachmentIndex colorIndexVk,
const VkClearValue &clearValue)
{ … }
void RenderPassCommandBufferHelper::updateRenderPassDepthStencilClear(
VkImageAspectFlags aspectFlags,
const VkClearValue &clearValue)
{ … }
void RenderPassCommandBufferHelper::growRenderArea(ContextVk *contextVk,
const gl::Rectangle &newRenderArea)
{ … }
angle::Result RenderPassCommandBufferHelper::attachCommandPool(Context *context,
SecondaryCommandPool *commandPool)
{ … }
void RenderPassCommandBufferHelper::detachCommandPool(SecondaryCommandPool **commandPoolOut)
{ … }
void RenderPassCommandBufferHelper::releaseCommandPool()
{ … }
void RenderPassCommandBufferHelper::attachAllocator(SecondaryCommandMemoryAllocator *allocator)
{ … }
SecondaryCommandMemoryAllocator *RenderPassCommandBufferHelper::detachAllocator()
{ … }
void RenderPassCommandBufferHelper::assertCanBeRecycled()
{ … }
std::string RenderPassCommandBufferHelper::getCommandDiagnostics()
{ … }
template <typename CommandBufferHelperT>
void CommandBufferRecycler<CommandBufferHelperT>::onDestroy()
{ … }
template void CommandBufferRecycler<OutsideRenderPassCommandBufferHelper>::onDestroy();
template void CommandBufferRecycler<RenderPassCommandBufferHelper>::onDestroy();
template <typename CommandBufferHelperT>
angle::Result CommandBufferRecycler<CommandBufferHelperT>::getCommandBufferHelper(
Context *context,
SecondaryCommandPool *commandPool,
SecondaryCommandMemoryAllocator *commandsAllocator,
CommandBufferHelperT **commandBufferHelperOut)
{ … }
template angle::Result
CommandBufferRecycler<OutsideRenderPassCommandBufferHelper>::getCommandBufferHelper(
Context *,
SecondaryCommandPool *,
SecondaryCommandMemoryAllocator *,
OutsideRenderPassCommandBufferHelper **);
template angle::Result CommandBufferRecycler<RenderPassCommandBufferHelper>::getCommandBufferHelper(
Context *,
SecondaryCommandPool *,
SecondaryCommandMemoryAllocator *,
RenderPassCommandBufferHelper **);
template <typename CommandBufferHelperT>
void CommandBufferRecycler<CommandBufferHelperT>::recycleCommandBufferHelper(
CommandBufferHelperT **commandBuffer)
{ … }
template void
CommandBufferRecycler<OutsideRenderPassCommandBufferHelper>::recycleCommandBufferHelper(
OutsideRenderPassCommandBufferHelper **);
template void CommandBufferRecycler<RenderPassCommandBufferHelper>::recycleCommandBufferHelper(
RenderPassCommandBufferHelper **);
void SecondaryCommandBufferCollector::collectCommandBuffer(
priv::SecondaryCommandBuffer &&commandBuffer)
{ … }
void SecondaryCommandBufferCollector::collectCommandBuffer(
VulkanSecondaryCommandBuffer &&commandBuffer)
{ … }
void SecondaryCommandBufferCollector::retireCommandBuffers()
{ … }
DynamicBuffer::DynamicBuffer()
: … { … }
DynamicBuffer::DynamicBuffer(DynamicBuffer &&other)
: … { … }
void DynamicBuffer::init(Renderer *renderer,
VkBufferUsageFlags usage,
size_t alignment,
size_t initialSize,
bool hostVisible)
{ … }
DynamicBuffer::~DynamicBuffer()
{ … }
angle::Result DynamicBuffer::allocateNewBuffer(Context *context)
{ … }
bool DynamicBuffer::allocateFromCurrentBuffer(size_t sizeInBytes, BufferHelper **bufferHelperOut)
{ … }
angle::Result DynamicBuffer::allocate(Context *context,
size_t sizeInBytes,
BufferHelper **bufferHelperOut,
bool *newBufferAllocatedOut)
{ … }
void DynamicBuffer::release(Renderer *renderer)
{ … }
void DynamicBuffer::updateQueueSerialAndReleaseInFlightBuffers(ContextVk *contextVk,
const QueueSerial &queueSerial)
{ … }
void DynamicBuffer::destroy(Renderer *renderer)
{ … }
void DynamicBuffer::requireAlignment(Renderer *renderer, size_t alignment)
{ … }
void DynamicBuffer::setMinimumSizeForTesting(size_t minSize)
{ … }
void DynamicBuffer::reset()
{ … }
BufferPool::BufferPool()
: … { … }
BufferPool::BufferPool(BufferPool &&other)
: … { … }
void BufferPool::initWithFlags(Renderer *renderer,
vma::VirtualBlockCreateFlags flags,
VkBufferUsageFlags usage,
VkDeviceSize initialSize,
uint32_t memoryTypeIndex,
VkMemoryPropertyFlags memoryPropertyFlags)
{ … }
BufferPool::~BufferPool()
{ … }
void BufferPool::pruneEmptyBuffers(Renderer *renderer)
{ … }
VkResult BufferPool::allocateNewBuffer(Context *context, VkDeviceSize sizeInBytes)
{ … }
VkResult BufferPool::allocateBuffer(Context *context,
VkDeviceSize sizeInBytes,
VkDeviceSize alignment,
BufferSuballocation *suballocation)
{ … }
void BufferPool::destroy(Renderer *renderer, bool orphanNonEmptyBufferBlock)
{ … }
VkDeviceSize BufferPool::getTotalEmptyMemorySize() const
{ … }
void BufferPool::addStats(std::ostringstream *out) const
{ … }
DescriptorPoolHelper::DescriptorPoolHelper() : … { … }
DescriptorPoolHelper::~DescriptorPoolHelper()
{ … }
angle::Result DescriptorPoolHelper::init(Context *context,
const std::vector<VkDescriptorPoolSize> &poolSizesIn,
uint32_t maxSets)
{ … }
void DescriptorPoolHelper::destroy(Renderer *renderer)
{ … }
void DescriptorPoolHelper::release(Renderer *renderer)
{ … }
bool DescriptorPoolHelper::allocateDescriptorSet(Context *context,
const DescriptorSetLayout &descriptorSetLayout,
VkDescriptorSet *descriptorSetsOut)
{ … }
DynamicDescriptorPool::DynamicDescriptorPool()
: … { … }
DynamicDescriptorPool::~DynamicDescriptorPool()
{ … }
DynamicDescriptorPool::DynamicDescriptorPool(DynamicDescriptorPool &&other)
: … { … }
DynamicDescriptorPool &DynamicDescriptorPool::operator=(DynamicDescriptorPool &&other)
{ … }
angle::Result DynamicDescriptorPool::init(Context *context,
const VkDescriptorPoolSize *setSizes,
size_t setSizeCount,
const DescriptorSetLayout &descriptorSetLayout)
{ … }
void DynamicDescriptorPool::destroy(Renderer *renderer)
{ … }
angle::Result DynamicDescriptorPool::allocateDescriptorSet(
Context *context,
const DescriptorSetLayout &descriptorSetLayout,
RefCountedDescriptorPoolBinding *bindingOut,
VkDescriptorSet *descriptorSetOut)
{ … }
angle::Result DynamicDescriptorPool::getOrAllocateDescriptorSet(
Context *context,
CommandBufferHelperCommon *commandBufferHelper,
const DescriptorSetDesc &desc,
const DescriptorSetLayout &descriptorSetLayout,
RefCountedDescriptorPoolBinding *bindingOut,
VkDescriptorSet *descriptorSetOut,
SharedDescriptorSetCacheKey *newSharedCacheKeyOut)
{ … }
angle::Result DynamicDescriptorPool::allocateNewPool(Context *context)
{ … }
void DynamicDescriptorPool::releaseCachedDescriptorSet(Renderer *renderer,
const DescriptorSetDesc &desc)
{ … }
void DynamicDescriptorPool::destroyCachedDescriptorSet(Renderer *renderer,
const DescriptorSetDesc &desc)
{ … }
void DynamicDescriptorPool::checkAndReleaseUnusedPool(Renderer *renderer,
RefCountedDescriptorPoolHelper *pool)
{ … }
uint32_t DynamicDescriptorPool::GetMaxSetsPerPoolForTesting()
{ … }
void DynamicDescriptorPool::SetMaxSetsPerPoolForTesting(uint32_t maxSetsPerPool)
{ … }
uint32_t DynamicDescriptorPool::GetMaxSetsPerPoolMultiplierForTesting()
{ … }
void DynamicDescriptorPool::SetMaxSetsPerPoolMultiplierForTesting(uint32_t maxSetsPerPoolMultiplier)
{ … }
template <typename Pool>
DynamicallyGrowingPool<Pool>::DynamicallyGrowingPool()
: … { … }
template <typename Pool>
DynamicallyGrowingPool<Pool>::~DynamicallyGrowingPool() = default;
template <typename Pool>
angle::Result DynamicallyGrowingPool<Pool>::initEntryPool(Context *contextVk, uint32_t poolSize)
{ … }
template <typename Pool>
void DynamicallyGrowingPool<Pool>::destroyEntryPool(VkDevice device)
{ … }
template <typename Pool>
bool DynamicallyGrowingPool<Pool>::findFreeEntryPool(ContextVk *contextVk)
{ … }
template <typename Pool>
angle::Result DynamicallyGrowingPool<Pool>::allocateNewEntryPool(ContextVk *contextVk, Pool &&pool)
{ … }
template <typename Pool>
void DynamicallyGrowingPool<Pool>::onEntryFreed(ContextVk *contextVk,
size_t poolIndex,
const ResourceUse &use)
{ … }
template <typename Pool>
angle::Result DynamicallyGrowingPool<Pool>::allocatePoolEntries(ContextVk *contextVk,
uint32_t entryCount,
uint32_t *poolIndex,
uint32_t *currentEntryOut)
{ … }
template <typename Pool>
DynamicallyGrowingPool<Pool>::PoolResource::PoolResource(Pool &&poolIn, uint32_t freedCountIn)
: … { … }
template <typename Pool>
DynamicallyGrowingPool<Pool>::PoolResource::PoolResource(PoolResource &&other)
: … { … }
DynamicQueryPool::DynamicQueryPool() = default;
DynamicQueryPool::~DynamicQueryPool() = default;
angle::Result DynamicQueryPool::init(ContextVk *contextVk, VkQueryType type, uint32_t poolSize)
{ … }
void DynamicQueryPool::destroy(VkDevice device)
{ … }
void DynamicQueryPool::destroyPoolImpl(VkDevice device, QueryPool &poolToDestroy)
{ … }
angle::Result DynamicQueryPool::allocateQuery(ContextVk *contextVk,
QueryHelper *queryOut,
uint32_t queryCount)
{ … }
angle::Result DynamicQueryPool::allocatePoolImpl(ContextVk *contextVk,
QueryPool &poolToAllocate,
uint32_t entriesToAllocate)
{ … }
void DynamicQueryPool::freeQuery(ContextVk *contextVk, QueryHelper *query)
{ … }
void QueryResult::setResults(uint64_t *results, uint32_t queryCount)
{ … }
QueryHelper::QueryHelper()
: … { … }
QueryHelper::~QueryHelper() { … }
QueryHelper::QueryHelper(QueryHelper &&rhs)
: … { … }
QueryHelper &QueryHelper::operator=(QueryHelper &&rhs)
{ … }
void QueryHelper::init(const DynamicQueryPool *dynamicQueryPool,
const size_t queryPoolIndex,
uint32_t query,
uint32_t queryCount)
{ … }
void QueryHelper::deinit()
{ … }
template <typename CommandBufferT>
void QueryHelper::beginQueryImpl(ContextVk *contextVk,
OutsideRenderPassCommandBuffer *resetCommandBuffer,
CommandBufferT *commandBuffer)
{ … }
template <typename CommandBufferT>
void QueryHelper::endQueryImpl(ContextVk *contextVk, CommandBufferT *commandBuffer)
{ … }
angle::Result QueryHelper::beginQuery(ContextVk *contextVk)
{ … }
angle::Result QueryHelper::endQuery(ContextVk *contextVk)
{ … }
template <typename CommandBufferT>
void QueryHelper::resetQueryPoolImpl(ContextVk *contextVk,
const QueryPool &queryPool,
CommandBufferT *commandBuffer)
{ … }
angle::Result QueryHelper::beginRenderPassQuery(ContextVk *contextVk)
{ … }
void QueryHelper::endRenderPassQuery(ContextVk *contextVk)
{ … }
angle::Result QueryHelper::flushAndWriteTimestamp(ContextVk *contextVk)
{ … }
void QueryHelper::writeTimestampToPrimary(ContextVk *contextVk, PrimaryCommandBuffer *primary)
{ … }
void QueryHelper::writeTimestamp(ContextVk *contextVk,
OutsideRenderPassCommandBuffer *commandBuffer)
{ … }
bool QueryHelper::hasSubmittedCommands() const
{ … }
angle::Result QueryHelper::getUint64ResultNonBlocking(ContextVk *contextVk,
QueryResult *resultOut,
bool *availableOut)
{ … }
angle::Result QueryHelper::getUint64Result(ContextVk *contextVk, QueryResult *resultOut)
{ … }
VkResult QueryHelper::getResultImpl(ContextVk *contextVk,
const VkQueryResultFlags flags,
QueryResult *resultOut)
{ … }
SemaphoreHelper::SemaphoreHelper() : … { … }
SemaphoreHelper::~SemaphoreHelper() { … }
SemaphoreHelper::SemaphoreHelper(SemaphoreHelper &&other)
: … { … }
SemaphoreHelper &SemaphoreHelper::operator=(SemaphoreHelper &&other)
{ … }
void SemaphoreHelper::init(const size_t semaphorePoolIndex, const Semaphore *semaphore)
{ … }
void SemaphoreHelper::deinit()
{ … }
PipelineStage GetPipelineStage(gl::ShaderType stage)
{ … }
void PipelineBarrier::addDiagnosticsString(std::ostringstream &out) const
{ … }
void PipelineBarrierArray::execute(Renderer *renderer, PrimaryCommandBuffer *primary)
{ … }
void PipelineBarrierArray::addDiagnosticsString(std::ostringstream &out) const
{ … }
BufferHelper::BufferHelper()
: … { … }
BufferHelper::~BufferHelper()
{ … }
BufferHelper::BufferHelper(BufferHelper &&other)
{ … }
BufferHelper &BufferHelper::operator=(BufferHelper &&other)
{ … }
angle::Result BufferHelper::init(Context *context,
const VkBufferCreateInfo &requestedCreateInfo,
VkMemoryPropertyFlags memoryPropertyFlags)
{ … }
angle::Result BufferHelper::initExternal(Context *context,
VkMemoryPropertyFlags memoryProperties,
const VkBufferCreateInfo &requestedCreateInfo,
GLeglClientBufferEXT clientBuffer)
{ … }
VkResult BufferHelper::initSuballocation(Context *context,
uint32_t memoryTypeIndex,
size_t size,
size_t alignment,
BufferUsageType usageType,
BufferPool *pool)
{ … }
void BufferHelper::initializeBarrierTracker(Context *context)
{ … }
angle::Result BufferHelper::initializeNonZeroMemory(Context *context,
VkBufferUsageFlags usage,
VkDeviceSize size)
{ … }
const Buffer &BufferHelper::getBufferForVertexArray(ContextVk *contextVk,
VkDeviceSize actualDataSize,
VkDeviceSize *offsetOut)
{ … }
bool BufferHelper::onBufferUserSizeChange(Renderer *renderer)
{ … }
void BufferHelper::destroy(Renderer *renderer)
{ … }
void BufferHelper::release(Renderer *renderer)
{ … }
void BufferHelper::releaseBufferAndDescriptorSetCache(Renderer *renderer)
{ … }
angle::Result BufferHelper::map(Context *context, uint8_t **ptrOut)
{ … }
angle::Result BufferHelper::mapWithOffset(Context *context, uint8_t **ptrOut, size_t offset)
{ … }
angle::Result BufferHelper::flush(Renderer *renderer, VkDeviceSize offset, VkDeviceSize size)
{ … }
angle::Result BufferHelper::flush(Renderer *renderer)
{ … }
angle::Result BufferHelper::invalidate(Renderer *renderer, VkDeviceSize offset, VkDeviceSize size)
{ … }
angle::Result BufferHelper::invalidate(Renderer *renderer)
{ … }
void BufferHelper::changeQueueFamily(uint32_t srcQueueFamilyIndex,
uint32_t dstQueueFamilyIndex,
OutsideRenderPassCommandBuffer *commandBuffer)
{ … }
void BufferHelper::acquireFromExternal(DeviceQueueIndex externalQueueFamilyIndex,
DeviceQueueIndex newDeviceQueueIndex,
OutsideRenderPassCommandBuffer *commandBuffer)
{ … }
void BufferHelper::releaseToExternal(DeviceQueueIndex externalQueueIndex,
OutsideRenderPassCommandBuffer *commandBuffer)
{ … }
bool BufferHelper::isReleasedToExternal() const
{ … }
void BufferHelper::recordReadBarrier(VkAccessFlags readAccessType,
VkPipelineStageFlags readStage,
PipelineStage stageIndex,
PipelineBarrierArray *barriers)
{ … }
void BufferHelper::recordWriteBarrier(VkAccessFlags writeAccessType,
VkPipelineStageFlags writeStage,
PipelineStage stageIndex,
PipelineBarrierArray *barriers)
{ … }
void BufferHelper::fillWithColor(const angle::Color<uint8_t> &color,
const gl::InternalFormat &internalFormat)
{ … }
angle::Result InitMappableDeviceMemory(Context *context,
DeviceMemory *deviceMemory,
VkDeviceSize size,
int value,
VkMemoryPropertyFlags memoryPropertyFlags)
{ … }
ImageHelper::ImageHelper()
{ … }
ImageHelper::~ImageHelper()
{ … }
void ImageHelper::resetCachedProperties()
{ … }
void ImageHelper::setEntireContentDefined()
{ … }
void ImageHelper::setEntireContentUndefined()
{ … }
void ImageHelper::setContentDefined(LevelIndex levelStart,
uint32_t levelCount,
uint32_t layerStart,
uint32_t layerCount,
VkImageAspectFlags aspectFlags)
{ … }
ImageHelper::LevelContentDefinedMask &ImageHelper::getLevelContentDefined(LevelIndex level)
{ … }
ImageHelper::LevelContentDefinedMask &ImageHelper::getLevelStencilContentDefined(LevelIndex level)
{ … }
const ImageHelper::LevelContentDefinedMask &ImageHelper::getLevelContentDefined(
LevelIndex level) const
{ … }
const ImageHelper::LevelContentDefinedMask &ImageHelper::getLevelStencilContentDefined(
LevelIndex level) const
{ … }
YcbcrConversionDesc ImageHelper::deriveConversionDesc(Context *context,
angle::FormatID actualFormatID,
angle::FormatID intendedFormatID)
{ … }
angle::Result ImageHelper::init(Context *context,
gl::TextureType textureType,
const VkExtent3D &extents,
const Format &format,
GLint samples,
VkImageUsageFlags usage,
gl::LevelIndex firstLevel,
uint32_t mipLevels,
uint32_t layerCount,
bool isRobustResourceInitEnabled,
bool hasProtectedContent)
{ … }
angle::Result ImageHelper::initMSAASwapchain(Context *context,
gl::TextureType textureType,
const VkExtent3D &extents,
bool rotatedAspectRatio,
const Format &format,
GLint samples,
VkImageUsageFlags usage,
gl::LevelIndex firstLevel,
uint32_t mipLevels,
uint32_t layerCount,
bool isRobustResourceInitEnabled,
bool hasProtectedContent)
{ … }
angle::Result ImageHelper::initExternal(Context *context,
gl::TextureType textureType,
const VkExtent3D &extents,
angle::FormatID intendedFormatID,
angle::FormatID actualFormatID,
GLint samples,
VkImageUsageFlags usage,
VkImageCreateFlags additionalCreateFlags,
ImageLayout initialLayout,
const void *externalImageCreateInfo,
gl::LevelIndex firstLevel,
uint32_t mipLevels,
uint32_t layerCount,
bool isRobustResourceInitEnabled,
bool hasProtectedContent,
YcbcrConversionDesc conversionDesc)
{ … }
const void *ImageHelper::DeriveCreateInfoPNext(
Context *context,
angle::FormatID actualFormatID,
const void *pNext,
VkImageFormatListCreateInfoKHR *imageFormatListInfoStorage,
std::array<VkFormat, kImageListFormatCount> *imageListFormatsStorage,
VkImageCreateFlags *createFlagsOut)
{ … }
bool ImageHelper::FormatSupportsUsage(Renderer *renderer,
VkFormat format,
VkImageType imageType,
VkImageTiling tilingMode,
VkImageUsageFlags usageFlags,
VkImageCreateFlags createFlags,
void *propertiesPNext,
const FormatSupportCheck formatSupportCheck)
{ … }
void ImageHelper::setImageFormatsFromActualFormat(VkFormat actualFormat,
ImageFormats &imageFormatsOut)
{ … }
void ImageHelper::deriveImageViewFormatFromCreateInfoPNext(VkImageCreateInfo &imageInfo,
ImageFormats &formatOut)
{ … }
void ImageHelper::deriveExternalImageTiling(const void *createInfoChain)
{ … }
void ImageHelper::releaseImage(Renderer *renderer)
{ … }
void ImageHelper::releaseImageFromShareContexts(Renderer *renderer,
ContextVk *contextVk,
UniqueSerial imageSiblingSerial)
{ … }
void ImageHelper::finalizeImageLayoutInShareContexts(Renderer *renderer,
ContextVk *contextVk,
UniqueSerial imageSiblingSerial)
{ … }
void ImageHelper::releaseStagedUpdates(Renderer *renderer)
{ … }
void ImageHelper::resetImageWeakReference()
{ … }
angle::Result ImageHelper::initializeNonZeroMemory(Context *context,
bool hasProtectedContent,
VkMemoryPropertyFlags flags,
VkDeviceSize size)
{ … }
VkResult ImageHelper::initMemory(Context *context,
const MemoryProperties &memoryProperties,
VkMemoryPropertyFlags flags,
VkMemoryPropertyFlags excludedFlags,
const VkMemoryRequirements *memoryRequirements,
const bool allocateDedicatedMemory,
MemoryAllocationType allocationType,
VkMemoryPropertyFlags *flagsOut,
VkDeviceSize *sizeOut)
{ … }
angle::Result ImageHelper::initMemoryAndNonZeroFillIfNeeded(
Context *context,
bool hasProtectedContent,
const MemoryProperties &memoryProperties,
VkMemoryPropertyFlags flags,
MemoryAllocationType allocationType)
{ … }
angle::Result ImageHelper::initExternalMemory(Context *context,
const MemoryProperties &memoryProperties,
const VkMemoryRequirements &memoryRequirements,
uint32_t extraAllocationInfoCount,
const void **extraAllocationInfo,
DeviceQueueIndex currentDeviceQueueIndex,
VkMemoryPropertyFlags flags)
{ … }
angle::Result ImageHelper::initImageView(Context *context,
gl::TextureType textureType,
VkImageAspectFlags aspectMask,
const gl::SwizzleState &swizzleMap,
ImageView *imageViewOut,
LevelIndex baseMipLevelVk,
uint32_t levelCount,
VkImageUsageFlags imageUsageFlags)
{ … }
angle::Result ImageHelper::initLayerImageView(Context *context,
gl::TextureType textureType,
VkImageAspectFlags aspectMask,
const gl::SwizzleState &swizzleMap,
ImageView *imageViewOut,
LevelIndex baseMipLevelVk,
uint32_t levelCount,
uint32_t baseArrayLayer,
uint32_t layerCount,
gl::SrgbWriteControlMode srgbWriteControlMode,
gl::YuvSamplingMode yuvSamplingMode,
VkImageUsageFlags imageUsageFlags) const
{ … }
angle::Result ImageHelper::initLayerImageViewImpl(Context *context,
gl::TextureType textureType,
VkImageAspectFlags aspectMask,
const gl::SwizzleState &swizzleMap,
ImageView *imageViewOut,
LevelIndex baseMipLevelVk,
uint32_t levelCount,
uint32_t baseArrayLayer,
uint32_t layerCount,
VkFormat imageFormat,
VkImageUsageFlags usageFlags,
gl::YuvSamplingMode yuvSamplingMode) const
{ … }
angle::Result ImageHelper::initReinterpretedLayerImageView(Context *context,
gl::TextureType textureType,
VkImageAspectFlags aspectMask,
const gl::SwizzleState &swizzleMap,
ImageView *imageViewOut,
LevelIndex baseMipLevelVk,
uint32_t levelCount,
uint32_t baseArrayLayer,
uint32_t layerCount,
VkImageUsageFlags imageUsageFlags,
angle::FormatID imageViewFormat) const
{ … }
void ImageHelper::destroy(Renderer *renderer)
{ … }
void ImageHelper::init2DWeakReference(Context *context,
VkImage handle,
const gl::Extents &glExtents,
bool rotatedAspectRatio,
angle::FormatID intendedFormatID,
angle::FormatID actualFormatID,
VkImageCreateFlags createFlags,
VkImageUsageFlags usage,
GLint samples,
bool isRobustResourceInitEnabled)
{ … }
angle::Result ImageHelper::init2DStaging(Context *context,
bool hasProtectedContent,
const MemoryProperties &memoryProperties,
const gl::Extents &glExtents,
angle::FormatID intendedFormatID,
angle::FormatID actualFormatID,
VkImageUsageFlags usage,
uint32_t layerCount)
{ … }
angle::Result ImageHelper::initStaging(Context *context,
bool hasProtectedContent,
const MemoryProperties &memoryProperties,
VkImageType imageType,
const VkExtent3D &extents,
angle::FormatID intendedFormatID,
angle::FormatID actualFormatID,
GLint samples,
VkImageUsageFlags usage,
uint32_t mipLevels,
uint32_t layerCount)
{ … }
angle::Result ImageHelper::initImplicitMultisampledRenderToTexture(
Context *context,
bool hasProtectedContent,
const MemoryProperties &memoryProperties,
gl::TextureType textureType,
GLint samples,
const ImageHelper &resolveImage,
const VkExtent3D &multisampleImageExtents,
bool isRobustResourceInitEnabled)
{ … }
VkImageAspectFlags ImageHelper::getAspectFlags() const
{ … }
bool ImageHelper::isCombinedDepthStencilFormat() const
{ … }
VkImageLayout ImageHelper::getCurrentLayout(Renderer *renderer) const
{ … }
gl::Extents ImageHelper::getLevelExtents(LevelIndex levelVk) const
{ … }
gl::Extents ImageHelper::getLevelExtents2D(LevelIndex levelVk) const
{ … }
const VkExtent3D ImageHelper::getRotatedExtents() const
{ … }
gl::Extents ImageHelper::getRotatedLevelExtents2D(LevelIndex levelVk) const
{ … }
bool ImageHelper::isDepthOrStencil() const
{ … }
void ImageHelper::setRenderPassUsageFlag(RenderPassUsage flag)
{ … }
void ImageHelper::clearRenderPassUsageFlag(RenderPassUsage flag)
{ … }
void ImageHelper::resetRenderPassUsageFlags()
{ … }
bool ImageHelper::hasRenderPassUsageFlag(RenderPassUsage flag) const
{ … }
bool ImageHelper::usedByCurrentRenderPassAsAttachmentAndSampler(
RenderPassUsage textureSamplerUsage) const
{ … }
bool ImageHelper::isReadBarrierNecessary(Renderer *renderer, ImageLayout newLayout) const
{ … }
bool ImageHelper::isReadSubresourceBarrierNecessary(ImageLayout newLayout,
gl::LevelIndex levelStart,
uint32_t levelCount,
uint32_t layerStart,
uint32_t layerCount) const
{ … }
bool ImageHelper::isWriteBarrierNecessary(ImageLayout newLayout,
gl::LevelIndex levelStart,
uint32_t levelCount,
uint32_t layerStart,
uint32_t layerCount) const
{ … }
void ImageHelper::changeLayoutAndQueue(Context *context,
VkImageAspectFlags aspectMask,
ImageLayout newLayout,
DeviceQueueIndex newDeviceQueueIndex,
OutsideRenderPassCommandBuffer *commandBuffer)
{ … }
void ImageHelper::acquireFromExternal(Context *context,
DeviceQueueIndex externalQueueIndex,
DeviceQueueIndex newDeviceQueueIndex,
ImageLayout currentLayout,
OutsideRenderPassCommandBuffer *commandBuffer)
{ … }
void ImageHelper::releaseToExternal(Context *context,
DeviceQueueIndex externalQueueIndex,
ImageLayout desiredLayout,
OutsideRenderPassCommandBuffer *commandBuffer)
{ … }
bool ImageHelper::isReleasedToExternal() const
{ … }
LevelIndex ImageHelper::toVkLevel(gl::LevelIndex levelIndexGL) const
{ … }
gl::LevelIndex ImageHelper::toGLLevel(LevelIndex levelIndexVk) const
{ … }
ANGLE_INLINE void ImageHelper::initImageMemoryBarrierStruct(
Renderer *renderer,
VkImageAspectFlags aspectMask,
ImageLayout newLayout,
uint32_t newQueueFamilyIndex,
VkImageMemoryBarrier *imageMemoryBarrier) const
{ … }
template <typename CommandBufferT>
void ImageHelper::barrierImpl(Context *context,
VkImageAspectFlags aspectMask,
ImageLayout newLayout,
DeviceQueueIndex newDeviceQueueIndex,
RefCountedEventCollector *eventCollector,
CommandBufferT *commandBuffer,
VkSemaphore *acquireNextImageSemaphoreOut)
{ … }
template void ImageHelper::barrierImpl<priv::CommandBuffer>(
Context *context,
VkImageAspectFlags aspectMask,
ImageLayout newLayout,
DeviceQueueIndex newDeviceQueueIndex,
RefCountedEventCollector *eventCollector,
priv::CommandBuffer *commandBuffer,
VkSemaphore *acquireNextImageSemaphoreOut);
void ImageHelper::setSubresourcesWrittenSinceBarrier(gl::LevelIndex levelStart,
uint32_t levelCount,
uint32_t layerStart,
uint32_t layerCount)
{ … }
void ImageHelper::resetSubresourcesWrittenSinceBarrier()
{ … }
void ImageHelper::recordWriteBarrier(Context *context,
VkImageAspectFlags aspectMask,
ImageLayout newLayout,
gl::LevelIndex levelStart,
uint32_t levelCount,
uint32_t layerStart,
uint32_t layerCount,
OutsideRenderPassCommandBufferHelper *commands)
{ … }
void ImageHelper::recordReadSubresourceBarrier(Context *context,
VkImageAspectFlags aspectMask,
ImageLayout newLayout,
gl::LevelIndex levelStart,
uint32_t levelCount,
uint32_t layerStart,
uint32_t layerCount,
OutsideRenderPassCommandBufferHelper *commands)
{ … }
void ImageHelper::recordReadBarrier(Context *context,
VkImageAspectFlags aspectMask,
ImageLayout newLayout,
OutsideRenderPassCommandBufferHelper *commands)
{ … }
void ImageHelper::updateLayoutAndBarrier(Context *context,
VkImageAspectFlags aspectMask,
ImageLayout newLayout,
BarrierType barrierType,
const QueueSerial &queueSerial,
PipelineBarrierArray *pipelineBarriers,
EventBarrierArray *eventBarriers,
RefCountedEventCollector *eventCollector,
VkSemaphore *semaphoreOut)
{ … }
void ImageHelper::setCurrentRefCountedEvent(Context *context, EventMaps &eventMaps)
{ … }
void ImageHelper::updatePipelineStageAccessHistory()
{ … }
void ImageHelper::clearColor(Renderer *renderer,
const VkClearColorValue &color,
LevelIndex baseMipLevelVk,
uint32_t levelCount,
uint32_t baseArrayLayer,
uint32_t layerCount,
OutsideRenderPassCommandBuffer *commandBuffer)
{ … }
void ImageHelper::clearDepthStencil(Renderer *renderer,
VkImageAspectFlags clearAspectFlags,
const VkClearDepthStencilValue &depthStencil,
LevelIndex baseMipLevelVk,
uint32_t levelCount,
uint32_t baseArrayLayer,
uint32_t layerCount,
OutsideRenderPassCommandBuffer *commandBuffer)
{ … }
void ImageHelper::clear(Renderer *renderer,
VkImageAspectFlags aspectFlags,
const VkClearValue &value,
LevelIndex mipLevel,
uint32_t baseArrayLayer,
uint32_t layerCount,
OutsideRenderPassCommandBuffer *commandBuffer)
{ … }
angle::Result ImageHelper::clearEmulatedChannels(ContextVk *contextVk,
VkColorComponentFlags colorMaskFlags,
const VkClearValue &value,
LevelIndex mipLevel,
uint32_t baseArrayLayer,
uint32_t layerCount)
{ … }
void ImageHelper::Copy(Renderer *renderer,
ImageHelper *srcImage,
ImageHelper *dstImage,
const gl::Offset &srcOffset,
const gl::Offset &dstOffset,
const gl::Extents ©Size,
const VkImageSubresourceLayers &srcSubresource,
const VkImageSubresourceLayers &dstSubresource,
OutsideRenderPassCommandBuffer *commandBuffer)
{ … }
angle::Result ImageHelper::CopyImageSubData(const gl::Context *context,
ImageHelper *srcImage,
GLint srcLevel,
GLint srcX,
GLint srcY,
GLint srcZ,
ImageHelper *dstImage,
GLint dstLevel,
GLint dstX,
GLint dstY,
GLint dstZ,
GLsizei srcWidth,
GLsizei srcHeight,
GLsizei srcDepth)
{ … }
angle::Result ImageHelper::generateMipmapsWithBlit(ContextVk *contextVk,
LevelIndex baseLevel,
LevelIndex maxLevel)
{ … }
void ImageHelper::resolve(ImageHelper *dst,
const VkImageResolve ®ion,
OutsideRenderPassCommandBuffer *commandBuffer)
{ … }
void ImageHelper::removeSingleSubresourceStagedUpdates(ContextVk *contextVk,
gl::LevelIndex levelIndexGL,
uint32_t layerIndex,
uint32_t layerCount)
{ … }
void ImageHelper::removeSingleStagedClearAfterInvalidate(gl::LevelIndex levelIndexGL,
uint32_t layerIndex,
uint32_t layerCount)
{ … }
void ImageHelper::removeStagedUpdates(Context *context,
gl::LevelIndex levelGLStart,
gl::LevelIndex levelGLEnd)
{ … }
angle::Result ImageHelper::stageSubresourceUpdateImpl(ContextVk *contextVk,
const gl::ImageIndex &index,
const gl::Extents &glExtents,
const gl::Offset &offset,
const gl::InternalFormat &formatInfo,
const gl::PixelUnpackState &unpack,
GLenum type,
const uint8_t *pixels,
const Format &vkFormat,
ImageAccess access,
const GLuint inputRowPitch,
const GLuint inputDepthPitch,
const GLuint inputSkipBytes,
ApplyImageUpdate applyUpdate,
bool *updateAppliedImmediatelyOut)
{ … }
angle::Result ImageHelper::updateSubresourceOnHost(Context *context,
ApplyImageUpdate applyUpdate,
const gl::ImageIndex &index,
const gl::Extents &glExtents,
const gl::Offset &offset,
const uint8_t *source,
const GLuint memoryRowLength,
const GLuint memoryImageHeight,
bool *copiedOut)
{ … }
angle::Result ImageHelper::reformatStagedBufferUpdates(ContextVk *contextVk,
angle::FormatID srcFormatID,
angle::FormatID dstFormatID)
{ … }
angle::Result ImageHelper::CalculateBufferInfo(ContextVk *contextVk,
const gl::Extents &glExtents,
const gl::InternalFormat &formatInfo,
const gl::PixelUnpackState &unpack,
GLenum type,
bool is3D,
GLuint *inputRowPitch,
GLuint *inputDepthPitch,
GLuint *inputSkipBytes)
{ … }
void ImageHelper::onRenderPassAttach(const QueueSerial &queueSerial)
{ … }
void ImageHelper::onWrite(gl::LevelIndex levelStart,
uint32_t levelCount,
uint32_t layerStart,
uint32_t layerCount,
VkImageAspectFlags aspectFlags)
{ … }
bool ImageHelper::hasSubresourceDefinedContent(gl::LevelIndex level,
uint32_t layerIndex,
uint32_t layerCount) const
{ … }
bool ImageHelper::hasSubresourceDefinedStencilContent(gl::LevelIndex level,
uint32_t layerIndex,
uint32_t layerCount) const
{ … }
void ImageHelper::invalidateSubresourceContent(ContextVk *contextVk,
gl::LevelIndex level,
uint32_t layerIndex,
uint32_t layerCount,
bool *preferToKeepContentsDefinedOut)
{ … }
void ImageHelper::invalidateSubresourceStencilContent(ContextVk *contextVk,
gl::LevelIndex level,
uint32_t layerIndex,
uint32_t layerCount,
bool *preferToKeepContentsDefinedOut)
{ … }
void ImageHelper::invalidateSubresourceContentImpl(ContextVk *contextVk,
gl::LevelIndex level,
uint32_t layerIndex,
uint32_t layerCount,
VkImageAspectFlagBits aspect,
LevelContentDefinedMask *contentDefinedMask,
bool *preferToKeepContentsDefinedOut)
{ … }
void ImageHelper::restoreSubresourceContent(gl::LevelIndex level,
uint32_t layerIndex,
uint32_t layerCount)
{ … }
void ImageHelper::restoreSubresourceStencilContent(gl::LevelIndex level,
uint32_t layerIndex,
uint32_t layerCount)
{ … }
void ImageHelper::restoreSubresourceContentImpl(gl::LevelIndex level,
uint32_t layerIndex,
uint32_t layerCount,
VkImageAspectFlagBits aspect,
LevelContentDefinedMask *contentDefinedMask)
{ … }
angle::Result ImageHelper::stageSubresourceUpdate(ContextVk *contextVk,
const gl::ImageIndex &index,
const gl::Extents &glExtents,
const gl::Offset &offset,
const gl::InternalFormat &formatInfo,
const gl::PixelUnpackState &unpack,
GLenum type,
const uint8_t *pixels,
const Format &vkFormat,
ImageAccess access,
ApplyImageUpdate applyUpdate,
bool *updateAppliedImmediatelyOut)
{ … }
angle::Result ImageHelper::stageSubresourceUpdateAndGetData(ContextVk *contextVk,
size_t allocationSize,
const gl::ImageIndex &imageIndex,
const gl::Extents &glExtents,
const gl::Offset &offset,
uint8_t **dstData,
angle::FormatID formatID)
{ … }
angle::Result ImageHelper::stageSubresourceUpdateFromFramebuffer(
const gl::Context *context,
const gl::ImageIndex &index,
const gl::Rectangle &sourceArea,
const gl::Offset &dstOffset,
const gl::Extents &dstExtent,
const gl::InternalFormat &formatInfo,
ImageAccess access,
FramebufferVk *framebufferVk)
{ … }
void ImageHelper::stageSubresourceUpdateFromImage(RefCounted<ImageHelper> *image,
const gl::ImageIndex &index,
LevelIndex srcMipLevel,
const gl::Offset &destOffset,
const gl::Extents &glExtents,
const VkImageType imageType)
{ … }
void ImageHelper::stageSubresourceUpdatesFromAllImageLevels(RefCounted<ImageHelper> *image,
gl::LevelIndex baseLevel)
{ … }
void ImageHelper::stageClear(const gl::ImageIndex &index,
VkImageAspectFlags aspectFlags,
const VkClearValue &clearValue)
{ … }
void ImageHelper::stageRobustResourceClear(const gl::ImageIndex &index)
{ … }
angle::Result ImageHelper::stageResourceClearWithFormat(ContextVk *contextVk,
const gl::ImageIndex &index,
const gl::Extents &glExtents,
const angle::Format &intendedFormat,
const angle::Format &imageFormat,
const VkClearValue &clearValue)
{ … }
angle::Result ImageHelper::stageRobustResourceClearWithFormat(ContextVk *contextVk,
const gl::ImageIndex &index,
const gl::Extents &glExtents,
const angle::Format &intendedFormat,
const angle::Format &imageFormat)
{ … }
void ImageHelper::stageClearIfEmulatedFormat(bool isRobustResourceInitEnabled, bool isExternalImage)
{ … }
bool ImageHelper::verifyEmulatedClearsAreBeforeOtherUpdates(
const std::vector<SubresourceUpdate> &updates)
{ … }
void ImageHelper::stageSelfAsSubresourceUpdates(
ContextVk *contextVk,
uint32_t levelCount,
gl::TextureType textureType,
const gl::CubeFaceArray<gl::TexLevelMask> &skipLevels)
{ … }
angle::Result ImageHelper::flushSingleSubresourceStagedUpdates(ContextVk *contextVk,
gl::LevelIndex levelGL,
uint32_t layer,
uint32_t layerCount,
ClearValuesArray *deferredClears,
uint32_t deferredClearIndex)
{ … }
angle::Result ImageHelper::flushStagedClearEmulatedChannelsUpdates(ContextVk *contextVk,
gl::LevelIndex levelGLStart,
gl::LevelIndex levelGLLimit,
bool *otherUpdatesToFlushOut)
{ … }
angle::Result ImageHelper::flushStagedUpdatesImpl(ContextVk *contextVk,
gl::LevelIndex levelGLStart,
gl::LevelIndex levelGLEnd,
uint32_t layerStart,
uint32_t layerEnd,
const gl::TexLevelMask &skipLevelsAllFaces)
{ … }
angle::Result ImageHelper::flushStagedUpdates(ContextVk *contextVk,
gl::LevelIndex levelGLStart,
gl::LevelIndex levelGLEnd,
uint32_t layerStart,
uint32_t layerEnd,
const gl::CubeFaceArray<gl::TexLevelMask> &skipLevels)
{ … }
angle::Result ImageHelper::flushAllStagedUpdates(ContextVk *contextVk)
{ … }
bool ImageHelper::hasStagedUpdatesForSubresource(gl::LevelIndex levelGL,
uint32_t layer,
uint32_t layerCount) const
{ … }
bool ImageHelper::removeStagedClearUpdatesAndReturnColor(gl::LevelIndex levelGL,
const VkClearColorValue **color)
{ … }
void ImageHelper::adjustLayerRange(const std::vector<SubresourceUpdate> &levelUpdates,
uint32_t *layerStart,
uint32_t *layerEnd)
{ … }
gl::LevelIndex ImageHelper::getLastAllocatedLevel() const
{ … }
bool ImageHelper::hasStagedUpdatesInAllocatedLevels() const
{ … }
bool ImageHelper::hasStagedUpdatesInLevels(gl::LevelIndex levelStart, gl::LevelIndex levelEnd) const
{ … }
bool ImageHelper::hasStagedImageUpdatesWithMismatchedFormat(gl::LevelIndex levelStart,
gl::LevelIndex levelEnd,
angle::FormatID formatID) const
{ … }
bool ImageHelper::hasBufferSourcedStagedUpdatesInAllLevels() const
{ … }
bool ImageHelper::validateSubresourceUpdateBufferRefConsistent(
RefCounted<BufferHelper> *buffer) const
{ … }
bool ImageHelper::validateSubresourceUpdateImageRefConsistent(RefCounted<ImageHelper> *image) const
{ … }
bool ImageHelper::validateSubresourceUpdateRefCountsConsistent() const
{ … }
void ImageHelper::pruneSupersededUpdatesForLevel(ContextVk *contextVk,
const gl::LevelIndex level,
const PruneReason reason)
{ … }
void ImageHelper::removeSupersededUpdates(ContextVk *contextVk,
const gl::TexLevelMask skipLevelsAllFaces)
{ … }
angle::Result ImageHelper::copyImageDataToBuffer(ContextVk *contextVk,
gl::LevelIndex sourceLevelGL,
uint32_t layerCount,
uint32_t baseLayer,
const gl::Box &sourceArea,
BufferHelper *dstBuffer,
uint8_t **outDataPtr)
{ … }
angle::Result ImageHelper::copySurfaceImageToBuffer(DisplayVk *displayVk,
gl::LevelIndex sourceLevelGL,
uint32_t layerCount,
uint32_t baseLayer,
const gl::Box &sourceArea,
vk::BufferHelper *bufferHelper)
{ … }
angle::Result ImageHelper::copyBufferToSurfaceImage(DisplayVk *displayVk,
gl::LevelIndex sourceLevelGL,
uint32_t layerCount,
uint32_t baseLayer,
const gl::Box &sourceArea,
vk::BufferHelper *bufferHelper)
{ … }
angle::Result ImageHelper::GetReadPixelsParams(ContextVk *contextVk,
const gl::PixelPackState &packState,
gl::Buffer *packBuffer,
GLenum format,
GLenum type,
const gl::Rectangle &area,
const gl::Rectangle &clippedArea,
PackPixelsParams *paramsOut,
GLuint *skipBytesOut)
{ … }
angle::Result ImageHelper::readPixelsForGetImage(ContextVk *contextVk,
const gl::PixelPackState &packState,
gl::Buffer *packBuffer,
gl::LevelIndex levelGL,
uint32_t layer,
uint32_t layerCount,
GLenum format,
GLenum type,
void *pixels)
{ … }
angle::Result ImageHelper::readPixelsForCompressedGetImage(ContextVk *contextVk,
const gl::PixelPackState &packState,
gl::Buffer *packBuffer,
gl::LevelIndex levelGL,
uint32_t layer,
uint32_t layerCount,
void *pixels)
{ … }
angle::Result ImageHelper::readPixelsWithCompute(ContextVk *contextVk,
ImageHelper *src,
const PackPixelsParams &packPixelsParams,
const VkOffset3D &srcOffset,
const VkExtent3D &srcExtent,
ptrdiff_t pixelsOffset,
const VkImageSubresourceLayers &srcSubresource)
{ … }
bool ImageHelper::canCopyWithTransformForReadPixels(const PackPixelsParams &packPixelsParams,
const VkExtent3D &srcExtent,
const angle::Format *readFormat,
ptrdiff_t pixelsOffset)
{ … }
bool ImageHelper::canCopyWithComputeForReadPixels(const PackPixelsParams &packPixelsParams,
const VkExtent3D &srcExtent,
const angle::Format *readFormat,
ptrdiff_t pixelsOffset)
{ … }
angle::Result ImageHelper::readPixels(ContextVk *contextVk,
const gl::Rectangle &area,
const PackPixelsParams &packPixelsParams,
VkImageAspectFlagBits copyAspectFlags,
gl::LevelIndex levelGL,
uint32_t layer,
void *pixels)
{ … }
angle::Result ImageHelper::readPixelsImpl(ContextVk *contextVk,
const gl::Rectangle &area,
const PackPixelsParams &packPixelsParams,
VkImageAspectFlagBits copyAspectFlags,
gl::LevelIndex levelGL,
uint32_t layer,
void *pixels)
{ … }
angle::Result ImageHelper::packReadPixelBuffer(ContextVk *contextVk,
const gl::Rectangle &area,
const PackPixelsParams &packPixelsParams,
const angle::Format &readFormat,
const angle::Format &aspectFormat,
const uint8_t *readPixelBuffer,
gl::LevelIndex levelGL,
void *pixels)
{ … }
ImageHelper::SubresourceUpdate::SubresourceUpdate() : … { … }
ImageHelper::SubresourceUpdate::~SubresourceUpdate() { … }
ImageHelper::SubresourceUpdate::SubresourceUpdate(RefCounted<BufferHelper> *bufferIn,
BufferHelper *bufferHelperIn,
const VkBufferImageCopy ©RegionIn,
angle::FormatID formatID)
: … { … }
ImageHelper::SubresourceUpdate::SubresourceUpdate(RefCounted<ImageHelper> *imageIn,
const VkImageCopy ©RegionIn,
angle::FormatID formatID)
: … { … }
ImageHelper::SubresourceUpdate::SubresourceUpdate(VkImageAspectFlags aspectFlags,
const VkClearValue &clearValue,
const gl::ImageIndex &imageIndex)
: … { … }
ImageHelper::SubresourceUpdate::SubresourceUpdate(VkImageAspectFlags aspectFlags,
const VkClearValue &clearValue,
gl::LevelIndex level,
uint32_t layerIndex,
uint32_t layerCount)
: … { … }
ImageHelper::SubresourceUpdate::SubresourceUpdate(VkColorComponentFlags colorMaskFlags,
const VkClearColorValue &clearValue,
const gl::ImageIndex &imageIndex)
: … { … }
ImageHelper::SubresourceUpdate::SubresourceUpdate(SubresourceUpdate &&other)
: … { … }
ImageHelper::SubresourceUpdate &ImageHelper::SubresourceUpdate::operator=(SubresourceUpdate &&other)
{ … }
void ImageHelper::SubresourceUpdate::release(Renderer *renderer)
{ … }
bool ImageHelper::SubresourceUpdate::matchesLayerRange(uint32_t layerIndex,
uint32_t layerCount) const
{ … }
bool ImageHelper::SubresourceUpdate::intersectsLayerRange(uint32_t layerIndex,
uint32_t layerCount) const
{ … }
void ImageHelper::SubresourceUpdate::getDestSubresource(uint32_t imageLayerCount,
uint32_t *baseLayerOut,
uint32_t *layerCountOut) const
{ … }
VkImageAspectFlags ImageHelper::SubresourceUpdate::getDestAspectFlags() const
{ … }
size_t ImageHelper::getLevelUpdateCount(gl::LevelIndex level) const
{ … }
void ImageHelper::clipLevelToUpdateListUpperLimit(gl::LevelIndex *level) const
{ … }
std::vector<ImageHelper::SubresourceUpdate> *ImageHelper::getLevelUpdates(gl::LevelIndex level)
{ … }
const std::vector<ImageHelper::SubresourceUpdate> *ImageHelper::getLevelUpdates(
gl::LevelIndex level) const
{ … }
void ImageHelper::appendSubresourceUpdate(gl::LevelIndex level, SubresourceUpdate &&update)
{ … }
void ImageHelper::prependSubresourceUpdate(gl::LevelIndex level, SubresourceUpdate &&update)
{ … }
bool ImageHelper::hasEmulatedImageChannels() const
{ … }
bool ImageHelper::hasEmulatedDepthChannel() const
{ … }
bool ImageHelper::hasEmulatedStencilChannel() const
{ … }
bool ImageHelper::hasInefficientlyEmulatedImageFormat() const
{ … }
VkColorComponentFlags ImageHelper::getEmulatedChannelsMask() const
{ … }
LayerMode GetLayerMode(const vk::ImageHelper &image, uint32_t layerCount)
{ … }
ComputePipelineOptions GetComputePipelineOptions(vk::PipelineRobustness robustness,
vk::PipelineProtectedAccess protectedAccess)
{ … }
ImageViewHelper::ImageViewHelper() : … { … }
ImageViewHelper::ImageViewHelper(ImageViewHelper &&other)
{ … }
ImageViewHelper::~ImageViewHelper() { … }
void ImageViewHelper::init(Renderer *renderer)
{ … }
void ImageViewHelper::release(Renderer *renderer, const ResourceUse &use)
{ … }
bool ImageViewHelper::isImageViewGarbageEmpty() const
{ … }
void ImageViewHelper::destroy(VkDevice device)
{ … }
angle::Result ImageViewHelper::initReadViews(ContextVk *contextVk,
gl::TextureType viewType,
const ImageHelper &image,
const gl::SwizzleState &formatSwizzle,
const gl::SwizzleState &readSwizzle,
LevelIndex baseLevel,
uint32_t levelCount,
uint32_t baseLayer,
uint32_t layerCount,
bool requiresSRGBViews,
VkImageUsageFlags imageUsageFlags)
{ … }
angle::Result ImageViewHelper::initReadViewsImpl(ContextVk *contextVk,
gl::TextureType viewType,
const ImageHelper &image,
const gl::SwizzleState &formatSwizzle,
const gl::SwizzleState &readSwizzle,
LevelIndex baseLevel,
uint32_t levelCount,
uint32_t baseLayer,
uint32_t layerCount,
VkImageUsageFlags imageUsageFlags)
{ … }
angle::Result ImageViewHelper::initSRGBReadViewsImpl(ContextVk *contextVk,
gl::TextureType viewType,
const ImageHelper &image,
const gl::SwizzleState &formatSwizzle,
const gl::SwizzleState &readSwizzle,
LevelIndex baseLevel,
uint32_t levelCount,
uint32_t baseLayer,
uint32_t layerCount,
VkImageUsageFlags imageUsageFlags)
{ … }
angle::Result ImageViewHelper::getLevelStorageImageView(Context *context,
gl::TextureType viewType,
const ImageHelper &image,
LevelIndex levelVk,
uint32_t layer,
VkImageUsageFlags imageUsageFlags,
angle::FormatID formatID,
const ImageView **imageViewOut)
{ … }
angle::Result ImageViewHelper::getLevelLayerStorageImageView(Context *contextVk,
const ImageHelper &image,
LevelIndex levelVk,
uint32_t layer,
VkImageUsageFlags imageUsageFlags,
angle::FormatID formatID,
const ImageView **imageViewOut)
{ … }
angle::Result ImageViewHelper::getLevelDrawImageView(Context *context,
const ImageHelper &image,
LevelIndex levelVk,
uint32_t layer,
uint32_t layerCount,
gl::SrgbWriteControlMode mode,
const ImageView **imageViewOut)
{ … }
angle::Result ImageViewHelper::getLevelLayerDrawImageView(Context *context,
const ImageHelper &image,
LevelIndex levelVk,
uint32_t layer,
gl::SrgbWriteControlMode mode,
const ImageView **imageViewOut)
{ … }
angle::Result ImageViewHelper::initFragmentShadingRateView(ContextVk *contextVk, ImageHelper *image)
{ … }
ImageOrBufferViewSubresourceSerial ImageViewHelper::getSubresourceSerial(
gl::LevelIndex levelGL,
uint32_t levelCount,
uint32_t layer,
LayerMode layerMode,
SrgbDecodeMode srgbDecodeMode,
gl::SrgbOverride srgbOverrideMode) const
{ … }
ImageSubresourceRange MakeImageSubresourceReadRange(gl::LevelIndex level,
uint32_t levelCount,
uint32_t layer,
LayerMode layerMode,
SrgbDecodeMode srgbDecodeMode,
gl::SrgbOverride srgbOverrideMode)
{ … }
ImageSubresourceRange MakeImageSubresourceDrawRange(gl::LevelIndex level,
uint32_t layer,
LayerMode layerMode,
gl::SrgbWriteControlMode srgbWriteControlMode)
{ … }
BufferViewHelper::BufferViewHelper() : … { … }
BufferViewHelper::BufferViewHelper(BufferViewHelper &&other) : … { … }
BufferViewHelper::~BufferViewHelper() { … }
void BufferViewHelper::init(Renderer *renderer, VkDeviceSize offset, VkDeviceSize size)
{ … }
void BufferViewHelper::release(ContextVk *contextVk)
{ … }
void BufferViewHelper::destroy(VkDevice device)
{ … }
angle::Result BufferViewHelper::getView(Context *context,
const BufferHelper &buffer,
VkDeviceSize bufferOffset,
const Format &format,
const BufferView **viewOut)
{ … }
ImageOrBufferViewSubresourceSerial BufferViewHelper::getSerial() const
{ … }
ShaderProgramHelper::ShaderProgramHelper() = default;
ShaderProgramHelper::~ShaderProgramHelper() = default;
bool ShaderProgramHelper::valid(const gl::ShaderType shaderType) const
{ … }
void ShaderProgramHelper::destroy(Renderer *renderer)
{ … }
void ShaderProgramHelper::release(ContextVk *contextVk)
{ … }
void ShaderProgramHelper::setShader(gl::ShaderType shaderType, RefCounted<ShaderModule> *shader)
{ … }
void ShaderProgramHelper::createMonolithicPipelineCreationTask(
vk::Context *context,
PipelineCacheAccess *pipelineCache,
const GraphicsPipelineDesc &desc,
const PipelineLayout &pipelineLayout,
const SpecializationConstants &specConsts,
PipelineHelper *pipeline) const
{ … }
angle::Result ShaderProgramHelper::getOrCreateComputePipeline(
vk::Context *context,
ComputePipelineCache *computePipelines,
PipelineCacheAccess *pipelineCache,
const PipelineLayout &pipelineLayout,
ComputePipelineOptions pipelineOptions,
PipelineSource source,
PipelineHelper **pipelineOut,
const char *shaderName,
VkSpecializationInfo *specializationInfo) const
{ … }
ActiveHandleCounter::ActiveHandleCounter() : … { … }
ActiveHandleCounter::~ActiveHandleCounter() = default;
CommandBufferAccess::CommandBufferAccess() = default;
CommandBufferAccess::~CommandBufferAccess() = default;
void CommandBufferAccess::onBufferRead(VkAccessFlags readAccessType,
PipelineStage readStage,
BufferHelper *buffer)
{ … }
void CommandBufferAccess::onBufferWrite(VkAccessFlags writeAccessType,
PipelineStage writeStage,
BufferHelper *buffer)
{ … }
void CommandBufferAccess::onImageRead(VkImageAspectFlags aspectFlags,
ImageLayout imageLayout,
ImageHelper *image)
{ … }
void CommandBufferAccess::onImageWrite(gl::LevelIndex levelStart,
uint32_t levelCount,
uint32_t layerStart,
uint32_t layerCount,
VkImageAspectFlags aspectFlags,
ImageLayout imageLayout,
ImageHelper *image)
{ … }
void CommandBufferAccess::onImageReadSubresources(gl::LevelIndex levelStart,
uint32_t levelCount,
uint32_t layerStart,
uint32_t layerCount,
VkImageAspectFlags aspectFlags,
ImageLayout imageLayout,
ImageHelper *image)
{ … }
void CommandBufferAccess::onBufferExternalAcquireRelease(BufferHelper *buffer)
{ … }
void CommandBufferAccess::onResourceAccess(Resource *resource)
{ … }
MetaDescriptorPool::MetaDescriptorPool() = default;
MetaDescriptorPool::~MetaDescriptorPool()
{ … }
void MetaDescriptorPool::destroy(Renderer *renderer)
{ … }
angle::Result MetaDescriptorPool::bindCachedDescriptorPool(
Context *context,
const DescriptorSetLayoutDesc &descriptorSetLayoutDesc,
uint32_t descriptorCountMultiplier,
DescriptorSetLayoutCache *descriptorSetLayoutCache,
DescriptorPoolPointer *descriptorPoolOut)
{ … }
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
VkPresentModeKHR ConvertPresentModeToVkPresentMode(PresentMode presentMode)
{ … }
PresentMode ConvertVkPresentModeToPresentMode(VkPresentModeKHR vkPresentMode)
{ … }
}
}