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

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

Issue 1872553005: Don't create new descriptor set for vulkan uniforms every draw (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 679132873b7577919dd8794e9875a963c9b4ffe2..9b54dee675a8c1bf7cd200d37ef42065c85fd50c 100644
--- a/src/gpu/vk/GrVkBuffer.cpp
+++ b/src/gpu/vk/GrVkBuffer.cpp
@@ -163,7 +163,8 @@ bool GrVkBuffer::vkIsMapped() const {
return SkToBool(fMapPtr);
}
-bool GrVkBuffer::vkUpdateData(const GrVkGpu* gpu, const void* src, size_t srcSizeInBytes) {
+bool GrVkBuffer::vkUpdateData(const GrVkGpu* gpu, const void* src, size_t srcSizeInBytes,
+ bool* createdNewBuffer) {
SkASSERT(!this->vkIsMapped());
VALIDATE();
if (srcSizeInBytes > fDesc.fSizeInBytes) {
@@ -174,6 +175,9 @@ bool GrVkBuffer::vkUpdateData(const GrVkGpu* gpu, const void* src, size_t srcSiz
// in use by the command buffer, so we need to create a new one
fResource->unref(gpu);
fResource = Create(gpu, fDesc);
+ if (createdNewBuffer) {
+ *createdNewBuffer = true;
+ }
}
void* mapPtr;
« 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