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 GrVkCommandBuffer_DEFINED | 8 #ifndef GrVkCommandBuffer_DEFINED |
9 #define GrVkCommandBuffer_DEFINED | 9 #define GrVkCommandBuffer_DEFINED |
10 | 10 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 120 |
121 void copyImage(const GrVkGpu* gpu, | 121 void copyImage(const GrVkGpu* gpu, |
122 GrVkImage* srcImage, | 122 GrVkImage* srcImage, |
123 VkImageLayout srcLayout, | 123 VkImageLayout srcLayout, |
124 GrVkImage* dstImage, | 124 GrVkImage* dstImage, |
125 VkImageLayout dstLayout, | 125 VkImageLayout dstLayout, |
126 uint32_t copyRegionCount, | 126 uint32_t copyRegionCount, |
127 const VkImageCopy* copyRegions); | 127 const VkImageCopy* copyRegions); |
128 | 128 |
129 void blitImage(const GrVkGpu* gpu, | 129 void blitImage(const GrVkGpu* gpu, |
130 const GrVkImage::Resource* srcImage, | 130 const GrVkResource* srcResource, |
| 131 VkImage srcImage, |
131 VkImageLayout srcLayout, | 132 VkImageLayout srcLayout, |
132 const GrVkImage::Resource* dstImage, | 133 const GrVkResource* dstResource, |
| 134 VkImage dstImage, |
133 VkImageLayout dstLayout, | 135 VkImageLayout dstLayout, |
134 uint32_t blitRegionCount, | 136 uint32_t blitRegionCount, |
135 const VkImageBlit* blitRegions, | 137 const VkImageBlit* blitRegions, |
136 VkFilter filter); | 138 VkFilter filter); |
137 | 139 |
| 140 void blitImage(const GrVkGpu* gpu, |
| 141 const GrVkImage& srcImage, |
| 142 const GrVkImage& dstImage, |
| 143 uint32_t blitRegionCount, |
| 144 const VkImageBlit* blitRegions, |
| 145 VkFilter filter) { |
| 146 this->blitImage(gpu, |
| 147 srcImage.resource(), |
| 148 srcImage.image(), |
| 149 srcImage.currentLayout(), |
| 150 dstImage.resource(), |
| 151 dstImage.image(), |
| 152 dstImage.currentLayout(), |
| 153 blitRegionCount, |
| 154 blitRegions, |
| 155 filter); |
| 156 } |
| 157 |
138 void copyImageToBuffer(const GrVkGpu* gpu, | 158 void copyImageToBuffer(const GrVkGpu* gpu, |
139 GrVkImage* srcImage, | 159 GrVkImage* srcImage, |
140 VkImageLayout srcLayout, | 160 VkImageLayout srcLayout, |
141 GrVkTransferBuffer* dstBuffer, | 161 GrVkTransferBuffer* dstBuffer, |
142 uint32_t copyRegionCount, | 162 uint32_t copyRegionCount, |
143 const VkBufferImageCopy* copyRegions); | 163 const VkBufferImageCopy* copyRegions); |
144 | 164 |
145 void copyBufferToImage(const GrVkGpu* gpu, | 165 void copyBufferToImage(const GrVkGpu* gpu, |
146 GrVkTransferBuffer* srcBuffer, | 166 GrVkTransferBuffer* srcBuffer, |
147 GrVkImage* dstImage, | 167 GrVkImage* dstImage, |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 const GrVkRenderPass* fActiveRenderPass; | 234 const GrVkRenderPass* fActiveRenderPass; |
215 | 235 |
216 // Cached values used for dynamic state updates | 236 // Cached values used for dynamic state updates |
217 VkViewport fCachedViewport; | 237 VkViewport fCachedViewport; |
218 VkRect2D fCachedScissor; | 238 VkRect2D fCachedScissor; |
219 float fCachedBlendConstant[4]; | 239 float fCachedBlendConstant[4]; |
220 }; | 240 }; |
221 | 241 |
222 | 242 |
223 #endif | 243 #endif |
OLD | NEW |