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

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

Issue 1914053004: Remove unnessary uniform barriers in Vulkan. (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/GrVkGpu.cpp ('k') | src/gpu/vk/GrVkPipelineStateDataManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkPipelineState.cpp
diff --git a/src/gpu/vk/GrVkPipelineState.cpp b/src/gpu/vk/GrVkPipelineState.cpp
index 0194e290ad351aeb980114885be973768836700e..218470cb9b0021522dbb91bc1da585ff05a8fd6d 100644
--- a/src/gpu/vk/GrVkPipelineState.cpp
+++ b/src/gpu/vk/GrVkPipelineState.cpp
@@ -236,13 +236,6 @@ void GrVkPipelineState::writeUniformBuffers(const GrVkGpu* gpu) {
descriptorWrites[0].pImageInfo = nullptr;
descriptorWrites[0].pBufferInfo = &vertBufferInfo;
descriptorWrites[0].pTexelBufferView = nullptr;
-
- fVertexUniformBuffer->addMemoryBarrier(gpu,
- VK_ACCESS_HOST_WRITE_BIT,
- VK_ACCESS_UNIFORM_READ_BIT,
- VK_PIPELINE_STAGE_HOST_BIT,
- VK_PIPELINE_STAGE_VERTEX_SHADER_BIT,
- false);
}
VkDescriptorBufferInfo fragBufferInfo;
@@ -267,13 +260,6 @@ void GrVkPipelineState::writeUniformBuffers(const GrVkGpu* gpu) {
descriptorWrites[1].pImageInfo = nullptr;
descriptorWrites[1].pBufferInfo = &fragBufferInfo;
descriptorWrites[1].pTexelBufferView = nullptr;
-
- fFragmentUniformBuffer->addMemoryBarrier(gpu,
- VK_ACCESS_HOST_WRITE_BIT,
- VK_ACCESS_UNIFORM_READ_BIT,
- VK_PIPELINE_STAGE_HOST_BIT,
- VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT,
- false);
}
if (uniformBindingUpdateCount) {
@@ -426,11 +412,11 @@ void GrVkPipelineState::DescriptorPoolManager::getNewDescriptorSet(GrVkGpu* gpu,
if (!fMaxDescriptors) {
return;
}
- if (fCurrentDescriptorCount == fMaxDescriptors) {
+ fCurrentDescriptorCount += fDescCountPerSet;
+ if (fCurrentDescriptorCount > fMaxDescriptors) {
this->getNewPool(gpu);
- fCurrentDescriptorCount = 0;
+ fCurrentDescriptorCount = fDescCountPerSet;
}
- fCurrentDescriptorCount += fDescCountPerSet;
VkDescriptorSetAllocateInfo dsAllocateInfo;
memset(&dsAllocateInfo, 0, sizeof(VkDescriptorSetAllocateInfo));
« no previous file with comments | « src/gpu/vk/GrVkGpu.cpp ('k') | src/gpu/vk/GrVkPipelineStateDataManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698