#include "libANGLE/renderer/vulkan/ContextVk.h"
#include "common/bitset_utils.h"
#include "common/debug.h"
#include "common/system_utils.h"
#include "common/utilities.h"
#include "image_util/loadimage.h"
#include "libANGLE/Context.h"
#include "libANGLE/Display.h"
#include "libANGLE/Program.h"
#include "libANGLE/Semaphore.h"
#include "libANGLE/ShareGroup.h"
#include "libANGLE/Surface.h"
#include "libANGLE/angletypes.h"
#include "libANGLE/renderer/renderer_utils.h"
#include "libANGLE/renderer/vulkan/BufferVk.h"
#include "libANGLE/renderer/vulkan/CompilerVk.h"
#include "libANGLE/renderer/vulkan/DisplayVk.h"
#include "libANGLE/renderer/vulkan/FenceNVVk.h"
#include "libANGLE/renderer/vulkan/FramebufferVk.h"
#include "libANGLE/renderer/vulkan/MemoryObjectVk.h"
#include "libANGLE/renderer/vulkan/OverlayVk.h"
#include "libANGLE/renderer/vulkan/ProgramPipelineVk.h"
#include "libANGLE/renderer/vulkan/ProgramVk.h"
#include "libANGLE/renderer/vulkan/QueryVk.h"
#include "libANGLE/renderer/vulkan/RenderbufferVk.h"
#include "libANGLE/renderer/vulkan/SamplerVk.h"
#include "libANGLE/renderer/vulkan/SemaphoreVk.h"
#include "libANGLE/renderer/vulkan/ShaderVk.h"
#include "libANGLE/renderer/vulkan/SurfaceVk.h"
#include "libANGLE/renderer/vulkan/SyncVk.h"
#include "libANGLE/renderer/vulkan/TextureVk.h"
#include "libANGLE/renderer/vulkan/TransformFeedbackVk.h"
#include "libANGLE/renderer/vulkan/VertexArrayVk.h"
#include "libANGLE/renderer/vulkan/vk_renderer.h"
#include <fstream>
#include <iostream>
#include <sstream>
namespace rx
{
namespace
{
static constexpr VkDeviceSize kMaxBufferToImageCopySize = …;
static constexpr size_t kMaxReservedOutsideRenderPassQueueSerials = …;
static constexpr bool kEnableCommandStreamDiagnostics = …;
static constexpr GLbitfield kWriteAfterAccessImageMemoryBarriers = …;
static constexpr GLbitfield kWriteAfterAccessMemoryBarriers = …;
struct GraphicsDriverUniforms
{ … };
static_assert …;
struct GraphicsDriverUniformsExtended
{ … };
static_assert …;
struct ComputeDriverUniforms
{ … };
uint32_t MakeFlipUniform(bool flipX, bool flipY, bool invertViewport)
{ … }
GLenum DefaultGLErrorCode(VkResult result)
{ … }
constexpr gl::ShaderMap<vk::ImageLayout> kShaderReadOnlyImageLayouts = …;
constexpr gl::ShaderMap<vk::ImageLayout> kShaderWriteImageLayouts = …;
constexpr VkBufferUsageFlags kVertexBufferUsage = …;
constexpr size_t kDynamicVertexDataSize = …;
bool CanMultiDrawIndirectUseCmd(ContextVk *contextVk,
VertexArrayVk *vertexArray,
gl::PrimitiveMode mode,
GLsizei drawcount,
GLsizei stride)
{ … }
uint32_t GetCoverageSampleCount(const gl::State &glState, GLint samples)
{ … }
void ApplySampleCoverage(const gl::State &glState, uint32_t coverageSampleCount, uint32_t *maskOut)
{ … }
SurfaceRotation DetermineSurfaceRotation(const gl::Framebuffer *framebuffer,
const WindowSurfaceVk *windowSurface)
{ … }
EventName GetTraceEventName(const char *title, uint64_t counter)
{ … }
vk::ResourceAccess GetColorAccess(const gl::State &state,
const gl::FramebufferState &framebufferState,
const gl::DrawBufferMask &emulatedAlphaMask,
bool hasFramebufferFetch,
size_t colorIndexGL)
{ … }
vk::ResourceAccess GetDepthAccess(const gl::DepthStencilState &dsState,
UpdateDepthFeedbackLoopReason reason)
{ … }
vk::ResourceAccess GetStencilAccess(const gl::DepthStencilState &dsState,
UpdateDepthFeedbackLoopReason reason)
{ … }
egl::ContextPriority GetContextPriority(const gl::State &state)
{ … }
bool IsStencilSamplerBinding(const gl::ProgramExecutable &executable, size_t textureUnit)
{ … }
vk::ImageLayout GetDepthStencilAttachmentImageReadLayout(const vk::ImageHelper &image,
gl::ShaderType firstShader)
{ … }
vk::ImageLayout GetImageReadLayout(TextureVk *textureVk,
const gl::ProgramExecutable &executable,
size_t textureUnit,
PipelineType pipelineType)
{ … }
vk::ImageLayout GetImageWriteLayoutAndSubresource(const gl::ImageUnit &imageUnit,
vk::ImageHelper &image,
gl::ShaderBitSet shaderStages,
gl::LevelIndex *levelOut,
uint32_t *layerStartOut,
uint32_t *layerCountOut)
{ … }
template <typename CommandBufferT>
void OnTextureBufferRead(vk::BufferHelper *buffer,
gl::ShaderBitSet stages,
CommandBufferT *commandBufferHelper)
{ … }
void OnImageBufferWrite(BufferVk *bufferVk,
gl::ShaderBitSet stages,
vk::CommandBufferHelperCommon *commandBufferHelper)
{ … }
constexpr angle::PackedEnumMap<RenderPassClosureReason, const char *> kRenderPassClosureReason = …;
VkDependencyFlags GetLocalDependencyFlags(ContextVk *contextVk)
{ … }
bool BlendModeSupportsDither(const ContextVk *contextVk, size_t colorIndex)
{ … }
bool ShouldUseGraphicsDriverUniformsExtended(const vk::Context *context)
{ … }
bool IsAnySamplesQuery(gl::QueryType type)
{ … }
enum class GraphicsPipelineSubsetRenderPass
{ … };
template <typename Cache>
angle::Result CreateGraphicsPipelineSubset(ContextVk *contextVk,
const vk::GraphicsPipelineDesc &desc,
vk::GraphicsPipelineTransitionBits transition,
GraphicsPipelineSubsetRenderPass renderPass,
Cache *cache,
vk::PipelineCacheAccess *pipelineCache,
vk::PipelineHelper **pipelineOut)
{ … }
bool QueueSerialsHaveDifferentIndexOrSmaller(const QueueSerial &queueSerial1,
const QueueSerial &queueSerial2)
{ … }
void UpdateImagesWithSharedCacheKey(const gl::ActiveTextureArray<TextureVk *> &activeImages,
const std::vector<gl::ImageBinding> &imageBindings,
const vk::SharedDescriptorSetCacheKey &sharedCacheKey)
{ … }
void UpdateBufferWithSharedCacheKey(const gl::OffsetBindingPointer<gl::Buffer> &bufferBinding,
VkDescriptorType descriptorType,
const vk::SharedDescriptorSetCacheKey &sharedCacheKey)
{ … }
void GenerateTextureUnitSamplerIndexMap(
const std::vector<GLuint> &samplerBoundTextureUnits,
std::unordered_map<size_t, uint32_t> *textureUnitSamplerIndexMapOut)
{ … }
}
void ContextVk::flushDescriptorSetUpdates()
{ … }
ANGLE_INLINE void ContextVk::onRenderPassFinished(RenderPassClosureReason reason)
{ … }
ContextVk::ContextVk(const gl::State &state, gl::ErrorSet *errorSet, vk::Renderer *renderer)
: … { … }
ContextVk::~ContextVk() { … }
void ContextVk::onDestroy(const gl::Context *context)
{ … }
VertexArrayVk *ContextVk::getVertexArray() const
{ … }
FramebufferVk *ContextVk::getDrawFramebuffer() const
{ … }
angle::Result ContextVk::getIncompleteTexture(const gl::Context *context,
gl::TextureType type,
gl::SamplerFormat format,
gl::Texture **textureOut)
{ … }
angle::Result ContextVk::initialize(const angle::ImageLoadContext &imageLoadContext)
{ … }
angle::Result ContextVk::flush(const gl::Context *context)
{ … }
angle::Result ContextVk::finish(const gl::Context *context)
{ … }
angle::Result ContextVk::setupDraw(const gl::Context *context,
gl::PrimitiveMode mode,
GLint firstVertexOrInvalid,
GLsizei vertexOrIndexCount,
GLsizei instanceCount,
gl::DrawElementsType indexTypeOrInvalid,
const void *indices,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::setupIndexedDraw(const gl::Context *context,
gl::PrimitiveMode mode,
GLsizei indexCount,
GLsizei instanceCount,
gl::DrawElementsType indexType,
const void *indices)
{ … }
angle::Result ContextVk::setupIndirectDraw(const gl::Context *context,
gl::PrimitiveMode mode,
DirtyBits dirtyBitMask,
vk::BufferHelper *indirectBuffer)
{ … }
angle::Result ContextVk::setupIndexedIndirectDraw(const gl::Context *context,
gl::PrimitiveMode mode,
gl::DrawElementsType indexType,
vk::BufferHelper *indirectBuffer)
{ … }
angle::Result ContextVk::setupLineLoopIndexedIndirectDraw(const gl::Context *context,
gl::PrimitiveMode mode,
gl::DrawElementsType indexType,
vk::BufferHelper *srcIndirectBuf,
VkDeviceSize indirectBufferOffset,
vk::BufferHelper **indirectBufferOut)
{ … }
angle::Result ContextVk::setupLineLoopIndirectDraw(const gl::Context *context,
gl::PrimitiveMode mode,
vk::BufferHelper *indirectBuffer,
VkDeviceSize indirectBufferOffset,
vk::BufferHelper **indirectBufferOut)
{ … }
angle::Result ContextVk::setupLineLoopDraw(const gl::Context *context,
gl::PrimitiveMode mode,
GLint firstVertex,
GLsizei vertexOrIndexCount,
gl::DrawElementsType indexTypeOrInvalid,
const void *indices,
uint32_t *numIndicesOut)
{ … }
angle::Result ContextVk::setupDispatch(const gl::Context *context)
{ … }
angle::Result ContextVk::handleDirtyGraphicsMemoryBarrier(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyComputeMemoryBarrier(DirtyBits::Iterator *dirtyBitsIterator)
{ … }
bool ContextVk::renderPassUsesStorageResources() const
{ … }
angle::Result ContextVk::handleDirtyMemoryBarrierImpl(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsEventLog(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyComputeEventLog(DirtyBits::Iterator *dirtyBitsIterator)
{ … }
template <typename CommandBufferT>
angle::Result ContextVk::handleDirtyEventLogImpl(CommandBufferT *commandBuffer)
{ … }
angle::Result ContextVk::handleDirtyGraphicsDefaultAttribs(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::createGraphicsPipeline()
{ … }
angle::Result ContextVk::handleDirtyGraphicsPipelineDesc(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::updateRenderPassDepthFeedbackLoopMode(
UpdateDepthFeedbackLoopReason depthReason,
UpdateDepthFeedbackLoopReason stencilReason)
{ … }
angle::Result ContextVk::switchOutReadOnlyDepthStencilMode(
DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask,
UpdateDepthFeedbackLoopReason depthReason,
UpdateDepthFeedbackLoopReason stencilReason)
{ … }
angle::Result ContextVk::handleDirtyGraphicsReadOnlyDepthFeedbackLoopMode(
DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyAnySamplePassedQueryEnd(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsRenderPass(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsColorAccess(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsDepthStencilAccess(
DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsPipelineBinding(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyComputePipelineDesc(DirtyBits::Iterator *dirtyBitsIterator)
{ … }
angle::Result ContextVk::handleDirtyComputePipelineBinding(DirtyBits::Iterator *dirtyBitsIterator)
{ … }
template <typename CommandBufferHelperT>
ANGLE_INLINE angle::Result ContextVk::handleDirtyTexturesImpl(
CommandBufferHelperT *commandBufferHelper,
PipelineType pipelineType)
{ … }
angle::Result ContextVk::handleDirtyGraphicsTextures(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyComputeTextures(DirtyBits::Iterator *dirtyBitsIterator)
{ … }
angle::Result ContextVk::handleDirtyGraphicsVertexBuffers(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsIndexBuffer(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsFramebufferFetchBarrier(
DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsBlendBarrier(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
template <typename CommandBufferHelperT>
angle::Result ContextVk::handleDirtyShaderResourcesImpl(CommandBufferHelperT *commandBufferHelper,
PipelineType pipelineType,
DirtyBits::Iterator *dirtyBitsIterator)
{ … }
angle::Result ContextVk::handleDirtyGraphicsShaderResources(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyComputeShaderResources(DirtyBits::Iterator *dirtyBitsIterator)
{ … }
template <typename CommandBufferT>
angle::Result ContextVk::handleDirtyUniformBuffersImpl(CommandBufferT *commandBufferHelper)
{ … }
angle::Result ContextVk::handleDirtyGraphicsUniformBuffers(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyComputeUniformBuffers(DirtyBits::Iterator *dirtyBitsIterator)
{ … }
angle::Result ContextVk::handleDirtyGraphicsTransformFeedbackBuffersEmulation(
DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsTransformFeedbackBuffersExtension(
DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsTransformFeedbackResume(
DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsDescriptorSets(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsUniforms(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyComputeUniforms(DirtyBits::Iterator *dirtyBitsIterator)
{ … }
angle::Result ContextVk::handleDirtyUniformsImpl(DirtyBits::Iterator *dirtyBitsIterator,
vk::CommandBufferHelperCommon *commandBufferHelper)
{ … }
angle::Result ContextVk::handleDirtyGraphicsDynamicViewport(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsDynamicScissor(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsDynamicLineWidth(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsDynamicDepthBias(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsDynamicBlendConstants(
DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsDynamicStencilCompareMask(
DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsDynamicStencilWriteMask(
DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsDynamicStencilReference(
DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsDynamicCullMode(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsDynamicFrontFace(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsDynamicDepthTestEnable(
DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsDynamicDepthWriteEnable(
DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsDynamicDepthCompareOp(
DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsDynamicStencilTestEnable(
DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsDynamicStencilOp(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsDynamicRasterizerDiscardEnable(
DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsDynamicDepthBiasEnable(
DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsDynamicLogicOp(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsDynamicPrimitiveRestartEnable(
DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyGraphicsDynamicFragmentShadingRate(
DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
void ContextVk::handleDirtyGraphicsDynamicScissorImpl(bool isPrimitivesGeneratedQueryActive)
{ … }
angle::Result ContextVk::handleDirtyComputeDescriptorSets(DirtyBits::Iterator *dirtyBitsIterator)
{ … }
template <typename CommandBufferHelperT>
angle::Result ContextVk::handleDirtyDescriptorSetsImpl(CommandBufferHelperT *commandBufferHelper,
PipelineType pipelineType)
{ … }
void ContextVk::syncObjectPerfCounters(const angle::VulkanPerfCounters &commandQueuePerfCounters)
{ … }
void ContextVk::updateOverlayOnPresent()
{ … }
void ContextVk::addOverlayUsedBuffersCount(vk::CommandBufferHelperCommon *commandBuffer)
{ … }
angle::Result ContextVk::submitCommands(const vk::Semaphore *signalSemaphore,
const vk::SharedExternalFence *externalFence,
Submit submission)
{ … }
angle::Result ContextVk::onCopyUpdate(VkDeviceSize size, bool *commandBufferWasFlushedOut)
{ … }
void ContextVk::addToPendingImageGarbage(vk::ResourceUse use, VkDeviceSize size)
{ … }
bool ContextVk::hasExcessPendingGarbage() const
{ … }
angle::Result ContextVk::synchronizeCpuGpuTime()
{ … }
angle::Result ContextVk::traceGpuEventImpl(vk::OutsideRenderPassCommandBuffer *commandBuffer,
char phase,
const EventName &name)
{ … }
angle::Result ContextVk::checkCompletedGpuEvents()
{ … }
void ContextVk::flushGpuEvents(double nextSyncGpuTimestampS, double nextSyncCpuTimestampS)
{ … }
void ContextVk::clearAllGarbage()
{ … }
void ContextVk::handleDeviceLost()
{ … }
angle::Result ContextVk::drawArrays(const gl::Context *context,
gl::PrimitiveMode mode,
GLint first,
GLsizei count)
{ … }
angle::Result ContextVk::drawArraysInstanced(const gl::Context *context,
gl::PrimitiveMode mode,
GLint first,
GLsizei count,
GLsizei instances)
{ … }
angle::Result ContextVk::drawArraysInstancedBaseInstance(const gl::Context *context,
gl::PrimitiveMode mode,
GLint first,
GLsizei count,
GLsizei instances,
GLuint baseInstance)
{ … }
angle::Result ContextVk::drawElements(const gl::Context *context,
gl::PrimitiveMode mode,
GLsizei count,
gl::DrawElementsType type,
const void *indices)
{ … }
angle::Result ContextVk::drawElementsBaseVertex(const gl::Context *context,
gl::PrimitiveMode mode,
GLsizei count,
gl::DrawElementsType type,
const void *indices,
GLint baseVertex)
{ … }
angle::Result ContextVk::drawElementsInstanced(const gl::Context *context,
gl::PrimitiveMode mode,
GLsizei count,
gl::DrawElementsType type,
const void *indices,
GLsizei instances)
{ … }
angle::Result ContextVk::drawElementsInstancedBaseVertex(const gl::Context *context,
gl::PrimitiveMode mode,
GLsizei count,
gl::DrawElementsType type,
const void *indices,
GLsizei instances,
GLint baseVertex)
{ … }
angle::Result ContextVk::drawElementsInstancedBaseVertexBaseInstance(const gl::Context *context,
gl::PrimitiveMode mode,
GLsizei count,
gl::DrawElementsType type,
const void *indices,
GLsizei instances,
GLint baseVertex,
GLuint baseInstance)
{ … }
angle::Result ContextVk::drawRangeElements(const gl::Context *context,
gl::PrimitiveMode mode,
GLuint start,
GLuint end,
GLsizei count,
gl::DrawElementsType type,
const void *indices)
{ … }
angle::Result ContextVk::drawRangeElementsBaseVertex(const gl::Context *context,
gl::PrimitiveMode mode,
GLuint start,
GLuint end,
GLsizei count,
gl::DrawElementsType type,
const void *indices,
GLint baseVertex)
{ … }
VkDevice ContextVk::getDevice() const
{ … }
angle::Result ContextVk::drawArraysIndirect(const gl::Context *context,
gl::PrimitiveMode mode,
const void *indirect)
{ … }
angle::Result ContextVk::drawElementsIndirect(const gl::Context *context,
gl::PrimitiveMode mode,
gl::DrawElementsType type,
const void *indirect)
{ … }
angle::Result ContextVk::multiDrawArrays(const gl::Context *context,
gl::PrimitiveMode mode,
const GLint *firsts,
const GLsizei *counts,
GLsizei drawcount)
{ … }
angle::Result ContextVk::multiDrawArraysInstanced(const gl::Context *context,
gl::PrimitiveMode mode,
const GLint *firsts,
const GLsizei *counts,
const GLsizei *instanceCounts,
GLsizei drawcount)
{ … }
angle::Result ContextVk::multiDrawArraysIndirect(const gl::Context *context,
gl::PrimitiveMode mode,
const void *indirect,
GLsizei drawcount,
GLsizei stride)
{ … }
angle::Result ContextVk::multiDrawArraysIndirectHelper(const gl::Context *context,
gl::PrimitiveMode mode,
const void *indirect,
GLsizei drawcount,
GLsizei stride)
{ … }
angle::Result ContextVk::multiDrawElements(const gl::Context *context,
gl::PrimitiveMode mode,
const GLsizei *counts,
gl::DrawElementsType type,
const GLvoid *const *indices,
GLsizei drawcount)
{ … }
angle::Result ContextVk::multiDrawElementsInstanced(const gl::Context *context,
gl::PrimitiveMode mode,
const GLsizei *counts,
gl::DrawElementsType type,
const GLvoid *const *indices,
const GLsizei *instanceCounts,
GLsizei drawcount)
{ … }
angle::Result ContextVk::multiDrawElementsIndirect(const gl::Context *context,
gl::PrimitiveMode mode,
gl::DrawElementsType type,
const void *indirect,
GLsizei drawcount,
GLsizei stride)
{ … }
angle::Result ContextVk::multiDrawElementsIndirectHelper(const gl::Context *context,
gl::PrimitiveMode mode,
gl::DrawElementsType type,
const void *indirect,
GLsizei drawcount,
GLsizei stride)
{ … }
angle::Result ContextVk::multiDrawArraysInstancedBaseInstance(const gl::Context *context,
gl::PrimitiveMode mode,
const GLint *firsts,
const GLsizei *counts,
const GLsizei *instanceCounts,
const GLuint *baseInstances,
GLsizei drawcount)
{ … }
angle::Result ContextVk::multiDrawElementsInstancedBaseVertexBaseInstance(
const gl::Context *context,
gl::PrimitiveMode mode,
const GLsizei *counts,
gl::DrawElementsType type,
const GLvoid *const *indices,
const GLsizei *instanceCounts,
const GLint *baseVertices,
const GLuint *baseInstances,
GLsizei drawcount)
{ … }
angle::Result ContextVk::optimizeRenderPassForPresent(vk::ImageViewHelper *colorImageView,
vk::ImageHelper *colorImage,
vk::ImageHelper *colorImageMS,
vk::PresentMode presentMode,
bool *imageResolved)
{ … }
gl::GraphicsResetStatus ContextVk::getResetStatus()
{ … }
angle::Result ContextVk::insertEventMarker(GLsizei length, const char *marker)
{ … }
void ContextVk::insertEventMarkerImpl(GLenum source, const char *marker)
{ … }
angle::Result ContextVk::pushGroupMarker(GLsizei length, const char *marker)
{ … }
angle::Result ContextVk::popGroupMarker()
{ … }
angle::Result ContextVk::pushDebugGroup(const gl::Context *context,
GLenum source,
GLuint id,
const std::string &message)
{ … }
angle::Result ContextVk::popDebugGroup(const gl::Context *context)
{ … }
angle::Result ContextVk::pushDebugGroupImpl(GLenum source, GLuint id, const char *message)
{ … }
angle::Result ContextVk::popDebugGroupImpl()
{ … }
void ContextVk::logEvent(const char *eventString)
{ … }
void ContextVk::endEventLog(angle::EntryPoint entryPoint, PipelineType pipelineType)
{ … }
void ContextVk::endEventLogForClearOrQuery()
{ … }
angle::Result ContextVk::handleNoopDrawEvent()
{ … }
angle::Result ContextVk::handleGraphicsEventLog(GraphicsEventCmdBuf queryEventType)
{ … }
bool ContextVk::isViewportFlipEnabledForDrawFBO() const
{ … }
bool ContextVk::isViewportFlipEnabledForReadFBO() const
{ … }
bool ContextVk::isRotatedAspectRatioForDrawFBO() const
{ … }
bool ContextVk::isRotatedAspectRatioForReadFBO() const
{ … }
SurfaceRotation ContextVk::getRotationDrawFramebuffer() const
{ … }
SurfaceRotation ContextVk::getRotationReadFramebuffer() const
{ … }
SurfaceRotation ContextVk::getSurfaceRotationImpl(const gl::Framebuffer *framebuffer,
const egl::Surface *surface)
{ … }
void ContextVk::updateColorMasks()
{ … }
void ContextVk::updateMissingOutputsMask()
{ … }
void ContextVk::updateBlendFuncsAndEquations()
{ … }
void ContextVk::updateSampleMaskWithRasterizationSamples(const uint32_t rasterizationSamples)
{ … }
void ContextVk::updateAlphaToCoverageWithRasterizationSamples(const uint32_t rasterizationSamples)
{ … }
void ContextVk::updateFrameBufferFetchSamples(const uint32_t prevSamples, const uint32_t curSamples)
{ … }
gl::Rectangle ContextVk::getCorrectedViewport(const gl::Rectangle &viewport) const
{ … }
void ContextVk::updateViewport(FramebufferVk *framebufferVk,
const gl::Rectangle &viewport,
float nearPlane,
float farPlane)
{ … }
void ContextVk::updateFrontFace()
{ … }
void ContextVk::updateDepthRange(float nearPlane, float farPlane)
{ … }
void ContextVk::updateScissor(const gl::State &glState)
{ … }
void ContextVk::updateDepthStencil(const gl::State &glState)
{ … }
void ContextVk::updateDepthTestEnabled(const gl::State &glState)
{ … }
void ContextVk::updateDepthWriteEnabled(const gl::State &glState)
{ … }
void ContextVk::updateDepthFunc(const gl::State &glState)
{ … }
void ContextVk::updateStencilTestEnabled(const gl::State &glState)
{ … }
void ContextVk::updateSampleShadingWithRasterizationSamples(const uint32_t rasterizationSamples)
{ … }
void ContextVk::updateRasterizationSamples(const uint32_t rasterizationSamples)
{ … }
void ContextVk::updateRasterizerDiscardEnabled(bool isPrimitivesGeneratedQueryActive)
{ … }
void ContextVk::updateAdvancedBlendEquations(const gl::ProgramExecutable *executable)
{ … }
void ContextVk::updateDither()
{ … }
void ContextVk::updateStencilWriteWorkaround()
{ … }
angle::Result ContextVk::invalidateProgramExecutableHelper(const gl::Context *context)
{ … }
angle::Result ContextVk::syncState(const gl::Context *context,
const gl::state::DirtyBits dirtyBits,
const gl::state::DirtyBits bitMask,
const gl::state::ExtendedDirtyBits extendedDirtyBits,
const gl::state::ExtendedDirtyBits extendedBitMask,
gl::Command command)
{ … }
GLint ContextVk::getGPUDisjoint()
{ … }
GLint64 ContextVk::getTimestamp()
{ … }
angle::Result ContextVk::onMakeCurrent(const gl::Context *context)
{ … }
angle::Result ContextVk::onUnMakeCurrent(const gl::Context *context)
{ … }
angle::Result ContextVk::onSurfaceUnMakeCurrent(WindowSurfaceVk *surface)
{ … }
angle::Result ContextVk::onSurfaceUnMakeCurrent(OffscreenSurfaceVk *surface)
{ … }
void ContextVk::updateFlipViewportDrawFramebuffer(const gl::State &glState)
{ … }
void ContextVk::updateFlipViewportReadFramebuffer(const gl::State &glState)
{ … }
void ContextVk::updateSurfaceRotationDrawFramebuffer(const gl::State &glState,
const egl::Surface *currentDrawSurface)
{ … }
void ContextVk::updateSurfaceRotationReadFramebuffer(const gl::State &glState,
const egl::Surface *currentReadSurface)
{ … }
gl::Caps ContextVk::getNativeCaps() const
{ … }
const gl::TextureCapsMap &ContextVk::getNativeTextureCaps() const
{ … }
const gl::Extensions &ContextVk::getNativeExtensions() const
{ … }
const gl::Limitations &ContextVk::getNativeLimitations() const
{ … }
const ShPixelLocalStorageOptions &ContextVk::getNativePixelLocalStorageOptions() const
{ … }
CompilerImpl *ContextVk::createCompiler()
{ … }
ShaderImpl *ContextVk::createShader(const gl::ShaderState &state)
{ … }
ProgramImpl *ContextVk::createProgram(const gl::ProgramState &state)
{ … }
ProgramExecutableImpl *ContextVk::createProgramExecutable(const gl::ProgramExecutable *executable)
{ … }
FramebufferImpl *ContextVk::createFramebuffer(const gl::FramebufferState &state)
{ … }
TextureImpl *ContextVk::createTexture(const gl::TextureState &state)
{ … }
RenderbufferImpl *ContextVk::createRenderbuffer(const gl::RenderbufferState &state)
{ … }
BufferImpl *ContextVk::createBuffer(const gl::BufferState &state)
{ … }
VertexArrayImpl *ContextVk::createVertexArray(const gl::VertexArrayState &state)
{ … }
QueryImpl *ContextVk::createQuery(gl::QueryType type)
{ … }
FenceNVImpl *ContextVk::createFenceNV()
{ … }
SyncImpl *ContextVk::createSync()
{ … }
TransformFeedbackImpl *ContextVk::createTransformFeedback(const gl::TransformFeedbackState &state)
{ … }
SamplerImpl *ContextVk::createSampler(const gl::SamplerState &state)
{ … }
ProgramPipelineImpl *ContextVk::createProgramPipeline(const gl::ProgramPipelineState &state)
{ … }
MemoryObjectImpl *ContextVk::createMemoryObject()
{ … }
SemaphoreImpl *ContextVk::createSemaphore()
{ … }
OverlayImpl *ContextVk::createOverlay(const gl::OverlayState &state)
{ … }
void ContextVk::invalidateCurrentDefaultUniforms()
{ … }
angle::Result ContextVk::invalidateCurrentTextures(const gl::Context *context, gl::Command command)
{ … }
angle::Result ContextVk::invalidateCurrentShaderResources(gl::Command command)
{ … }
angle::Result ContextVk::invalidateCurrentShaderUniformBuffers(gl::Command command)
{ … }
void ContextVk::updateShaderResourcesWithSharedCacheKey(
const vk::SharedDescriptorSetCacheKey &sharedCacheKey)
{ … }
void ContextVk::invalidateGraphicsDriverUniforms()
{ … }
void ContextVk::invalidateDriverUniforms()
{ … }
angle::Result ContextVk::onFramebufferChange(FramebufferVk *framebufferVk, gl::Command command)
{ … }
void ContextVk::onDrawFramebufferRenderPassDescChange(FramebufferVk *framebufferVk,
bool *renderPassDescChangedOut)
{ … }
void ContextVk::invalidateCurrentTransformFeedbackBuffers()
{ … }
void ContextVk::onTransformFeedbackStateChanged()
{ … }
angle::Result ContextVk::onBeginTransformFeedback(
size_t bufferCount,
const gl::TransformFeedbackBuffersArray<vk::BufferHelper *> &buffers,
const gl::TransformFeedbackBuffersArray<vk::BufferHelper> &counterBuffers)
{ … }
void ContextVk::onEndTransformFeedback()
{ … }
angle::Result ContextVk::onPauseTransformFeedback()
{ … }
void ContextVk::invalidateGraphicsPipelineBinding()
{ … }
void ContextVk::invalidateComputePipelineBinding()
{ … }
void ContextVk::invalidateGraphicsDescriptorSet(DescriptorSetIndex usedDescriptorSet)
{ … }
void ContextVk::invalidateComputeDescriptorSet(DescriptorSetIndex usedDescriptorSet)
{ … }
void ContextVk::invalidateAllDynamicState()
{ … }
angle::Result ContextVk::dispatchCompute(const gl::Context *context,
GLuint numGroupsX,
GLuint numGroupsY,
GLuint numGroupsZ)
{ … }
angle::Result ContextVk::dispatchComputeIndirect(const gl::Context *context, GLintptr indirect)
{ … }
angle::Result ContextVk::memoryBarrier(const gl::Context *context, GLbitfield barriers)
{ … }
angle::Result ContextVk::memoryBarrierByRegion(const gl::Context *context, GLbitfield barriers)
{ … }
void ContextVk::framebufferFetchBarrier()
{ … }
void ContextVk::blendBarrier()
{ … }
angle::Result ContextVk::acquireTextures(const gl::Context *context,
const gl::TextureBarrierVector &textureBarriers)
{ … }
angle::Result ContextVk::releaseTextures(const gl::Context *context,
gl::TextureBarrierVector *textureBarriers)
{ … }
vk::DynamicQueryPool *ContextVk::getQueryPool(gl::QueryType queryType)
{ … }
const VkClearValue &ContextVk::getClearColorValue() const
{ … }
const VkClearValue &ContextVk::getClearDepthStencilValue() const
{ … }
gl::BlendStateExt::ColorMaskStorage::Type ContextVk::getClearColorMasks() const
{ … }
void ContextVk::writeAtomicCounterBufferDriverUniformOffsets(uint32_t *offsetsOut,
size_t offsetsSize)
{ … }
void ContextVk::pauseTransformFeedbackIfActiveUnpaused()
{ … }
angle::Result ContextVk::handleDirtyGraphicsDriverUniforms(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask)
{ … }
angle::Result ContextVk::handleDirtyComputeDriverUniforms(DirtyBits::Iterator *dirtyBitsIterator)
{ … }
void ContextVk::handleError(VkResult errorCode,
const char *file,
const char *function,
unsigned int line)
{ … }
angle::Result ContextVk::initBufferAllocation(vk::BufferHelper *bufferHelper,
uint32_t memoryTypeIndex,
size_t allocationSize,
size_t alignment,
BufferUsageType bufferUsageType)
{ … }
angle::Result ContextVk::initImageAllocation(vk::ImageHelper *imageHelper,
bool hasProtectedContent,
const vk::MemoryProperties &memoryProperties,
VkMemoryPropertyFlags flags,
vk::MemoryAllocationType allocationType)
{ … }
angle::Result ContextVk::releaseBufferAllocation(vk::BufferHelper *bufferHelper)
{ … }
angle::Result ContextVk::initBufferForBufferCopy(vk::BufferHelper *bufferHelper,
size_t size,
vk::MemoryCoherency coherency)
{ … }
angle::Result ContextVk::initBufferForImageCopy(vk::BufferHelper *bufferHelper,
size_t size,
vk::MemoryCoherency coherency,
angle::FormatID formatId,
VkDeviceSize *offset,
uint8_t **dataPtr)
{ … }
angle::Result ContextVk::initBufferForVertexConversion(ConversionBuffer *conversionBuffer,
size_t size,
vk::MemoryHostVisibility hostVisibility)
{ … }
angle::Result ContextVk::updateActiveTextures(const gl::Context *context, gl::Command command)
{ … }
template <typename CommandBufferHelperT>
angle::Result ContextVk::updateActiveImages(CommandBufferHelperT *commandBufferHelper)
{ … }
angle::Result ContextVk::flushImpl(const vk::Semaphore *signalSemaphore,
const vk::SharedExternalFence *externalFence,
RenderPassClosureReason renderPassClosureReason)
{ … }
angle::Result ContextVk::finishImpl(RenderPassClosureReason renderPassClosureReason)
{ … }
void ContextVk::addWaitSemaphore(VkSemaphore semaphore, VkPipelineStageFlags stageMask)
{ … }
angle::Result ContextVk::getCompatibleRenderPass(const vk::RenderPassDesc &desc,
const vk::RenderPass **renderPassOut)
{ … }
angle::Result ContextVk::getRenderPassWithOps(const vk::RenderPassDesc &desc,
const vk::AttachmentOpsArray &ops,
const vk::RenderPass **renderPassOut)
{ … }
angle::Result ContextVk::getTimestamp(uint64_t *timestampOut)
{ … }
void ContextVk::invalidateDefaultAttribute(size_t attribIndex)
{ … }
void ContextVk::invalidateDefaultAttributes(const gl::AttributesMask &dirtyMask)
{ … }
angle::Result ContextVk::onBufferReleaseToExternal(const vk::BufferHelper &buffer)
{ … }
angle::Result ContextVk::onImageReleaseToExternal(const vk::ImageHelper &image)
{ … }
angle::Result ContextVk::beginNewRenderPass(
vk::RenderPassFramebuffer &&framebuffer,
const gl::Rectangle &renderArea,
const vk::RenderPassDesc &renderPassDesc,
const vk::AttachmentOpsArray &renderPassAttachmentOps,
const vk::PackedAttachmentCount colorAttachmentCount,
const vk::PackedAttachmentIndex depthStencilAttachmentIndex,
const vk::PackedClearValuesArray &clearValues,
vk::RenderPassCommandBuffer **commandBufferOut)
{ … }
angle::Result ContextVk::startRenderPass(gl::Rectangle renderArea,
vk::RenderPassCommandBuffer **commandBufferOut,
bool *renderPassDescChangedOut)
{ … }
angle::Result ContextVk::startNextSubpass()
{ … }
uint32_t ContextVk::getCurrentSubpassIndex() const
{ … }
uint32_t ContextVk::getCurrentViewCount() const
{ … }
angle::Result ContextVk::flushCommandsAndEndRenderPassWithoutSubmit(RenderPassClosureReason reason)
{ … }
angle::Result ContextVk::flushCommandsAndEndRenderPass(RenderPassClosureReason reason)
{ … }
angle::Result ContextVk::flushDirtyGraphicsRenderPass(DirtyBits::Iterator *dirtyBitsIterator,
DirtyBits dirtyBitMask,
RenderPassClosureReason reason)
{ … }
angle::Result ContextVk::syncExternalMemory()
{ … }
angle::Result ContextVk::onSyncObjectInit(vk::SyncHelper *syncHelper, SyncFenceScope scope)
{ … }
angle::Result ContextVk::flushCommandsAndEndRenderPassIfDeferredSyncInit(
RenderPassClosureReason reason)
{ … }
void ContextVk::addCommandBufferDiagnostics(const std::string &commandBufferDiagnostics)
{ … }
void ContextVk::dumpCommandStreamDiagnostics()
{ … }
void ContextVk::initIndexTypeMap()
{ … }
VkIndexType ContextVk::getVkIndexType(gl::DrawElementsType glIndexType) const
{ … }
size_t ContextVk::getVkIndexTypeSize(gl::DrawElementsType glIndexType) const
{ … }
bool ContextVk::shouldConvertUint8VkIndexType(gl::DrawElementsType glIndexType) const
{ … }
uint32_t GetDriverUniformSize(vk::Context *context, PipelineType pipelineType)
{ … }
angle::Result ContextVk::flushAndSubmitOutsideRenderPassCommands()
{ … }
angle::Result ContextVk::flushOutsideRenderPassCommands()
{ … }
angle::Result ContextVk::beginRenderPassQuery(QueryVk *queryVk)
{ … }
angle::Result ContextVk::endRenderPassQuery(QueryVk *queryVk)
{ … }
void ContextVk::pauseRenderPassQueriesIfActive()
{ … }
angle::Result ContextVk::resumeRenderPassQueriesIfActive()
{ … }
angle::Result ContextVk::resumeXfbRenderPassQueriesIfActive()
{ … }
bool ContextVk::doesPrimitivesGeneratedQuerySupportRasterizerDiscard() const
{ … }
bool ContextVk::isEmulatingRasterizerDiscardDuringPrimitivesGeneratedQuery(
bool isPrimitivesGeneratedQueryActive) const
{ … }
QueryVk *ContextVk::getActiveRenderPassQuery(gl::QueryType queryType) const
{ … }
bool ContextVk::isRobustResourceInitEnabled() const
{ … }
void ContextVk::setDefaultUniformBlocksMinSizeForTesting(size_t minSize)
{ … }
angle::Result ContextVk::initializeMultisampleTextureToBlack(const gl::Context *context,
gl::Texture *glTexture)
{ … }
void ContextVk::onProgramExecutableReset(ProgramExecutableVk *executableVk)
{ … }
angle::Result ContextVk::switchToReadOnlyDepthStencilMode(gl::Texture *texture,
gl::Command command,
FramebufferVk *drawFramebuffer,
bool isStencilTexture)
{ … }
angle::Result ContextVk::onResourceAccess(const vk::CommandBufferAccess &access)
{ … }
angle::Result ContextVk::flushCommandBuffersIfNecessary(const vk::CommandBufferAccess &access)
{ … }
angle::Result ContextVk::endRenderPassIfComputeReadAfterTransformFeedbackWrite()
{ … }
angle::Result ContextVk::endRenderPassIfComputeAccessAfterGraphicsImageAccess()
{ … }
const angle::PerfMonitorCounterGroups &ContextVk::getPerfMonitorCounters()
{ … }
angle::Result ContextVk::switchToFramebufferFetchMode(bool hasFramebufferFetch)
{ … }
ANGLE_INLINE angle::Result ContextVk::allocateQueueSerialIndex()
{ … }
ANGLE_INLINE void ContextVk::releaseQueueSerialIndex()
{ … }
ANGLE_INLINE void ContextVk::generateOutsideRenderPassCommandsQueueSerial()
{ … }
ANGLE_INLINE void ContextVk::generateRenderPassCommandsQueueSerial(QueueSerial *queueSerialOut)
{ … }
void ContextVk::resetPerFramePerfCounters()
{ … }
angle::Result ContextVk::ensureInterfacePipelineCache()
{ … }
}