8#ifndef skgpu_graphite_VulkanCommandBuffer_DEFINED
9#define skgpu_graphite_VulkanCommandBuffer_DEFINED
20class VulkanDescriptorSet;
21class VulkanResourceProvider;
22class VulkanSharedContext;
55 VkCommandBuffer primaryCommandBuffer,
59 void onResetCommandBuffer()
override;
64 void addWaitSemaphores(
size_t numWaitSemaphores,
66 void addSignalSemaphores(
size_t numWaitSemaphores,
68 void prepareSurfaceForStateUpdate(
SkSurface* targetSurface,
74 const Texture* depthStencilTexture,
81 const Texture* depthStencilTexture);
88 void recordTextureAndSamplerDescSet(
89 const DrawPass&,
const DrawPassCommands::BindTexturesAndSamplers&);
91 void bindTextureSamplers();
92 void bindUniformBuffers();
93 void syncDescriptorSets();
96 void setBlendConstants(
float* blendConstants);
101 void bindVertexBuffers(
const Buffer* vertexBuffer,
size_t vertexOffset,
102 const Buffer* instanceBuffer,
size_t instanceOffset);
104 void bindIndexBuffer(
const Buffer* indexBuffer,
size_t offset);
105 void bindIndirectBuffer(
const Buffer* indirectBuffer,
size_t offset);
106 void setScissor(
unsigned int left,
unsigned int top,
109 void draw(
PrimitiveType type,
unsigned int baseVertex,
unsigned int vertexCount);
110 void drawIndexed(
PrimitiveType type,
unsigned int baseIndex,
unsigned int indexCount,
111 unsigned int baseVertex);
113 unsigned int baseVertex,
unsigned int vertexCount,
114 unsigned int baseInstance,
unsigned int instanceCount);
116 unsigned int indexCount,
unsigned int baseVertex,
117 unsigned int baseInstance,
unsigned int instanceCount);
125 bool onCopyBufferToBuffer(
const Buffer* srcBuffer,
129 size_t size)
override;
130 bool onCopyTextureToBuffer(
const Texture*,
134 size_t bufferRowBytes)
override;
135 bool onCopyBufferToTexture(
const Buffer*,
139 bool onCopyTextureToTexture(
const Texture*
src,
143 int mipLevel)
override;
145 bool onSynchronizeBufferToCpu(
const Buffer*,
bool* outDidResultInWork)
override;
149 kBufferMemory_BarrierType,
150 kImageMemory_BarrierType
156 BarrierType barrierType,
158 void submitPipelineBarriers(
bool forSelfDependency =
false);
163 void updateRtAdjustUniform(
const SkRect& viewport);
165 bool updateLoadMSAAVertexBuffer();
169 bool updateAndBindLoadMSAAInputAttachment(
const VulkanTexture& resolveTexture);
173 size_t dstOffset = 0);
175 void setViewport(
const SkRect& viewport);
178 VkCommandBuffer fPrimaryCommandBuffer;
183 bool fActive =
false;
186 bool fActiveRenderPass =
false;
199 bool fBarriersByRegion =
false;
204 bool fBindUniformBuffers =
false;
205 bool fBindTextureSamplers =
false;
207 std::array<BindUniformBufferInfo, VulkanGraphicsPipeline::kNumUniformBuffers>
208 fUniformBuffersToBind;
211 int fNumTextureSamplers = 0;
218 size_t fBoundIndexBufferOffset = 0;
219 size_t fBoundIndirectBufferOffset = 0;
221 float fCachedBlendConstant[4];
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static SkString resource(SkPDFResourceType type, int index)
bool setNewCommandBufferResources() override
void addBufferMemoryBarrier(const Resource *resource, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkBufferMemoryBarrier *barrier)
~VulkanCommandBuffer() override
void addImageMemoryBarrier(const Resource *, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, bool byRegion, VkImageMemoryBarrier *barrier)
static std::unique_ptr< VulkanCommandBuffer > Make(const VulkanSharedContext *, VulkanResourceProvider *)
static constexpr unsigned int kNumInputBuffers
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