From 43126388cd64a72f2566bbd8eda8fabc1c411447 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 13 May 2015 17:34:37 -0700 Subject: [PATCH] vk/meta: Save/restore more stuff in cmd_buffer_restore --- src/vulkan/meta.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/vulkan/meta.c b/src/vulkan/meta.c index c346c3ef871..a10c21e84c5 100644 --- a/src/vulkan/meta.c +++ b/src/vulkan/meta.c @@ -161,24 +161,30 @@ struct anv_saved_state { struct anv_buffer *buffer; VkDeviceSize offset; } vb[2]; + struct anv_descriptor_set *dsets[1]; struct anv_pipeline *pipeline; }; static void -anv_cmd_buffer_save(struct anv_cmd_buffer *cmd_buffer, struct anv_saved_state *state) +anv_cmd_buffer_save(struct anv_cmd_buffer *cmd_buffer, + struct anv_saved_state *state) { memcpy(state->vb, cmd_buffer->vb, sizeof(state->vb)); + memcpy(state->dsets, cmd_buffer->descriptor_sets, sizeof(state->dsets)); state->pipeline = cmd_buffer->pipeline; } static void -anv_cmd_buffer_restore(struct anv_cmd_buffer *cmd_buffer, struct anv_saved_state *state) +anv_cmd_buffer_restore(struct anv_cmd_buffer *cmd_buffer, + const struct anv_saved_state *state) { memcpy(cmd_buffer->vb, state->vb, sizeof(state->vb)); + memcpy(cmd_buffer->descriptor_sets, state->dsets, sizeof(state->dsets)); cmd_buffer->pipeline = state->pipeline; cmd_buffer->vb_dirty |= (1 << ARRAY_SIZE(state->vb)) - 1; - cmd_buffer->dirty |= ANV_CMD_BUFFER_PIPELINE_DIRTY; + cmd_buffer->dirty |= ANV_CMD_BUFFER_PIPELINE_DIRTY | + ANV_CMD_BUFFER_DESCRIPTOR_SET_DIRTY; } void -- 2.30.2