| Index: src/gpu/vk/GrVkResourceProvider.h
|
| diff --git a/src/gpu/vk/GrVkResourceProvider.h b/src/gpu/vk/GrVkResourceProvider.h
|
| index d4383af96ab3e4a25d0fb849480471727d8ec938..3891539b0cada8101a6cf40a85c0d74f0d7d1e21 100644
|
| --- a/src/gpu/vk/GrVkResourceProvider.h
|
| +++ b/src/gpu/vk/GrVkResourceProvider.h
|
| @@ -25,11 +25,12 @@
|
| class GrPipeline;
|
| class GrPrimitiveProcessor;
|
| class GrTextureParams;
|
| -class GrVkPrimaryCommandBuffer;
|
| class GrVkGpu;
|
| class GrVkPipeline;
|
| +class GrVkPrimaryCommandBuffer;
|
| class GrVkRenderTarget;
|
| class GrVkSampler;
|
| +class GrVkSecondaryCommandBuffer;
|
|
|
| class GrVkResourceProvider {
|
| public:
|
| @@ -76,10 +77,12 @@ public:
|
| const GrVkRenderPass::LoadStoreOps& resolveOps,
|
| const GrVkRenderPass::LoadStoreOps& stencilOps);
|
|
|
| -
|
| - GrVkPrimaryCommandBuffer* createPrimaryCommandBuffer();
|
| + GrVkPrimaryCommandBuffer* findOrCreatePrimaryCommandBuffer();
|
| void checkCommandBuffers();
|
|
|
| + GrVkSecondaryCommandBuffer* findOrCreateSecondaryCommandBuffer();
|
| + void recycleSecondaryCommandBuffer(GrVkSecondaryCommandBuffer* cb);
|
| +
|
| // Finds or creates a compatible GrVkDescriptorPool for the requested type and count.
|
| // The refcount is incremented and a pointer returned.
|
| // TODO: Currently this will just create a descriptor pool without holding onto a ref itself
|
| @@ -200,8 +203,13 @@ private:
|
|
|
| SkSTArray<4, CompatibleRenderPassSet> fRenderPassArray;
|
|
|
| - // Array of CommandBuffers that are currently in flight
|
| + // Array of PrimaryCommandBuffers that are currently in flight
|
| SkSTArray<4, GrVkPrimaryCommandBuffer*> fActiveCommandBuffers;
|
| + // Array of available primary command buffers that are not in flight
|
| + SkSTArray<4, GrVkPrimaryCommandBuffer*> fAvailableCommandBuffers;
|
| +
|
| + // Array of available secondary command buffers
|
| + SkSTArray<16, GrVkSecondaryCommandBuffer*> fAvailableSecondaryCommandBuffers;
|
|
|
| // Stores GrVkSampler objects that we've already created so we can reuse them across multiple
|
| // GrVkPipelineStates
|
|
|