vk/meta: Use consistent names and types in anv_saved_state
authorChad Versace <chad.versace@intel.com>
Wed, 19 Aug 2015 18:58:50 +0000 (11:58 -0700)
committerChad Versace <chad.versace@intel.com>
Thu, 20 Aug 2015 16:29:41 +0000 (09:29 -0700)
In struct anv_saved_state, each member's type was a pointer to an Anvil
struct and each member's name was prefixed with "old" except cb_state,
which was a Vulkan handle whose name lacked "old".

src/vulkan/anv_meta.c

index a433d132562f6381f6c5a061c9e556c99c2a6f71..ff82fbe5b3853cd233d718ff2465605a7054d883 100644 (file)
@@ -150,7 +150,7 @@ struct anv_saved_state {
    struct anv_vertex_binding old_vertex_bindings[NUM_VB_USED];
    struct anv_descriptor_set *old_descriptor_set0;
    struct anv_pipeline *old_pipeline;
-   VkDynamicColorBlendState cb_state;
+   struct anv_dynamic_cb_state *old_cb_state;
 };
 
 static void
@@ -504,7 +504,7 @@ 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->cb_state = anv_dynamic_cb_state_to_handle(cmd_buffer->state.cb_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,8 +705,9 @@ 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),
-                                     saved_state->cb_state);
+   anv_CmdBindDynamicColorBlendState(
+         anv_cmd_buffer_to_handle(cmd_buffer),
+         anv_dynamic_cb_state_to_handle(saved_state->old_cb_state));
 }
 
 static VkFormat