8#ifndef GrVkCommandBuffer_DEFINED
9#define GrVkCommandBuffer_DEFINED
54 VkPipelineLayout layout,
57 const VkDescriptorSet* descriptorSets,
58 uint32_t dynamicOffsetCount,
59 const uint32_t* dynamicOffsets);
66 uint32_t firstViewport,
67 uint32_t viewportCount,
71 uint32_t firstScissor,
72 uint32_t scissorCount,
86 uint32_t instanceCount,
89 uint32_t firstInstance);
93 uint32_t instanceCount,
95 uint32_t firstInstance);
159 static constexpr int kInitialTrackedResourcesCount = 32;
162 template <
typename T>
213 void end(
GrVkGpu* gpu,
bool abandoningBuffer =
false);
223 bool forSecondaryCB);
232 std::unique_ptr<GrVkSecondaryCommandBuffer> secondaryBuffer);
238 uint32_t subRangeCount,
244 uint32_t subRangeCount,
252 uint32_t copyRegionCount,
262 uint32_t blitRegionCount,
269 uint32_t blitRegionCount,
277 uint32_t copyRegionCount,
287 uint32_t copyRegionCount,
299 uint32_t regionCount,
311 uint32_t regionCount,
325 fFinishedProcs.
clear();
332 : INHERITED(cmdBuffer)
335 void onFreeGPUData(
const GrVkGpu* gpu)
const override;
337 void onReleaseResources()
override;
340 VkFence fSubmitFence;
364 : INHERITED(cmdBuffer,
SkToBool(externalRenderPass)) {
368 void onFreeGPUData(
const GrVkGpu* gpu)
const override {}
static SkString resource(SkPDFResourceType type, int index)
sk_sp< T > sk_ref_sp(T *obj)
static constexpr bool SkToBool(const T &x)
TrackedResourceArray< sk_sp< const GrManagedResource > > fTrackedResources
float fCachedBlendConstant[4]
void pipelineBarrier(const GrVkGpu *gpu, const GrManagedResource *resource, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, bool byRegion, BarrierType barrierType, void *barrier)
skia_private::STArray< 16, sk_sp< const GrBuffer > > fTrackedGpuBuffers
virtual void onFreeGPUData(const GrVkGpu *gpu) const =0
void setBlendConstants(const GrVkGpu *gpu, const float blendConstants[4])
void setViewport(const GrVkGpu *gpu, uint32_t firstViewport, uint32_t viewportCount, const VkViewport *viewports)
VkCommandBuffer fCmdBuffer
void bindPipeline(const GrVkGpu *gpu, sk_sp< const GrVkPipeline > pipeline)
void addResource(sk_sp< const GrManagedResource > resource)
void addRecycledResource(gr_rp< const GrRecycledResource > resource)
void bindIndexBuffer(GrVkGpu *gpu, sk_sp< const GrBuffer > buffer)
void addingWork(const GrVkGpu *gpu)
virtual void onReleaseResources()
virtual ~GrVkCommandBuffer()
void drawIndexed(const GrVkGpu *gpu, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance)
static constexpr uint32_t kMaxInputBuffers
VkPipelineStageFlags fDstStageMask
void submitPipelineBarriers(const GrVkGpu *gpu, bool forSelfDependency=false)
void clearAttachments(const GrVkGpu *gpu, int numAttachments, const VkClearAttachment *attachments, int numRects, const VkClearRect *clearRects)
void setScissor(const GrVkGpu *gpu, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D *scissors)
skia_private::STArray< 2, VkImageMemoryBarrier > fImageBarriers
void addGrSurface(sk_sp< const GrSurface > surface)
void addRecycledResource(const GrRecycledResource *resource)
GrVkCommandBuffer(VkCommandBuffer cmdBuffer, bool isWrapped=false)
VkViewport fCachedViewport
skia_private::STArray< 16, gr_cb< const GrSurface > > fTrackedGpuSurfaces
VkBuffer fBoundIndexBuffer
void addGrBuffer(sk_sp< const GrBuffer > buffer)
void bindInputBuffer(GrVkGpu *gpu, uint32_t binding, sk_sp< const GrBuffer > buffer)
skia_private::STArray< 1, VkBufferMemoryBarrier > fBufferBarriers
const GrVkRenderPass * fActiveRenderPass
void drawIndirect(const GrVkGpu *gpu, sk_sp< const GrBuffer > indirectBuffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride)
void pushConstants(const GrVkGpu *gpu, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void *values)
VkPipelineStageFlags fSrcStageMask
@ kBufferMemory_BarrierType
@ kImageMemory_BarrierType
void freeGPUData(const GrGpu *gpu, VkCommandPool pool) const
VkBuffer fBoundInputBuffers[kMaxInputBuffers]
void addResource(const GrManagedResource *resource)
void bindDescriptorSets(const GrVkGpu *gpu, VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, const VkDescriptorSet *descriptorSets, uint32_t dynamicOffsetCount, const uint32_t *dynamicOffsets)
TrackedResourceArray< gr_rp< const GrRecycledResource > > fTrackedRecycledResources
void draw(const GrVkGpu *gpu, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance)
void drawIndexedIndirect(const GrVkGpu *gpu, sk_sp< const GrBuffer > indirectBuffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride)
void endRenderPass(const GrVkGpu *gpu)
bool submitToQueue(GrVkGpu *gpu, VkQueue queue, skia_private::TArray< GrVkSemaphore::Resource * > &signalSemaphores, skia_private::TArray< GrVkSemaphore::Resource * > &waitSemaphores)
void forceSync(GrVkGpu *gpu)
void recycleSecondaryCommandBuffers(GrVkCommandPool *cmdPool)
void clearColorImage(const GrVkGpu *gpu, GrVkImage *image, const VkClearColorValue *color, uint32_t subRangeCount, const VkImageSubresourceRange *subRanges)
void blitImage(const GrVkGpu *gpu, const GrManagedResource *srcResource, VkImage srcImage, VkImageLayout srcLayout, const GrManagedResource *dstResource, VkImage dstImage, VkImageLayout dstLayout, uint32_t blitRegionCount, const VkImageBlit *blitRegions, VkFilter filter)
void copyImageToBuffer(const GrVkGpu *gpu, GrVkImage *srcImage, VkImageLayout srcLayout, sk_sp< GrGpuBuffer > dstBuffer, uint32_t copyRegionCount, const VkBufferImageCopy *copyRegions)
void end(GrVkGpu *gpu, bool abandoningBuffer=false)
void resolveImage(GrVkGpu *gpu, const GrVkImage &srcImage, const GrVkImage &dstImage, uint32_t regionCount, const VkImageResolve *regions)
bool finished(GrVkGpu *gpu)
bool beginRenderPass(GrVkGpu *gpu, const GrVkRenderPass *, sk_sp< const GrVkFramebuffer >, const VkClearValue clearValues[], const GrSurface *target, const SkIRect &bounds, bool forSecondaryCB)
void copyBuffer(GrVkGpu *gpu, sk_sp< GrGpuBuffer > srcBuffer, sk_sp< GrGpuBuffer > dstBuffer, uint32_t regionCount, const VkBufferCopy *regions)
void copyImage(const GrVkGpu *gpu, GrVkImage *srcImage, VkImageLayout srcLayout, GrVkImage *dstImage, VkImageLayout dstLayout, uint32_t copyRegionCount, const VkImageCopy *copyRegions)
~GrVkPrimaryCommandBuffer() override
void addFinishedProc(sk_sp< skgpu::RefCntedCallback > finishedProc)
void clearDepthStencilImage(const GrVkGpu *gpu, GrVkImage *image, const VkClearDepthStencilValue *color, uint32_t subRangeCount, const VkImageSubresourceRange *subRanges)
void executeCommands(const GrVkGpu *gpu, std::unique_ptr< GrVkSecondaryCommandBuffer > secondaryBuffer)
void nexSubpass(GrVkGpu *gpu, bool forSecondaryCB)
void fillBuffer(GrVkGpu *gpu, sk_sp< GrGpuBuffer >, VkDeviceSize offset, VkDeviceSize size, uint32_t data)
void copyBufferToImage(const GrVkGpu *gpu, VkBuffer srcBuffer, GrVkImage *dstImage, VkImageLayout dstLayout, uint32_t copyRegionCount, const VkBufferImageCopy *copyRegions)
static GrVkPrimaryCommandBuffer * Create(GrVkGpu *gpu, VkCommandPool cmdPool)
void updateBuffer(GrVkGpu *gpu, sk_sp< GrVkBuffer > dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void *data)
static GrVkSecondaryCommandBuffer * Create(GrVkGpu *gpu, GrVkCommandPool *cmdPool)
VkCommandBuffer vkCommandBuffer()
void recycle(GrVkCommandPool *cmdPool)
void begin(GrVkGpu *gpu, const GrVkFramebuffer *framebuffer, const GrVkRenderPass *compatibleRenderPass)
Optional< SkRect > bounds
sk_sp< const SkImage > image
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
std::shared_ptr< const fml::Mapping > data
VkFlags VkPipelineStageFlags
VkFlags VkShaderStageFlags