Vulkan:Refactor SecondaryCommandBuffers
A bunch of changes to rework and improve SecondaryCommandBuffers.
Inlined all of the command functions and moved them into the header.
Created new specialized commands for updating Compute/Graphics
DescriptorSets and setting a memoryBarrier.
Updated all of the pointer storage to be inferred rather than
explicitly stored in order to save space. Also removed various params
that are fixed in ANGLE to save space.
Bug: angleproject:3136
Change-Id: I994bb70d5e4db6d9e71d38ac62451aaec780a5e1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1535704
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tobin Ehlis <tobine@google.com>
diff --git a/src/libANGLE/renderer/vulkan/ProgramVk.cpp b/src/libANGLE/renderer/vulkan/ProgramVk.cpp
index 206bc20..f9b6e9b 100644
--- a/src/libANGLE/renderer/vulkan/ProgramVk.cpp
+++ b/src/libANGLE/renderer/vulkan/ProgramVk.cpp
@@ -927,16 +927,15 @@
{
constexpr uint32_t kShaderTypeMin = static_cast<uint32_t>(gl::kGLES2ShaderTypeMin);
constexpr uint32_t kShaderTypeMax = static_cast<uint32_t>(gl::kGLES2ShaderTypeMax);
- commandBuffer->bindDescriptorSets(
- VK_PIPELINE_BIND_POINT_GRAPHICS, mPipelineLayout.get(), low,
- mUsedDescriptorSetRange.length(), &mDescriptorSets[low],
+ commandBuffer->bindGraphicsDescriptorSets(
+ mPipelineLayout.get(), low, mUsedDescriptorSetRange.length(), &mDescriptorSets[low],
kShaderTypeMax - kShaderTypeMin + 1, mUniformBlocksOffsets.data() + kShaderTypeMin);
}
else
{
- commandBuffer->bindDescriptorSets(VK_PIPELINE_BIND_POINT_GRAPHICS, mPipelineLayout.get(),
- low, mUsedDescriptorSetRange.length(),
- &mDescriptorSets[low], 0, nullptr);
+ commandBuffer->bindGraphicsDescriptorSets(mPipelineLayout.get(), low,
+ mUsedDescriptorSetRange.length(),
+ &mDescriptorSets[low], 0, nullptr);
}
return angle::Result::Continue;