OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 "GrVkGpuCommandBuffer.h" | 8 #include "GrVkGpuCommandBuffer.h" |
9 | 9 |
10 #include "GrVkCommandBuffer.h" | 10 #include "GrVkCommandBuffer.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 *storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; | 33 *storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; |
34 break; | 34 break; |
35 case GrGpuCommandBuffer::kDiscardAndStore_LoadAndStoreOp: | 35 case GrGpuCommandBuffer::kDiscardAndStore_LoadAndStoreOp: |
36 *loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; | 36 *loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; |
37 *storeOp = VK_ATTACHMENT_STORE_OP_STORE; | 37 *storeOp = VK_ATTACHMENT_STORE_OP_STORE; |
38 break; | 38 break; |
39 case GrGpuCommandBuffer::kDiscardAndDiscard_LoadAndStoreOp: | 39 case GrGpuCommandBuffer::kDiscardAndDiscard_LoadAndStoreOp: |
40 *loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; | 40 *loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; |
41 *storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; | 41 *storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; |
42 break; | 42 break; |
| 43 default: |
| 44 SK_ABORT("Invalid LoadAndStoreOp"); |
| 45 *loadOp = VK_ATTACHMENT_LOAD_OP_LOAD; |
| 46 *storeOp = VK_ATTACHMENT_STORE_OP_STORE; |
| 47 break; |
43 } | 48 } |
44 } | 49 } |
45 | 50 |
46 GrVkGpuCommandBuffer::GrVkGpuCommandBuffer(GrVkGpu* gpu, | 51 GrVkGpuCommandBuffer::GrVkGpuCommandBuffer(GrVkGpu* gpu, |
47 const GrVkRenderTarget& target, | 52 const GrVkRenderTarget& target, |
48 LoadAndStoreOp colorOp, GrColor color
Clear, | 53 LoadAndStoreOp colorOp, GrColor color
Clear, |
49 LoadAndStoreOp stencilOp, GrColor ste
ncilClear) | 54 LoadAndStoreOp stencilOp, GrColor ste
ncilClear) |
50 : fGpu(gpu) { | 55 : fGpu(gpu) { |
51 VkAttachmentLoadOp vkLoadOp; | 56 VkAttachmentLoadOp vkLoadOp; |
52 VkAttachmentStoreOp vkStoreOp; | 57 VkAttachmentStoreOp vkStoreOp; |
(...skipping 30 matching lines...) Expand all Loading... |
83 } | 88 } |
84 | 89 |
85 void GrVkGpuCommandBuffer::end() { | 90 void GrVkGpuCommandBuffer::end() { |
86 fCommandBuffer->end(fGpu); | 91 fCommandBuffer->end(fGpu); |
87 } | 92 } |
88 | 93 |
89 void GrVkGpuCommandBuffer::submit() { | 94 void GrVkGpuCommandBuffer::submit() { |
90 fGpu->submitSecondaryCommandBuffer(fCommandBuffer); | 95 fGpu->submitSecondaryCommandBuffer(fCommandBuffer); |
91 } | 96 } |
92 | 97 |
OLD | NEW |