Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Unified Diff: src/gpu/vk/GrVkResourceProvider.h

Issue 2115993002: Add resource tracking output and command buffer recycling (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/vk/GrVkResource.h ('k') | src/gpu/vk/GrVkResourceProvider.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/gpu/vk/GrVkResource.h ('k') | src/gpu/vk/GrVkResourceProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698