| 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 |
| 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 GrVkGpu; | 17 class GrVkGpu; |
| 18 class GrVkRenderTarget; | 18 class GrVkRenderTarget; |
| 19 | 19 |
| 20 class GrVkRenderPass : public GrVkResource { | 20 class GrVkRenderPass : public GrVkResource { |
| 21 public: | 21 public: |
| 22 GrVkRenderPass() : INHERITED(), fRenderPass(nullptr) {} | 22 GrVkRenderPass() : INHERITED(), fRenderPass(VK_NULL_HANDLE) {} |
| 23 void initSimple(const GrVkGpu* gpu, const GrVkRenderTarget& target); | 23 void initSimple(const GrVkGpu* gpu, const GrVkRenderTarget& target); |
| 24 | 24 |
| 25 struct AttachmentsDescriptor { | 25 struct AttachmentsDescriptor { |
| 26 struct AttachmentDesc { | 26 struct AttachmentDesc { |
| 27 VkFormat fFormat; | 27 VkFormat fFormat; |
| 28 int fSamples; | 28 int fSamples; |
| 29 AttachmentDesc() : fFormat(VK_FORMAT_UNDEFINED), fSamples(0) {} | 29 AttachmentDesc() : fFormat(VK_FORMAT_UNDEFINED), fSamples(0) {} |
| 30 bool operator==(const AttachmentDesc& right) const { | 30 bool operator==(const AttachmentDesc& right) const { |
| 31 return (fFormat == right.fFormat && fSamples == right.fSamples); | 31 return (fFormat == right.fFormat && fSamples == right.fSamples); |
| 32 } | 32 } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 VkRenderPass fRenderPass; | 81 VkRenderPass fRenderPass; |
| 82 AttachmentFlags fAttachmentFlags; | 82 AttachmentFlags fAttachmentFlags; |
| 83 AttachmentsDescriptor fAttachmentsDescriptor; | 83 AttachmentsDescriptor fAttachmentsDescriptor; |
| 84 | 84 |
| 85 typedef GrVkResource INHERITED; | 85 typedef GrVkResource INHERITED; |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 GR_MAKE_BITFIELD_OPS(GrVkRenderPass::AttachmentFlags); | 88 GR_MAKE_BITFIELD_OPS(GrVkRenderPass::AttachmentFlags); |
| 89 | 89 |
| 90 #endif | 90 #endif |
| OLD | NEW |