From: Jason Ekstrand Date: Thu, 14 May 2015 00:34:37 +0000 (-0700) Subject: vk/meta: Save/restore more stuff in cmd_buffer_restore X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=43126388cd64a72f2566bbd8eda8fabc1c411447;p=mesa.git vk/meta: Save/restore more stuff in cmd_buffer_restore --- 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