| Index: src/gpu/vk/GrVkGpu.cpp
|
| diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
|
| index ab6761cc32b5ccda141ca310bdd8215ed9065ed8..4ebe4998b3a15d999db7453a0793230fa6411ce9 100644
|
| --- a/src/gpu/vk/GrVkGpu.cpp
|
| +++ b/src/gpu/vk/GrVkGpu.cpp
|
| @@ -119,17 +119,18 @@ GrVkGpu::GrVkGpu(GrContext* context, const GrContextOptions& options,
|
| VK_CALL(GetPhysicalDeviceMemoryProperties(backendCtx->fPhysicalDevice, &fPhysDevMemProps));
|
|
|
| const VkCommandPoolCreateInfo cmdPoolInfo = {
|
| - VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO, // sType
|
| - nullptr, // pNext
|
| - VK_COMMAND_POOL_CREATE_TRANSIENT_BIT, // CmdPoolCreateFlags
|
| - backendCtx->fGraphicsQueueIndex, // queueFamilyIndex
|
| + VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO, // sType
|
| + nullptr, // pNext
|
| + VK_COMMAND_POOL_CREATE_TRANSIENT_BIT |
|
| + VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT, // CmdPoolCreateFlags
|
| + backendCtx->fGraphicsQueueIndex, // queueFamilyIndex
|
| };
|
| GR_VK_CALL_ERRCHECK(this->vkInterface(), CreateCommandPool(fDevice, &cmdPoolInfo, nullptr,
|
| &fCmdPool));
|
|
|
| // must call this after creating the CommandPool
|
| fResourceProvider.init();
|
| - fCurrentCmdBuffer = fResourceProvider.createPrimaryCommandBuffer();
|
| + fCurrentCmdBuffer = fResourceProvider.findOrCreatePrimaryCommandBuffer();
|
| SkASSERT(fCurrentCmdBuffer);
|
| fCurrentCmdBuffer->begin(this);
|
|
|
| @@ -205,7 +206,7 @@ void GrVkGpu::submitCommandBuffer(SyncQueue sync) {
|
|
|
| // Release old command buffer and create a new one
|
| fCurrentCmdBuffer->unref(this);
|
| - fCurrentCmdBuffer = fResourceProvider.createPrimaryCommandBuffer();
|
| + fCurrentCmdBuffer = fResourceProvider.findOrCreatePrimaryCommandBuffer();
|
| SkASSERT(fCurrentCmdBuffer);
|
|
|
| fCurrentCmdBuffer->begin(this);
|
| @@ -1482,7 +1483,7 @@ bool GrVkGpu::onReadPixels(GrSurface* surface,
|
| return true;
|
| }
|
|
|
| -void GrVkGpu::submitSecondaryCommandBuffer(const GrVkSecondaryCommandBuffer* buffer,
|
| +void GrVkGpu::submitSecondaryCommandBuffer(GrVkSecondaryCommandBuffer* buffer,
|
| const GrVkRenderPass* renderPass,
|
| const VkClearValue* colorClear,
|
| GrVkRenderTarget* target,
|
|
|