mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
anv: Ignore continue flag in primary cmd buffers
According to the Vulkan specification, the VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT flag will be ignored if included in a VkCommandBufferBeginInfo for a primary command buffer. This also implies pBeginInfo->pInheritanceInfo should not be read even if the flag is present, and makes it legal to include the flag knowing it will be ignored. Signed-off-by: Ricardo Garcia <rgarcia@igalia.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7128>
This commit is contained in:
parent
b3529e56b5
commit
9d4999e7cf
1 changed files with 11 additions and 2 deletions
|
|
@ -1536,8 +1536,17 @@ genX(BeginCommandBuffer)(
|
|||
|
||||
cmd_buffer->usage_flags = pBeginInfo->flags;
|
||||
|
||||
assert(cmd_buffer->level == VK_COMMAND_BUFFER_LEVEL_SECONDARY ||
|
||||
!(cmd_buffer->usage_flags & VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT));
|
||||
/* VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT must be ignored for
|
||||
* primary level command buffers.
|
||||
*
|
||||
* From the Vulkan 1.0 spec:
|
||||
*
|
||||
* VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT specifies that a
|
||||
* secondary command buffer is considered to be entirely inside a render
|
||||
* pass. If this is a primary command buffer, then this bit is ignored.
|
||||
*/
|
||||
if (cmd_buffer->level == VK_COMMAND_BUFFER_LEVEL_PRIMARY)
|
||||
cmd_buffer->usage_flags &= ~VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT;
|
||||
|
||||
genX(cmd_buffer_emit_state_base_address)(cmd_buffer);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue