Vulkan:Integrate SecondaryCommandBuffers
Integrate the custom SecondaryCommandBuffer type into the CommandGraph
nodes by adding new ANGLE_USE_CUSTOM_VULKAN_CMD_BUFFERS define that can
be set in the BUILD gn args with angle_enable_custom_vulkan_cmd_buffers
set to "true."
Initially the custom cmd buffers are disabled by default.
This adds some support functions to SecondaryCommandBuffer to make the
integration easier by matching the wrapped cmd buffer interface:
initialize(), end(), valid().
Bug: angleproject:3136
Change-Id: Ib910554583192550757bb8ce89914e3ea8737988
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1526556
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/RenderbufferVk.cpp b/src/libANGLE/renderer/vulkan/RenderbufferVk.cpp
index 1e485a9..a77d986 100644
--- a/src/libANGLE/renderer/vulkan/RenderbufferVk.cpp
+++ b/src/libANGLE/renderer/vulkan/RenderbufferVk.cpp
@@ -93,7 +93,7 @@
&mImageView, 0, 1));
// TODO(jmadill): Fold this into the RenderPass load/store ops. http://anglebug.com/2361
- vk::CommandBuffer *commandBuffer = nullptr;
+ CommandBufferT *commandBuffer = nullptr;
ANGLE_TRY(mImage->recordCommands(contextVk, &commandBuffer));
if (isDepthOrStencilFormat)
@@ -143,7 +143,7 @@
uint32_t rendererQueueFamilyIndex = contextVk->getRenderer()->getQueueFamilyIndex();
if (mImage->isQueueChangeNeccesary(rendererQueueFamilyIndex))
{
- vk::CommandBuffer *commandBuffer = nullptr;
+ CommandBufferT *commandBuffer = nullptr;
ANGLE_TRY(mImage->recordCommands(contextVk, &commandBuffer));
mImage->changeLayoutAndQueue(aspect, vk::ImageLayout::ColorAttachment,
rendererQueueFamilyIndex, commandBuffer);