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

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

Issue 2035853002: Add support for finding/creating general GrVkRenderPass from the VkResourceProvider. (Closed) Base URL: https://skia.googlesource.com/skia.git@renderPass
Patch Set: nits Created 4 years, 6 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/GrVkRenderTarget.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 5368a212b4563fa1cd9cc248b94d2cec470a234e..e754501cbaef4ea4b45eff9b2a426321587e549a 100644
--- a/src/gpu/vk/GrVkResourceProvider.h
+++ b/src/gpu/vk/GrVkResourceProvider.h
@@ -12,6 +12,7 @@
#include "GrResourceHandle.h"
#include "GrVkDescriptorPool.h"
#include "GrVkPipelineState.h"
+#include "GrVkRenderPass.h"
#include "GrVkResource.h"
#include "GrVkUtil.h"
#include "SkTArray.h"
@@ -27,7 +28,6 @@ class GrTextureParams;
class GrVkCommandBuffer;
class GrVkGpu;
class GrVkPipeline;
-class GrVkRenderPass;
class GrVkRenderTarget;
class GrVkSampler;
@@ -59,21 +59,23 @@ public:
// findCompatibleRenderPass(GrVkRenderTarget&, CompatibleRPHandle*).
const GrVkRenderPass* findCompatibleRenderPass(const CompatibleRPHandle& compatibleHandle);
-#if 0
- // TODO:
+ // Finds or creates a render pass that matches the target and LoadStoreOps, increments the
+ // refcount, and returns. The caller can optionally pass in a pointer to a CompatibleRPHandle.
+ // If this is non null it will be set to a handle that can be used in the furutre to quickly
+ // return a GrVkRenderPasses without the need inspecting a GrVkRenderTarget.
const GrVkRenderPass* findRenderPass(const GrVkRenderTarget& target,
- VkAttachmentLoadOp colorLoad,
- VkAttachmentStoreOp colorStore,
- VkAttachmentLoadOp stencilLoad,
- VkAttachmentStoreOp stencilStore,
+ const GrVkRenderPass::LoadStoreOps& colorOps,
+ const GrVkRenderPass::LoadStoreOps& resolveOps,
+ const GrVkRenderPass::LoadStoreOps& stencilOps,
CompatibleRPHandle* compatibleHandle = nullptr);
+ // The CompatibleRPHandle must be a valid handle previously set by a call to findRenderPass or
+ // findCompatibleRenderPass.
const GrVkRenderPass* findRenderPass(const CompatibleRPHandle& compatibleHandle,
- VkAttachmentLoadOp colorLoad,
- VkAttachmentStoreOp colorStore,
- VkAttachmentLoadOp stencilLoad,
- VkAttachmentStoreOp stencilStore);
-#endif
+ const GrVkRenderPass::LoadStoreOps& colorOps,
+ const GrVkRenderPass::LoadStoreOps& resolveOps,
+ const GrVkRenderPass::LoadStoreOps& stencilOps);
+
GrVkCommandBuffer* createCommandBuffer();
void checkCommandBuffers();
@@ -175,6 +177,11 @@ private:
return fRenderPasses[0];
}
+ GrVkRenderPass* getRenderPass(const GrVkGpu* gpu,
+ const GrVkRenderPass::LoadStoreOps& colorOps,
+ const GrVkRenderPass::LoadStoreOps& resolveOps,
+ const GrVkRenderPass::LoadStoreOps& stencilOps);
+
void releaseResources(const GrVkGpu* gpu);
void abandonResources();
« no previous file with comments | « src/gpu/vk/GrVkRenderTarget.h ('k') | src/gpu/vk/GrVkResourceProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698