Flutter Engine
The Flutter Engine
|
#include <GrVkCommandBuffer.h>
Public Types | |
enum | BarrierType { kBufferMemory_BarrierType , kImageMemory_BarrierType } |
Public Member Functions | |
virtual | ~GrVkCommandBuffer () |
void | invalidateState () |
void | pipelineBarrier (const GrVkGpu *gpu, const GrManagedResource *resource, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, bool byRegion, BarrierType barrierType, void *barrier) |
void | bindInputBuffer (GrVkGpu *gpu, uint32_t binding, sk_sp< const GrBuffer > buffer) |
void | bindIndexBuffer (GrVkGpu *gpu, sk_sp< const GrBuffer > buffer) |
void | bindPipeline (const GrVkGpu *gpu, sk_sp< const GrVkPipeline > pipeline) |
void | bindDescriptorSets (const GrVkGpu *gpu, VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, const VkDescriptorSet *descriptorSets, uint32_t dynamicOffsetCount, const uint32_t *dynamicOffsets) |
void | pushConstants (const GrVkGpu *gpu, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void *values) |
void | setViewport (const GrVkGpu *gpu, uint32_t firstViewport, uint32_t viewportCount, const VkViewport *viewports) |
void | setScissor (const GrVkGpu *gpu, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D *scissors) |
void | setBlendConstants (const GrVkGpu *gpu, const float blendConstants[4]) |
void | clearAttachments (const GrVkGpu *gpu, int numAttachments, const VkClearAttachment *attachments, int numRects, const VkClearRect *clearRects) |
void | drawIndexed (const GrVkGpu *gpu, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance) |
void | draw (const GrVkGpu *gpu, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) |
void | drawIndirect (const GrVkGpu *gpu, sk_sp< const GrBuffer > indirectBuffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) |
void | drawIndexedIndirect (const GrVkGpu *gpu, sk_sp< const GrBuffer > indirectBuffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) |
void | addResource (sk_sp< const GrManagedResource > resource) |
void | addResource (const GrManagedResource *resource) |
void | addRecycledResource (gr_rp< const GrRecycledResource > resource) |
void | addRecycledResource (const GrRecycledResource *resource) |
void | addGrBuffer (sk_sp< const GrBuffer > buffer) |
void | addGrSurface (sk_sp< const GrSurface > surface) |
void | releaseResources () |
void | freeGPUData (const GrGpu *gpu, VkCommandPool pool) const |
bool | hasWork () const |
Protected Types | |
template<typename T > | |
using | TrackedResourceArray = skia_private::STArray< kInitialTrackedResourcesCount, T > |
Protected Member Functions | |
GrVkCommandBuffer (VkCommandBuffer cmdBuffer, bool isWrapped=false) | |
bool | isWrapped () const |
void | addingWork (const GrVkGpu *gpu) |
void | submitPipelineBarriers (const GrVkGpu *gpu, bool forSelfDependency=false) |
virtual void | onReleaseResources () |
virtual void | onFreeGPUData (const GrVkGpu *gpu) const =0 |
Protected Attributes | |
TrackedResourceArray< sk_sp< const GrManagedResource > > | fTrackedResources |
TrackedResourceArray< gr_rp< const GrRecycledResource > > | fTrackedRecycledResources |
skia_private::STArray< 16, sk_sp< const GrBuffer > > | fTrackedGpuBuffers |
skia_private::STArray< 16, gr_cb< const GrSurface > > | fTrackedGpuSurfaces |
bool | fIsActive |
bool | fHasWork = false |
const GrVkRenderPass * | fActiveRenderPass = nullptr |
VkCommandBuffer | fCmdBuffer |
VkBuffer | fBoundInputBuffers [kMaxInputBuffers] |
VkBuffer | fBoundIndexBuffer |
VkViewport | fCachedViewport |
VkRect2D | fCachedScissor |
float | fCachedBlendConstant [4] |
skia_private::STArray< 1, VkBufferMemoryBarrier > | fBufferBarriers |
skia_private::STArray< 2, VkImageMemoryBarrier > | fImageBarriers |
bool | fBarriersByRegion = false |
VkPipelineStageFlags | fSrcStageMask = 0 |
VkPipelineStageFlags | fDstStageMask = 0 |
bool | fIsWrapped |
Static Protected Attributes | |
static constexpr uint32_t | kMaxInputBuffers = 2 |
Definition at line 25 of file GrVkCommandBuffer.h.
|
protected |
Definition at line 163 of file GrVkCommandBuffer.h.
Enumerator | |
---|---|
kBufferMemory_BarrierType | |
kImageMemory_BarrierType |
Definition at line 34 of file GrVkCommandBuffer.h.
|
inlinevirtual |
Definition at line 27 of file GrVkCommandBuffer.h.
|
inlineprotected |
Definition at line 145 of file GrVkCommandBuffer.h.
Definition at line 130 of file GrVkCommandBuffer.h.
Definition at line 134 of file GrVkCommandBuffer.h.
|
protected |
Definition at line 402 of file GrVkCommandBuffer.cpp.
|
inline |
Definition at line 126 of file GrVkCommandBuffer.h.
|
inline |
Definition at line 121 of file GrVkCommandBuffer.h.
|
inline |
Definition at line 115 of file GrVkCommandBuffer.h.
|
inline |
Definition at line 111 of file GrVkCommandBuffer.h.
void GrVkCommandBuffer::bindDescriptorSets | ( | const GrVkGpu * | gpu, |
VkPipelineLayout | layout, | ||
uint32_t | firstSet, | ||
uint32_t | setCount, | ||
const VkDescriptorSet * | descriptorSets, | ||
uint32_t | dynamicOffsetCount, | ||
const uint32_t * | dynamicOffsets | ||
) |
Definition at line 254 of file GrVkCommandBuffer.cpp.
Definition at line 209 of file GrVkCommandBuffer.cpp.
void GrVkCommandBuffer::bindInputBuffer | ( | GrVkGpu * | gpu, |
uint32_t | binding, | ||
sk_sp< const GrBuffer > | buffer | ||
) |
Definition at line 190 of file GrVkCommandBuffer.cpp.
void GrVkCommandBuffer::bindPipeline | ( | const GrVkGpu * | gpu, |
sk_sp< const GrVkPipeline > | pipeline | ||
) |
Definition at line 272 of file GrVkCommandBuffer.cpp.
void GrVkCommandBuffer::clearAttachments | ( | const GrVkGpu * | gpu, |
int | numAttachments, | ||
const VkClearAttachment * | attachments, | ||
int | numRects, | ||
const VkClearRect * | clearRects | ||
) |
Definition at line 223 of file GrVkCommandBuffer.cpp.
void GrVkCommandBuffer::draw | ( | const GrVkGpu * | gpu, |
uint32_t | vertexCount, | ||
uint32_t | instanceCount, | ||
uint32_t | firstVertex, | ||
uint32_t | firstInstance | ||
) |
Definition at line 312 of file GrVkCommandBuffer.cpp.
void GrVkCommandBuffer::drawIndexed | ( | const GrVkGpu * | gpu, |
uint32_t | indexCount, | ||
uint32_t | instanceCount, | ||
uint32_t | firstIndex, | ||
int32_t | vertexOffset, | ||
uint32_t | firstInstance | ||
) |
Definition at line 295 of file GrVkCommandBuffer.cpp.
void GrVkCommandBuffer::drawIndexedIndirect | ( | const GrVkGpu * | gpu, |
sk_sp< const GrBuffer > | indirectBuffer, | ||
VkDeviceSize | offset, | ||
uint32_t | drawCount, | ||
uint32_t | stride | ||
) |
Definition at line 345 of file GrVkCommandBuffer.cpp.
void GrVkCommandBuffer::drawIndirect | ( | const GrVkGpu * | gpu, |
sk_sp< const GrBuffer > | indirectBuffer, | ||
VkDeviceSize | offset, | ||
uint32_t | drawCount, | ||
uint32_t | stride | ||
) |
Definition at line 327 of file GrVkCommandBuffer.cpp.
void GrVkCommandBuffer::freeGPUData | ( | const GrGpu * | gpu, |
VkCommandPool | pool | ||
) | const |
Definition at line 43 of file GrVkCommandBuffer.cpp.
|
inline |
Definition at line 142 of file GrVkCommandBuffer.h.
void GrVkCommandBuffer::invalidateState | ( | ) |
Definition at line 26 of file GrVkCommandBuffer.cpp.
|
inlineprotected |
Definition at line 152 of file GrVkCommandBuffer.h.
|
protectedpure virtual |
|
inlineprotectedvirtual |
Definition at line 181 of file GrVkCommandBuffer.h.
void GrVkCommandBuffer::pipelineBarrier | ( | const GrVkGpu * | gpu, |
const GrManagedResource * | resource, | ||
VkPipelineStageFlags | srcStageMask, | ||
VkPipelineStageFlags | dstStageMask, | ||
bool | byRegion, | ||
BarrierType | barrierType, | ||
void * | barrier | ||
) |
Definition at line 77 of file GrVkCommandBuffer.cpp.
void GrVkCommandBuffer::pushConstants | ( | const GrVkGpu * | gpu, |
VkPipelineLayout | layout, | ||
VkShaderStageFlags | stageFlags, | ||
uint32_t | offset, | ||
uint32_t | size, | ||
const void * | values | ||
) |
Definition at line 280 of file GrVkCommandBuffer.cpp.
void GrVkCommandBuffer::releaseResources | ( | ) |
Definition at line 59 of file GrVkCommandBuffer.cpp.
void GrVkCommandBuffer::setBlendConstants | ( | const GrVkGpu * | gpu, |
const float | blendConstants[4] | ||
) |
Definition at line 393 of file GrVkCommandBuffer.cpp.
void GrVkCommandBuffer::setScissor | ( | const GrVkGpu * | gpu, |
uint32_t | firstScissor, | ||
uint32_t | scissorCount, | ||
const VkRect2D * | scissors | ||
) |
Definition at line 378 of file GrVkCommandBuffer.cpp.
void GrVkCommandBuffer::setViewport | ( | const GrVkGpu * | gpu, |
uint32_t | firstViewport, | ||
uint32_t | viewportCount, | ||
const VkViewport * | viewports | ||
) |
Definition at line 363 of file GrVkCommandBuffer.cpp.
|
protected |
Definition at line 147 of file GrVkCommandBuffer.cpp.
|
protected |
Definition at line 177 of file GrVkCommandBuffer.h.
|
protected |
Definition at line 197 of file GrVkCommandBuffer.h.
|
protected |
Definition at line 187 of file GrVkCommandBuffer.h.
|
protected |
Definition at line 186 of file GrVkCommandBuffer.h.
|
protected |
Definition at line 195 of file GrVkCommandBuffer.h.
|
protected |
Definition at line 192 of file GrVkCommandBuffer.h.
|
protected |
Definition at line 191 of file GrVkCommandBuffer.h.
|
protected |
Definition at line 190 of file GrVkCommandBuffer.h.
|
protected |
Definition at line 179 of file GrVkCommandBuffer.h.
|
protected |
Definition at line 199 of file GrVkCommandBuffer.h.
|
protected |
Definition at line 172 of file GrVkCommandBuffer.h.
|
protected |
Definition at line 196 of file GrVkCommandBuffer.h.
|
protected |
Definition at line 171 of file GrVkCommandBuffer.h.
|
protected |
Definition at line 201 of file GrVkCommandBuffer.h.
|
protected |
Definition at line 198 of file GrVkCommandBuffer.h.
|
protected |
Definition at line 166 of file GrVkCommandBuffer.h.
|
protected |
Definition at line 167 of file GrVkCommandBuffer.h.
|
protected |
Definition at line 165 of file GrVkCommandBuffer.h.
|
protected |
Definition at line 164 of file GrVkCommandBuffer.h.
|
staticconstexprprotected |
Definition at line 184 of file GrVkCommandBuffer.h.