Vulkan: Reorganize helper classes.
This renames ResourceVk to vk::CommandGraphResource, which should help
clarify its usage. This also moves LineLoopHandler, ImageHelper, and
the DynamicBuffer and DynamicCommandPool classes into a new vk_helpers
module. This file contains helper classes that manage other resources.
Also this makes DynamicBuffer and DynamicDescriptorPool no longer
inherit from CommandGraphResource. In the future, only Impl objects
will be allowed to be graph resources.
Bug: angleproject:2318
Change-Id: I0fa23da2ac853d90f3c822547a4a314f247cc757
Reviewed-on: https://chromium-review.googlesource.com/985200
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/ProgramVk.cpp b/src/libANGLE/renderer/vulkan/ProgramVk.cpp
index a3a7c36..c9d9a01 100644
--- a/src/libANGLE/renderer/vulkan/ProgramVk.cpp
+++ b/src/libANGLE/renderer/vulkan/ProgramVk.cpp
@@ -13,7 +13,6 @@
#include "common/utilities.h"
#include "libANGLE/Context.h"
#include "libANGLE/renderer/vulkan/ContextVk.h"
-#include "libANGLE/renderer/vulkan/DynamicDescriptorPool.h"
#include "libANGLE/renderer/vulkan/GlslangWrapper.h"
#include "libANGLE/renderer/vulkan/RendererVk.h"
#include "libANGLE/renderer/vulkan/TextureVk.h"
@@ -114,7 +113,7 @@
}
vk::Error SyncDefaultUniformBlock(RendererVk *renderer,
- DynamicBuffer *dynamicBuffer,
+ vk::DynamicBuffer *dynamicBuffer,
const angle::MemoryBuffer &bufferData,
uint32_t *outOffset,
bool *outBufferModified)
@@ -702,7 +701,7 @@
RendererVk *renderer = contextVk->getRenderer();
// Write out to a new a descriptor set.
- DynamicDescriptorPool *dynamicDescriptorPool = contextVk->getDynamicDescriptorPool();
+ vk::DynamicDescriptorPool *dynamicDescriptorPool = contextVk->getDynamicDescriptorPool();
const auto &descriptorSetLayouts = renderer->getGraphicsDescriptorSetLayouts();
uint32_t potentialNewCount = descriptorSetIndex + 1;
@@ -770,7 +769,7 @@
{
// We need to reinitialize the descriptor sets if we newly allocated buffers since we can't
// modify the descriptor sets once initialized.
- ANGLE_TRY(allocateDescriptorSet(contextVk, UniformBufferIndex));
+ ANGLE_TRY(allocateDescriptorSet(contextVk, vk::UniformBufferIndex));
ANGLE_TRY(updateDefaultUniformsDescriptorSet(contextVk));
}
@@ -856,7 +855,7 @@
return vk::NoError();
}
- ANGLE_TRY(allocateDescriptorSet(contextVk, TextureIndex));
+ ANGLE_TRY(allocateDescriptorSet(contextVk, vk::TextureIndex));
ASSERT(mUsedDescriptorSetRange.contains(1));
VkDescriptorSet descriptorSet = mDescriptorSets[1];
@@ -925,7 +924,7 @@
{
for (DefaultUniformBlock &block : mDefaultUniformBlocks)
{
- block.storage.setMinimumSize(minSize);
+ block.storage.setMinimumSizeForTesting(minSize);
}
}
} // namespace rx