OLD | NEW |
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 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 void getBeginInfo(const GrVkRenderTarget& target, | 108 void getBeginInfo(const GrVkRenderTarget& target, |
109 VkRenderPassBeginInfo* beginInfo, | 109 VkRenderPassBeginInfo* beginInfo, |
110 VkSubpassContents* contents) const; | 110 VkSubpassContents* contents) const; |
111 | 111 |
112 // Returns whether or not the structure of a RenderTarget matches that of th
e VkRenderPass in | 112 // Returns whether or not the structure of a RenderTarget matches that of th
e VkRenderPass in |
113 // this object. Specifically this compares that the number of attachments, f
ormat of | 113 // this object. Specifically this compares that the number of attachments, f
ormat of |
114 // attachments, and sample counts are all the same. This function is used in
the creation of | 114 // attachments, and sample counts are all the same. This function is used in
the creation of |
115 // basic RenderPasses that can be used when creating a VkFrameBuffer object. | 115 // basic RenderPasses that can be used when creating a VkFrameBuffer object. |
116 bool isCompatible(const GrVkRenderTarget& target) const; | 116 bool isCompatible(const GrVkRenderTarget& target) const; |
117 | 117 |
| 118 bool isCompatible(const GrVkRenderPass& renderPass) const; |
| 119 |
118 bool equalLoadStoreOps(const LoadStoreOps& colorOps, | 120 bool equalLoadStoreOps(const LoadStoreOps& colorOps, |
119 const LoadStoreOps& resolveOps, | 121 const LoadStoreOps& resolveOps, |
120 const LoadStoreOps& stencilOps) const; | 122 const LoadStoreOps& stencilOps) const; |
121 | 123 |
122 VkRenderPass vkRenderPass() const { return fRenderPass; } | 124 VkRenderPass vkRenderPass() const { return fRenderPass; } |
123 | 125 |
124 void genKey(GrProcessorKeyBuilder* b) const; | 126 void genKey(GrProcessorKeyBuilder* b) const; |
125 | 127 |
126 private: | 128 private: |
127 GrVkRenderPass(const GrVkRenderPass&); | 129 GrVkRenderPass(const GrVkRenderPass&); |
128 | 130 |
129 void init(const GrVkGpu* gpu, | 131 void init(const GrVkGpu* gpu, |
130 const LoadStoreOps& colorOps, | 132 const LoadStoreOps& colorOps, |
131 const LoadStoreOps& resolveOps, | 133 const LoadStoreOps& resolveOps, |
132 const LoadStoreOps& stencilOps); | 134 const LoadStoreOps& stencilOps); |
133 | 135 |
| 136 bool isCompatible(const AttachmentsDescriptor&, const AttachmentFlags&) cons
t; |
| 137 |
134 void freeGPUData(const GrVkGpu* gpu) const override; | 138 void freeGPUData(const GrVkGpu* gpu) const override; |
135 | 139 |
136 VkRenderPass fRenderPass; | 140 VkRenderPass fRenderPass; |
137 AttachmentFlags fAttachmentFlags; | 141 AttachmentFlags fAttachmentFlags; |
138 AttachmentsDescriptor fAttachmentsDescriptor; | 142 AttachmentsDescriptor fAttachmentsDescriptor; |
139 | 143 |
140 typedef GrVkResource INHERITED; | 144 typedef GrVkResource INHERITED; |
141 }; | 145 }; |
142 | 146 |
143 GR_MAKE_BITFIELD_OPS(GrVkRenderPass::AttachmentFlags); | 147 GR_MAKE_BITFIELD_OPS(GrVkRenderPass::AttachmentFlags); |
144 | 148 |
145 #endif | 149 #endif |
OLD | NEW |