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

Side by Side Diff: src/gpu/vk/GrVkRenderPass.h

Issue 1816153002: Set up cache in vulkan to reuse GrVkPrograms (aka VkPipelines) (Closed) Base URL: https://skia.googlesource.com/skia.git@progSamplers
Patch Set: rebase Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « src/gpu/vk/GrVkProgramDataManager.cpp ('k') | src/gpu/vk/GrVkRenderPass.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrVkRenderPass_DEFINED 8 #ifndef GrVkRenderPass_DEFINED
9 #define GrVkRenderPass_DEFINED 9 #define GrVkRenderPass_DEFINED
10 10
11 #include "GrTypes.h" 11 #include "GrTypes.h"
12 12
13 #include "GrVkResource.h" 13 #include "GrVkResource.h"
14 14
15 #include "vulkan/vulkan.h" 15 #include "vulkan/vulkan.h"
16 16
17 class GrProcessorKeyBuilder;
17 class GrVkGpu; 18 class GrVkGpu;
18 class GrVkRenderTarget; 19 class GrVkRenderTarget;
19 20
20 class GrVkRenderPass : public GrVkResource { 21 class GrVkRenderPass : public GrVkResource {
21 public: 22 public:
22 GrVkRenderPass() : INHERITED(), fRenderPass(VK_NULL_HANDLE) {} 23 GrVkRenderPass() : INHERITED(), fRenderPass(VK_NULL_HANDLE) {}
23 void initSimple(const GrVkGpu* gpu, const GrVkRenderTarget& target); 24 void initSimple(const GrVkGpu* gpu, const GrVkRenderTarget& target);
24 25
25 struct AttachmentsDescriptor { 26 struct AttachmentsDescriptor {
26 struct AttachmentDesc { 27 struct AttachmentDesc {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 VkSubpassContents* contents) const; 66 VkSubpassContents* contents) const;
66 67
67 // Returns whether or not the structure of a RenderTarget matches that of th e VkRenderPass in 68 // Returns whether or not the structure of a RenderTarget matches that of th e VkRenderPass in
68 // this object. Specifically this compares that the number of attachments, f ormat of 69 // this object. Specifically this compares that the number of attachments, f ormat of
69 // attachments, and sample counts are all the same. This function is used in the creation of 70 // attachments, and sample counts are all the same. This function is used in the creation of
70 // basic RenderPasses that can be used when creating a VkFrameBuffer object. 71 // basic RenderPasses that can be used when creating a VkFrameBuffer object.
71 bool isCompatible(const GrVkRenderTarget& target) const; 72 bool isCompatible(const GrVkRenderTarget& target) const;
72 73
73 VkRenderPass vkRenderPass() const { return fRenderPass; } 74 VkRenderPass vkRenderPass() const { return fRenderPass; }
74 75
76 void genKey(GrProcessorKeyBuilder* b) const;
77
75 private: 78 private:
76 GrVkRenderPass(const GrVkRenderPass&); 79 GrVkRenderPass(const GrVkRenderPass&);
77 GrVkRenderPass& operator=(const GrVkRenderPass&); 80 GrVkRenderPass& operator=(const GrVkRenderPass&);
78 81
79 void freeGPUData(const GrVkGpu* gpu) const override; 82 void freeGPUData(const GrVkGpu* gpu) const override;
80 83
81 VkRenderPass fRenderPass; 84 VkRenderPass fRenderPass;
82 AttachmentFlags fAttachmentFlags; 85 AttachmentFlags fAttachmentFlags;
83 AttachmentsDescriptor fAttachmentsDescriptor; 86 AttachmentsDescriptor fAttachmentsDescriptor;
84 87
85 typedef GrVkResource INHERITED; 88 typedef GrVkResource INHERITED;
86 }; 89 };
87 90
88 GR_MAKE_BITFIELD_OPS(GrVkRenderPass::AttachmentFlags); 91 GR_MAKE_BITFIELD_OPS(GrVkRenderPass::AttachmentFlags);
89 92
90 #endif 93 #endif
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkProgramDataManager.cpp ('k') | src/gpu/vk/GrVkRenderPass.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698