[Mesa-dev] [PATCH 15/16] anv/cmd_buffer: skip vkCmdExecuteCommands() on broken command buffers

Iago Toral itoral at igalia.com
Wed Mar 8 08:57:10 UTC 2017


On Tue, 2017-03-07 at 13:24 -0800, Jason Ekstrand wrote:
> On Mon, Mar 6, 2017 at 11:16 PM, Iago Toral Quiroga <itoral at igalia.co
> m> wrote:
> > ---
> >  src/intel/vulkan/genX_cmd_buffer.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/src/intel/vulkan/genX_cmd_buffer.c
> > b/src/intel/vulkan/genX_cmd_buffer.c
> > index 2c9aec8..8b752c4 100644
> > --- a/src/intel/vulkan/genX_cmd_buffer.c
> > +++ b/src/intel/vulkan/genX_cmd_buffer.c
> > @@ -640,6 +640,9 @@ genX(CmdExecuteCommands)(
> > 
> >     assert(primary->level == VK_COMMAND_BUFFER_LEVEL_PRIMARY);
> > 
> > +   if (primary->error_status != VK_SUCCESS)
> > +      return;
> > +
> >     /* The secondary command buffers will assume that the PMA fix
> > is disabled
> >      * when they begin executing.  Make sure this is true.
> >      */
> > @@ -648,6 +651,9 @@ genX(CmdExecuteCommands)(
> >     for (uint32_t i = 0; i < commandBufferCount; i++) {
> >        ANV_FROM_HANDLE(anv_cmd_buffer, secondary, pCmdBuffers[i]);
> > 
> > +      if (secondary->error_status != VK_SUCCESS)
> > +         return;
> I think this can just be an assert.  They needed to call
> EndCommandBuffer on the secondary and would have gotten the error
> there.
> 
> Maybe we should also add an assert to QueueSubmit?

Yes, both things make sense to me, thanks!
 
> > +
> >        assert(secondary->level ==
> > VK_COMMAND_BUFFER_LEVEL_SECONDARY);
> > 
> >        if (secondary->usage_flags &
> > --
> > 2.7.4
> > 
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> > 


More information about the mesa-dev mailing list