anv/meta: Use consistent naming for dynamic state mask
authorChad Versace <chad.versace@intel.com>
Wed, 4 Nov 2015 21:48:31 +0000 (13:48 -0800)
committerChad Versace <chad.versace@intel.com>
Wed, 4 Nov 2015 23:15:19 +0000 (15:15 -0800)
Consistently rename bitmasks of Vulkan dynamic state to 'dynamic_mask'.

  anv_meta_saved_state::dynamic_flags -> dynamic_mask
  anv_meta_save(dynamic_state)        -> dynamic_mask

src/vulkan/anv_meta.c
src/vulkan/anv_meta.h

index 976d028127e7ab0eb759591c210667fa3e2a3c98..ba03dff9d3a848cce837b857b75d6199f2fb34c8 100644 (file)
@@ -122,15 +122,16 @@ build_nir_copy_fragment_shader(enum glsl_sampler_dim tex_dim)
 void
 anv_meta_save(struct anv_meta_saved_state *state,
               const struct anv_cmd_buffer *cmd_buffer,
-              uint32_t dynamic_state)
+              uint32_t dynamic_mask)
 {
    state->old_pipeline = cmd_buffer->state.pipeline;
    state->old_descriptor_set0 = cmd_buffer->state.descriptors[0];
    memcpy(state->old_vertex_bindings, cmd_buffer->state.vertex_bindings,
           sizeof(state->old_vertex_bindings));
-   state->dynamic_flags = dynamic_state;
+
+   state->dynamic_mask = dynamic_mask;
    anv_dynamic_state_copy(&state->dynamic, &cmd_buffer->state.dynamic,
-                          dynamic_state);
+                          dynamic_mask);
 }
 
 void
@@ -147,8 +148,8 @@ anv_meta_restore(const struct anv_meta_saved_state *state,
    cmd_buffer->state.descriptors_dirty |= VK_SHADER_STAGE_VERTEX_BIT;
 
    anv_dynamic_state_copy(&cmd_buffer->state.dynamic, &state->dynamic,
-                          state->dynamic_flags);
-   cmd_buffer->state.dirty |= state->dynamic_flags;
+                          state->dynamic_mask);
+   cmd_buffer->state.dirty |= state->dynamic_mask;
 }
 
 static VkImageViewType
index 2f26d94451627a46413eb247afe1f4fe3ed38ef1..d798c6e909f7575c8a003945f363177adacf7783 100644 (file)
@@ -35,14 +35,19 @@ struct anv_meta_saved_state {
    struct anv_vertex_binding old_vertex_bindings[ANV_META_VERTEX_BINDING_COUNT];
    struct anv_descriptor_set *old_descriptor_set0;
    struct anv_pipeline *old_pipeline;
-   uint32_t dynamic_flags;
+
+   /**
+    * Bitmask of (1 << VK_DYNAMIC_STATE_*). Defines the set of saved dynamic
+    * state.
+    */
+   uint32_t dynamic_mask;
    struct anv_dynamic_state dynamic;
 };
 
 void
 anv_meta_save(struct anv_meta_saved_state *state,
               const struct anv_cmd_buffer *cmd_buffer,
-              uint32_t dynamic_state);
+              uint32_t dynamic_mask);
 
 void
 anv_meta_restore(const struct anv_meta_saved_state *state,