diff options
author | Iago Toral Quiroga <[email protected]> | 2017-03-06 12:16:05 +0100 |
---|---|---|
committer | Iago Toral Quiroga <[email protected]> | 2017-03-16 11:40:05 +0100 |
commit | a752c4ecdaa2084a4335993947512cd0eaa79046 (patch) | |
tree | 21ebfa27d3d5b9554afe729aaaffea34009909fa /src/intel | |
parent | 801493051e8593971ebdea52c78e21e694aa246b (diff) |
anv/cmd_buffer: skip vkCmdExecuteCommands() on broken command buffers
v2: Assert on secondary commands, applications should've called
vkEndCommandBuffer() and received an error for them before (Jason)
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/vulkan/genX_cmd_buffer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 89aeff2c9d6..4d14fcd2f73 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -646,6 +646,9 @@ genX(CmdExecuteCommands)( assert(primary->level == VK_COMMAND_BUFFER_LEVEL_PRIMARY); + if (anv_batch_has_error(&primary->batch)) + return; + /* The secondary command buffers will assume that the PMA fix is disabled * when they begin executing. Make sure this is true. */ @@ -655,6 +658,7 @@ genX(CmdExecuteCommands)( ANV_FROM_HANDLE(anv_cmd_buffer, secondary, pCmdBuffers[i]); assert(secondary->level == VK_COMMAND_BUFFER_LEVEL_SECONDARY); + assert(!anv_batch_has_error(&secondary->batch)); if (secondary->usage_flags & VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT) { |