anv: add an assertion in genX(BeginCommandBuffer)
authorGwan-gyeong Mun <elongbug@gmail.com>
Tue, 26 Sep 2017 08:14:17 +0000 (01:14 -0700)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 28 Sep 2017 12:20:14 +0000 (13:20 +0100)
To check a valid usage requirement.

Signed-off-by: Mun Gwan-gyeong <elongbug@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/genX_cmd_buffer.c

index fbc19957096272cd5256c1e779934837e0c74c6e..3559399019840d6b36194cb3b3c18bf0ce1482ea 100644 (file)
@@ -1006,6 +1006,7 @@ genX(BeginCommandBuffer)(
    VkResult result = VK_SUCCESS;
    if (cmd_buffer->usage_flags &
        VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT) {
+      assert(pBeginInfo->pInheritanceInfo);
       cmd_buffer->state.pass =
          anv_render_pass_from_handle(pBeginInfo->pInheritanceInfo->renderPass);
       cmd_buffer->state.subpass =