Return handle when getting simple render pass in vulkan.
We then store this handle on the GrVkFramebuffer. This will be used in
follow on CL to help remove the use of GrVkRenderTarget in the
GrVkOpsRenderPass.
Bug: skia:11809
Change-Id: I979de4e474be1d5e5683dc263fe347cfb63b2342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/393376
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/vk/GrVkFramebuffer.cpp b/src/gpu/vk/GrVkFramebuffer.cpp
index 7a3c1a1..e2170bc 100644
--- a/src/gpu/vk/GrVkFramebuffer.cpp
+++ b/src/gpu/vk/GrVkFramebuffer.cpp
@@ -12,12 +12,14 @@
#include "src/gpu/vk/GrVkImageView.h"
#include "src/gpu/vk/GrVkRenderPass.h"
-GrVkFramebuffer* GrVkFramebuffer::Create(GrVkGpu* gpu,
- int width, int height,
- const GrVkRenderPass* renderPass,
- const GrVkAttachment* colorAttachment,
- const GrVkAttachment* resolveAttachment,
- const GrVkAttachment* stencilAttachment) {
+GrVkFramebuffer* GrVkFramebuffer::Create(
+ GrVkGpu* gpu,
+ int width, int height,
+ const GrVkRenderPass* renderPass,
+ const GrVkAttachment* colorAttachment,
+ const GrVkAttachment* resolveAttachment,
+ const GrVkAttachment* stencilAttachment,
+ GrVkResourceProvider::CompatibleRPHandle compatibleRenderPassHandle) {
// At the very least we need a renderPass and a colorAttachment
SkASSERT(renderPass);
SkASSERT(colorAttachment);
@@ -53,7 +55,8 @@
}
return new GrVkFramebuffer(gpu, framebuffer, sk_ref_sp(colorAttachment),
- sk_ref_sp(resolveAttachment), sk_ref_sp(stencilAttachment));
+ sk_ref_sp(resolveAttachment), sk_ref_sp(stencilAttachment),
+ compatibleRenderPassHandle);
}
GrVkFramebuffer::~GrVkFramebuffer() {}