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

Unified Diff: src/gpu/vk/GrVkBuffer.cpp

Issue 2195713002: Properly recycle uniform buffers in vulkan (Closed) Base URL: https://skia.googlesource.com/skia.git@slownanobench
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/vk/GrVkBuffer.h ('k') | src/gpu/vk/GrVkPipelineState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkBuffer.cpp
diff --git a/src/gpu/vk/GrVkBuffer.cpp b/src/gpu/vk/GrVkBuffer.cpp
index 75f3901b4e121da4b647af6338a54af67c8f987a..a03ea0cc41ef43ba0c4f71b7b4eaa9054409c27f 100644
--- a/src/gpu/vk/GrVkBuffer.cpp
+++ b/src/gpu/vk/GrVkBuffer.cpp
@@ -180,8 +180,8 @@ bool GrVkBuffer::vkUpdateData(GrVkGpu* gpu, const void* src, size_t srcSizeInByt
if (!fResource->unique()) {
// in use by the command buffer, so we need to create a new one
- fResource->unref(gpu);
- fResource = Create(gpu, fDesc);
+ fResource->recycle(gpu);
+ fResource = this->createResource(gpu, fDesc);
if (createdNewBuffer) {
*createdNewBuffer = true;
}
« no previous file with comments | « src/gpu/vk/GrVkBuffer.h ('k') | src/gpu/vk/GrVkPipelineState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698