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 #include "GrVkRenderPass.h" | 8 #include "GrVkRenderPass.h" |
9 | 9 |
10 #include "GrProcessor.h" | 10 #include "GrProcessor.h" |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 | 180 |
181 memset(beginInfo, 0, sizeof(VkRenderPassBeginInfo)); | 181 memset(beginInfo, 0, sizeof(VkRenderPassBeginInfo)); |
182 beginInfo->sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO; | 182 beginInfo->sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO; |
183 beginInfo->pNext = nullptr; | 183 beginInfo->pNext = nullptr; |
184 beginInfo->renderPass = fRenderPass; | 184 beginInfo->renderPass = fRenderPass; |
185 beginInfo->framebuffer = target.framebuffer()->framebuffer(); | 185 beginInfo->framebuffer = target.framebuffer()->framebuffer(); |
186 beginInfo->renderArea = renderArea; | 186 beginInfo->renderArea = renderArea; |
187 beginInfo->clearValueCount = 0; | 187 beginInfo->clearValueCount = 0; |
188 beginInfo->pClearValues = nullptr; | 188 beginInfo->pClearValues = nullptr; |
189 | 189 |
190 // Currently just assuming no secondary cmd buffers. This value will need to
be update if we | 190 // Currently just assuming no secondary cmd buffers. This value will need to
be update if we |
191 // have them. | 191 // have them. |
192 *contents = VK_SUBPASS_CONTENTS_INLINE; | 192 *contents = VK_SUBPASS_CONTENTS_INLINE; |
193 } | 193 } |
194 | 194 |
195 bool GrVkRenderPass::isCompatible(const GrVkRenderTarget& target) const { | 195 bool GrVkRenderPass::isCompatible(const GrVkRenderTarget& target) const { |
196 AttachmentsDescriptor desc; | 196 AttachmentsDescriptor desc; |
197 AttachmentFlags flags; | 197 AttachmentFlags flags; |
198 target.getAttachmentsDescriptor(&desc, &flags); | 198 target.getAttachmentsDescriptor(&desc, &flags); |
199 | 199 |
200 if (flags != fAttachmentFlags) { | 200 if (flags != fAttachmentFlags) { |
(...skipping 27 matching lines...) Expand all Loading... |
228 } | 228 } |
229 if (fAttachmentFlags & kResolve_AttachmentFlag) { | 229 if (fAttachmentFlags & kResolve_AttachmentFlag) { |
230 b->add32(fAttachmentsDescriptor.fResolve.fFormat); | 230 b->add32(fAttachmentsDescriptor.fResolve.fFormat); |
231 b->add32(fAttachmentsDescriptor.fResolve.fSamples); | 231 b->add32(fAttachmentsDescriptor.fResolve.fSamples); |
232 } | 232 } |
233 if (fAttachmentFlags & kStencil_AttachmentFlag) { | 233 if (fAttachmentFlags & kStencil_AttachmentFlag) { |
234 b->add32(fAttachmentsDescriptor.fStencil.fFormat); | 234 b->add32(fAttachmentsDescriptor.fStencil.fFormat); |
235 b->add32(fAttachmentsDescriptor.fStencil.fSamples); | 235 b->add32(fAttachmentsDescriptor.fStencil.fSamples); |
236 } | 236 } |
237 } | 237 } |
238 | |
OLD | NEW |