anv: Reemit STATE_BASE_ADDRESS after second level cmd buffers
authorKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Tue, 26 Jan 2016 22:41:06 +0000 (14:41 -0800)
committerKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Tue, 26 Jan 2016 22:44:02 +0000 (14:44 -0800)
Otherwise the primary batch will continue using the state base addresses
set by the secondary.  Fixes remaining renderpass tests.

src/vulkan/anv_batch_chain.c

index ee6e39d3a75df9f728e0dad53a98b9114b703bfe..e9bd67c9442ef6fc4079f82924bd700d9a5d4511 100644 (file)
@@ -721,6 +721,7 @@ anv_cmd_buffer_add_secondary(struct anv_cmd_buffer *primary,
    switch (secondary->exec_mode) {
    case ANV_CMD_BUFFER_EXEC_MODE_EMIT:
       anv_batch_emit_batch(&primary->batch, &secondary->batch);
+      anv_cmd_buffer_emit_state_base_address(primary);
       break;
    case ANV_CMD_BUFFER_EXEC_MODE_CHAIN: {
       struct anv_batch_bo *first_bbo =
@@ -761,6 +762,7 @@ anv_cmd_buffer_add_secondary(struct anv_cmd_buffer *primary,
          }
       }
 
+      anv_cmd_buffer_emit_state_base_address(primary);
       break;
    }
    case ANV_CMD_BUFFER_EXEC_MODE_COPY_AND_CHAIN: {