Commit 4119f033 by Tobin Ehlis Committed by Commit Bot

Vulkan:Set one-time bit on all command buffers

All Vulkan command buffers are only submitted once so we can set the VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT which may help performance. Bug: angleproject:4304 Change-Id: Ibd116dcac4e78a2c058eb3da54489057d6fa8f44 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2107800Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCharlie Lao <cclao@google.com> Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Tobin Ehlis <tobine@google.com>
parent 4df67871
......@@ -845,7 +845,7 @@ angle::Result ContextVk::startPrimaryCommandBuffer()
VkCommandBufferBeginInfo beginInfo = {};
beginInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
beginInfo.flags = 0;
beginInfo.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
beginInfo.pInheritanceInfo = nullptr;
ANGLE_VK_TRY(this, mPrimaryCommands.begin(beginInfo));
......@@ -1610,7 +1610,7 @@ angle::Result ContextVk::synchronizeCpuGpuTime()
VkCommandBufferBeginInfo beginInfo = {};
beginInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
beginInfo.flags = 0;
beginInfo.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
beginInfo.pInheritanceInfo = nullptr;
ANGLE_VK_TRY(this, commandBuffer.begin(beginInfo));
......@@ -3842,7 +3842,7 @@ angle::Result ContextVk::getTimestamp(uint64_t *timestampOut)
VkCommandBufferBeginInfo beginInfo = {};
beginInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
beginInfo.flags = 0;
beginInfo.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
beginInfo.pInheritanceInfo = nullptr;
ANGLE_VK_TRY(this, commandBuffer.begin(beginInfo));
......
......@@ -2123,7 +2123,7 @@ angle::Result RendererVk::getCommandBufferOneOff(vk::Context *context,
VkCommandBufferBeginInfo beginInfo = {};
beginInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
beginInfo.flags = 0;
beginInfo.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
beginInfo.pInheritanceInfo = nullptr;
ANGLE_VK_TRY(context, commandBufferOut->begin(beginInfo));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment