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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 bool isCompatible(const GrVkRenderTarget& target) const; | 111 bool isCompatible(const GrVkRenderTarget& target) const; |
112 | 112 |
113 bool isCompatible(const GrVkRenderPass& renderPass) const; | 113 bool isCompatible(const GrVkRenderPass& renderPass) const; |
114 | 114 |
115 bool equalLoadStoreOps(const LoadStoreOps& colorOps, | 115 bool equalLoadStoreOps(const LoadStoreOps& colorOps, |
116 const LoadStoreOps& resolveOps, | 116 const LoadStoreOps& resolveOps, |
117 const LoadStoreOps& stencilOps) const; | 117 const LoadStoreOps& stencilOps) const; |
118 | 118 |
119 VkRenderPass vkRenderPass() const { return fRenderPass; } | 119 VkRenderPass vkRenderPass() const { return fRenderPass; } |
120 | 120 |
| 121 const VkExtent2D& granularity() const { return fGranularity; } |
| 122 |
121 void genKey(GrProcessorKeyBuilder* b) const; | 123 void genKey(GrProcessorKeyBuilder* b) const; |
122 | 124 |
123 #ifdef SK_TRACE_VK_RESOURCES | 125 #ifdef SK_TRACE_VK_RESOURCES |
124 void dumpInfo() const override { | 126 void dumpInfo() const override { |
125 SkDebugf("GrVkRenderPass: %d (%d refs)\n", fRenderPass, this->getRefCnt(
)); | 127 SkDebugf("GrVkRenderPass: %d (%d refs)\n", fRenderPass, this->getRefCnt(
)); |
126 } | 128 } |
127 #endif | 129 #endif |
128 | 130 |
129 private: | 131 private: |
130 GrVkRenderPass(const GrVkRenderPass&); | 132 GrVkRenderPass(const GrVkRenderPass&); |
131 | 133 |
132 void init(const GrVkGpu* gpu, | 134 void init(const GrVkGpu* gpu, |
133 const LoadStoreOps& colorOps, | 135 const LoadStoreOps& colorOps, |
134 const LoadStoreOps& resolveOps, | 136 const LoadStoreOps& resolveOps, |
135 const LoadStoreOps& stencilOps); | 137 const LoadStoreOps& stencilOps); |
136 | 138 |
137 bool isCompatible(const AttachmentsDescriptor&, const AttachmentFlags&) cons
t; | 139 bool isCompatible(const AttachmentsDescriptor&, const AttachmentFlags&) cons
t; |
138 | 140 |
139 void freeGPUData(const GrVkGpu* gpu) const override; | 141 void freeGPUData(const GrVkGpu* gpu) const override; |
140 | 142 |
141 VkRenderPass fRenderPass; | 143 VkRenderPass fRenderPass; |
142 AttachmentFlags fAttachmentFlags; | 144 AttachmentFlags fAttachmentFlags; |
143 AttachmentsDescriptor fAttachmentsDescriptor; | 145 AttachmentsDescriptor fAttachmentsDescriptor; |
| 146 VkExtent2D fGranularity; |
144 | 147 |
145 typedef GrVkResource INHERITED; | 148 typedef GrVkResource INHERITED; |
146 }; | 149 }; |
147 | 150 |
148 GR_MAKE_BITFIELD_OPS(GrVkRenderPass::AttachmentFlags); | 151 GR_MAKE_BITFIELD_OPS(GrVkRenderPass::AttachmentFlags); |
149 | 152 |
150 #endif | 153 #endif |
OLD | NEW |