From: Chris Forbes Date: Sat, 2 Mar 2019 01:40:25 +0000 (-0800) Subject: Allow all vkBeginCommandBuffer flags X-Git-Tag: android-x86-9.0-r1~265 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=823ca85404fb67037c0ecc68481fb59aa232196c;p=android-x86%2Fexternal-swiftshader.git Allow all vkBeginCommandBuffer flags Our command buffer playback mechanism is safe for multiple inflight submissions of the same command buffer, so there is nothing special to do here. The problematic case of needing to carry some state from a primary command buffer into a secondary is already caught by the slightly later check for pInheritanceInfo. Bug: b/118619338 Change-Id: I782285fbc9127d59eeac7cbf79fea3f1952e3cde Reviewed-on: https://swiftshader-review.googlesource.com/c/25950 Tested-by: Chris Forbes Reviewed-by: Hernan Liatis Reviewed-by: Nicolas Capens Kokoro-Presubmit: kokoro --- diff --git a/src/Vulkan/VkCommandBuffer.cpp b/src/Vulkan/VkCommandBuffer.cpp index 7b5fe9fc1..e116de467 100644 --- a/src/Vulkan/VkCommandBuffer.cpp +++ b/src/Vulkan/VkCommandBuffer.cpp @@ -553,7 +553,12 @@ VkResult CommandBuffer::begin(VkCommandBufferUsageFlags flags, const VkCommandBu { ASSERT((state != RECORDING) && (state != PENDING)); - if(!((flags == 0) || (flags == VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT)) || pInheritanceInfo) + // Nothing interesting to do based on flags. We don't have any optimizations + // to apply for ONE_TIME_SUBMIT or (lack of) SIMULTANEOUS_USE. RENDER_PASS_CONTINUE + // must also provide a non-null pInheritanceInfo, which we don't implement yet, but is caught below. + (void) flags; + + if(pInheritanceInfo) { UNIMPLEMENTED(); }