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

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

Issue 2163673002: Setup system in Vulkan to reuse VkDescriptorSet allocations. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit Created 4 years, 5 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 | « gyp/gpu.gypi ('k') | src/gpu/vk/GrVkDescriptorSet.h » ('j') | 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 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 #include "GrVkCommandBuffer.h" 8 #include "GrVkCommandBuffer.h"
9 9
10 #include "GrVkFramebuffer.h" 10 #include "GrVkFramebuffer.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 for (int i = 0; i < fTrackedResources.count(); ++i) { 66 for (int i = 0; i < fTrackedResources.count(); ++i) {
67 fTrackedResources[i]->unref(gpu); 67 fTrackedResources[i]->unref(gpu);
68 } 68 }
69 fTrackedResources.reset(); 69 fTrackedResources.reset();
70 70
71 for (int i = 0; i < fTrackedRecycledResources.count(); ++i) { 71 for (int i = 0; i < fTrackedRecycledResources.count(); ++i) {
72 fTrackedRecycledResources[i]->recycle(const_cast<GrVkGpu*>(gpu)); 72 fTrackedRecycledResources[i]->recycle(const_cast<GrVkGpu*>(gpu));
73 } 73 }
74 fTrackedRecycledResources.reset(); 74 fTrackedRecycledResources.reset();
75 75
76
77 this->invalidateState(); 76 this->invalidateState();
78 77
79 // we will retain resources for later use 78 // we will retain resources for later use
80 VkCommandBufferResetFlags flags = 0; 79 VkCommandBufferResetFlags flags = 0;
81 GR_VK_CALL(gpu->vkInterface(), ResetCommandBuffer(fCmdBuffer, flags)); 80 GR_VK_CALL(gpu->vkInterface(), ResetCommandBuffer(fCmdBuffer, flags));
82 81
83 this->onReset(gpu); 82 this->onReset(gpu);
84 } 83 }
85 84
86 //////////////////////////////////////////////////////////////////////////////// 85 ////////////////////////////////////////////////////////////////////////////////
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 fIsActive = true; 631 fIsActive = true;
633 } 632 }
634 633
635 void GrVkSecondaryCommandBuffer::end(const GrVkGpu* gpu) { 634 void GrVkSecondaryCommandBuffer::end(const GrVkGpu* gpu) {
636 SkASSERT(fIsActive); 635 SkASSERT(fIsActive);
637 GR_VK_CALL_ERRCHECK(gpu->vkInterface(), EndCommandBuffer(fCmdBuffer)); 636 GR_VK_CALL_ERRCHECK(gpu->vkInterface(), EndCommandBuffer(fCmdBuffer));
638 this->invalidateState(); 637 this->invalidateState();
639 fIsActive = false; 638 fIsActive = false;
640 } 639 }
641 640
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/vk/GrVkDescriptorSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698