| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 createInfo.pAttachments = attachments.begin(); | 138 createInfo.pAttachments = attachments.begin(); |
| 139 createInfo.subpassCount = 1; | 139 createInfo.subpassCount = 1; |
| 140 createInfo.pSubpasses = &subpassDesc; | 140 createInfo.pSubpasses = &subpassDesc; |
| 141 createInfo.dependencyCount = 0; | 141 createInfo.dependencyCount = 0; |
| 142 createInfo.pDependencies = nullptr; | 142 createInfo.pDependencies = nullptr; |
| 143 | 143 |
| 144 GR_VK_CALL_ERRCHECK(gpu->vkInterface(), CreateRenderPass(gpu->device(), | 144 GR_VK_CALL_ERRCHECK(gpu->vkInterface(), CreateRenderPass(gpu->device(), |
| 145 &createInfo, | 145 &createInfo, |
| 146 nullptr, | 146 nullptr, |
| 147 &fRenderPass)); | 147 &fRenderPass)); |
| 148 |
| 149 // Get granularity for this render pass |
| 150 GR_VK_CALL(gpu->vkInterface(), GetRenderAreaGranularity(gpu->device(), |
| 151 fRenderPass, |
| 152 &fGranularity)); |
| 148 } | 153 } |
| 149 | 154 |
| 150 void GrVkRenderPass::init(const GrVkGpu* gpu, | 155 void GrVkRenderPass::init(const GrVkGpu* gpu, |
| 151 const GrVkRenderPass& compatibleRenderPass, | 156 const GrVkRenderPass& compatibleRenderPass, |
| 152 const LoadStoreOps& colorOp, | 157 const LoadStoreOps& colorOp, |
| 153 const LoadStoreOps& resolveOp, | 158 const LoadStoreOps& resolveOp, |
| 154 const LoadStoreOps& stencilOp) { | 159 const LoadStoreOps& stencilOp) { |
| 155 fAttachmentFlags = compatibleRenderPass.fAttachmentFlags; | 160 fAttachmentFlags = compatibleRenderPass.fAttachmentFlags; |
| 156 fAttachmentsDescriptor = compatibleRenderPass.fAttachmentsDescriptor; | 161 fAttachmentsDescriptor = compatibleRenderPass.fAttachmentsDescriptor; |
| 157 this->init(gpu, colorOp, resolveOp, stencilOp); | 162 this->init(gpu, colorOp, resolveOp, stencilOp); |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 } | 304 } |
| 300 if (fAttachmentFlags & kResolve_AttachmentFlag) { | 305 if (fAttachmentFlags & kResolve_AttachmentFlag) { |
| 301 b->add32(fAttachmentsDescriptor.fResolve.fFormat); | 306 b->add32(fAttachmentsDescriptor.fResolve.fFormat); |
| 302 b->add32(fAttachmentsDescriptor.fResolve.fSamples); | 307 b->add32(fAttachmentsDescriptor.fResolve.fSamples); |
| 303 } | 308 } |
| 304 if (fAttachmentFlags & kStencil_AttachmentFlag) { | 309 if (fAttachmentFlags & kStencil_AttachmentFlag) { |
| 305 b->add32(fAttachmentsDescriptor.fStencil.fFormat); | 310 b->add32(fAttachmentsDescriptor.fStencil.fFormat); |
| 306 b->add32(fAttachmentsDescriptor.fStencil.fSamples); | 311 b->add32(fAttachmentsDescriptor.fStencil.fSamples); |
| 307 } | 312 } |
| 308 } | 313 } |
| OLD | NEW |