diff options
author | Chad Versace <[email protected]> | 2015-08-19 12:07:20 -0700 |
---|---|---|
committer | Chad Versace <[email protected]> | 2015-08-20 09:30:34 -0700 |
commit | 4aef5c62cd1b39ffb9ca26dffb18dc39444daf3a (patch) | |
tree | 08ba7880cab9551283f0b897a173538a856aa419 /src | |
parent | 9f908fcbdecce9221c0ffbcccf8481f889172c51 (diff) |
vk/meta: Restore all saved state in anv_cmd_buffer_restore()
anv_cmd_buffer_restore() did not restore the old
VkDynamicColorBlendState.
Diffstat (limited to 'src')
-rw-r--r-- | src/vulkan/anv_meta.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/vulkan/anv_meta.c b/src/vulkan/anv_meta.c index ff82fbe5b38..c3538f0e455 100644 --- a/src/vulkan/anv_meta.c +++ b/src/vulkan/anv_meta.c @@ -161,6 +161,7 @@ anv_cmd_buffer_save(struct anv_cmd_buffer *cmd_buffer, state->old_descriptor_set0 = cmd_buffer->state.descriptors[0].set; memcpy(state->old_vertex_bindings, cmd_buffer->state.vertex_bindings, sizeof(state->old_vertex_bindings)); + state->old_cb_state = cmd_buffer->state.cb_state; } static void @@ -175,6 +176,11 @@ anv_cmd_buffer_restore(struct anv_cmd_buffer *cmd_buffer, cmd_buffer->state.vb_dirty |= (1 << NUM_VB_USED) - 1; cmd_buffer->state.dirty |= ANV_CMD_BUFFER_PIPELINE_DIRTY; cmd_buffer->state.descriptors_dirty |= VK_SHADER_STAGE_VERTEX_BIT; + + if (cmd_buffer->state.cb_state != state->old_cb_state) { + cmd_buffer->state.cb_state = state->old_cb_state; + cmd_buffer->state.dirty |= ANV_CMD_BUFFER_CB_DIRTY; + } } struct vue_header { @@ -504,7 +510,6 @@ meta_prepare_blit(struct anv_cmd_buffer *cmd_buffer, anv_CmdBindDynamicDepthStencilState(anv_cmd_buffer_to_handle(cmd_buffer), device->meta_state.shared.ds_state); - saved_state->old_cb_state = cmd_buffer->state.cb_state; anv_CmdBindDynamicColorBlendState(anv_cmd_buffer_to_handle(cmd_buffer), device->meta_state.shared.cb_state); } @@ -705,9 +710,6 @@ meta_finish_blit(struct anv_cmd_buffer *cmd_buffer, const struct anv_saved_state *saved_state) { anv_cmd_buffer_restore(cmd_buffer, saved_state); - anv_CmdBindDynamicColorBlendState( - anv_cmd_buffer_to_handle(cmd_buffer), - anv_dynamic_cb_state_to_handle(saved_state->old_cb_state)); } static VkFormat |