vk: Emit surface state base address before renderpass
authorKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Thu, 21 Jan 2016 21:52:41 +0000 (13:52 -0800)
committerKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Thu, 21 Jan 2016 22:18:52 +0000 (14:18 -0800)
If we're continuing a render pass, make sure we don't emit the depth and
stencil buffer addresses before we set the state base addresses.

Fixes crucible func.cmd-buffer.small-secondaries

src/vulkan/anv_cmd_buffer.c

index 070b8490e321896d75d37dc34642a7f8f087d942..4591dd95fec3626954dfebe227c2b8737b00828f 100644 (file)
@@ -376,6 +376,8 @@ VkResult anv_BeginCommandBuffer(
    assert(cmd_buffer->level == VK_COMMAND_BUFFER_LEVEL_SECONDARY ||
           !(cmd_buffer->usage_flags & VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT));
 
+   anv_cmd_buffer_emit_state_base_address(cmd_buffer);
+
    if (cmd_buffer->usage_flags &
        VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT) {
       cmd_buffer->state.framebuffer =
@@ -389,8 +391,6 @@ VkResult anv_BeginCommandBuffer(
       anv_cmd_buffer_set_subpass(cmd_buffer, subpass);
    }
 
-   anv_cmd_buffer_emit_state_base_address(cmd_buffer);
-
    return VK_SUCCESS;
 }