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

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

Issue 1977403002: Refactor creation of GrVkRenderPasses to make them move general (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: review nits Created 4 years, 7 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 | « no previous file | src/gpu/vk/GrVkRenderPass.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkRenderPass.h
diff --git a/src/gpu/vk/GrVkRenderPass.h b/src/gpu/vk/GrVkRenderPass.h
index d38848fe1e84c0262bd4dadd363f1320c9a56c8b..082cccda776223d6240ef24b47a6be56b0579062 100644
--- a/src/gpu/vk/GrVkRenderPass.h
+++ b/src/gpu/vk/GrVkRenderPass.h
@@ -27,13 +27,26 @@ public:
struct AttachmentDesc {
VkFormat fFormat;
int fSamples;
- AttachmentDesc() : fFormat(VK_FORMAT_UNDEFINED), fSamples(0) {}
+ VkAttachmentLoadOp fLoadOp;
+ VkAttachmentStoreOp fStoreOp;
+
+ AttachmentDesc()
+ : fFormat(VK_FORMAT_UNDEFINED)
+ , fSamples(0)
+ , fLoadOp(VK_ATTACHMENT_LOAD_OP_LOAD)
+ , fStoreOp(VK_ATTACHMENT_STORE_OP_STORE) {}
bool operator==(const AttachmentDesc& right) const {
- return (fFormat == right.fFormat && fSamples == right.fSamples);
+ return (fFormat == right.fFormat &&
+ fSamples == right.fSamples &&
+ fLoadOp == right.fLoadOp &&
+ fStoreOp == right.fStoreOp);
}
bool operator!=(const AttachmentDesc& right) const {
return !(*this == right);
}
+ bool isCompatible(const AttachmentDesc& desc) const {
+ return (fFormat == desc.fFormat && fSamples == desc.fSamples);
+ }
};
AttachmentDesc fColor;
AttachmentDesc fResolve;
@@ -77,7 +90,6 @@ public:
private:
GrVkRenderPass(const GrVkRenderPass&);
- GrVkRenderPass& operator=(const GrVkRenderPass&);
void freeGPUData(const GrVkGpu* gpu) const override;
« no previous file with comments | « no previous file | src/gpu/vk/GrVkRenderPass.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698