Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: src/gpu/vk/GrVkGpuCommandBuffer.cpp

Issue 2068523002: Fix compile error (uninitialized variable use) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Let's abort if this ever happens. It shouldn't. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698