diff options
author | Chad Versace <[email protected]> | 2015-11-03 14:31:19 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2015-11-04 15:15:19 -0800 |
commit | 2bdb9e2ed9eab016220f1e365dd135f023f1920f (patch) | |
tree | 8b6b8abc2e94e3c55ab9497591daeceecc430736 /src/vulkan | |
parent | 16b2a489dbd4db56fc9231f399a81685330e7e7c (diff) |
anv/meta: Rename anv_cmd_buffer_save/restore
As the functions are now exposed in anv_meta.h, let's rename them
to clarify that they are meta functions.
anv_cmd_buffer_save -> anv_meta_save
anv_cmd_buffer_restore -> anv_meta_restore
Diffstat (limited to 'src/vulkan')
-rw-r--r-- | src/vulkan/anv_meta.c | 16 | ||||
-rw-r--r-- | src/vulkan/anv_meta.h | 10 | ||||
-rw-r--r-- | src/vulkan/anv_meta_clear.c | 14 |
3 files changed, 19 insertions, 21 deletions
diff --git a/src/vulkan/anv_meta.c b/src/vulkan/anv_meta.c index 880af14208d..976d028127e 100644 --- a/src/vulkan/anv_meta.c +++ b/src/vulkan/anv_meta.c @@ -120,9 +120,9 @@ build_nir_copy_fragment_shader(enum glsl_sampler_dim tex_dim) } void -anv_cmd_buffer_save(struct anv_cmd_buffer *cmd_buffer, - struct anv_meta_saved_state *state, - uint32_t dynamic_state) +anv_meta_save(struct anv_meta_saved_state *state, + const struct anv_cmd_buffer *cmd_buffer, + uint32_t dynamic_state) { state->old_pipeline = cmd_buffer->state.pipeline; state->old_descriptor_set0 = cmd_buffer->state.descriptors[0]; @@ -134,8 +134,8 @@ anv_cmd_buffer_save(struct anv_cmd_buffer *cmd_buffer, } void -anv_cmd_buffer_restore(struct anv_cmd_buffer *cmd_buffer, - const struct anv_meta_saved_state *state) +anv_meta_restore(const struct anv_meta_saved_state *state, + struct anv_cmd_buffer *cmd_buffer) { cmd_buffer->state.pipeline = state->old_pipeline; cmd_buffer->state.descriptors[0] = state->old_descriptor_set0; @@ -434,8 +434,8 @@ static void meta_prepare_blit(struct anv_cmd_buffer *cmd_buffer, struct anv_meta_saved_state *saved_state) { - anv_cmd_buffer_save(cmd_buffer, saved_state, - (1 << VK_DYNAMIC_STATE_VIEWPORT)); + anv_meta_save(saved_state, cmd_buffer, + (1 << VK_DYNAMIC_STATE_VIEWPORT)); } struct blit_region { @@ -625,7 +625,7 @@ static void meta_finish_blit(struct anv_cmd_buffer *cmd_buffer, const struct anv_meta_saved_state *saved_state) { - anv_cmd_buffer_restore(cmd_buffer, saved_state); + anv_meta_restore(saved_state, cmd_buffer); } static VkFormat diff --git a/src/vulkan/anv_meta.h b/src/vulkan/anv_meta.h index ac28d897f0b..2f26d944516 100644 --- a/src/vulkan/anv_meta.h +++ b/src/vulkan/anv_meta.h @@ -40,13 +40,13 @@ struct anv_meta_saved_state { }; void -anv_cmd_buffer_save(struct anv_cmd_buffer *cmd_buffer, - struct anv_meta_saved_state *state, - uint32_t dynamic_state); +anv_meta_save(struct anv_meta_saved_state *state, + const struct anv_cmd_buffer *cmd_buffer, + uint32_t dynamic_state); void -anv_cmd_buffer_restore(struct anv_cmd_buffer *cmd_buffer, - const struct anv_meta_saved_state *state); +anv_meta_restore(const struct anv_meta_saved_state *state, + struct anv_cmd_buffer *cmd_buffer); #ifdef __cplusplus } diff --git a/src/vulkan/anv_meta_clear.c b/src/vulkan/anv_meta_clear.c index 3a6a369bfc1..8f217105b4f 100644 --- a/src/vulkan/anv_meta_clear.c +++ b/src/vulkan/anv_meta_clear.c @@ -140,8 +140,8 @@ anv_cmd_buffer_clear_attachments(struct anv_cmd_buffer *cmd_buffer, } } - anv_cmd_buffer_save(cmd_buffer, &saved_state, - (1 << VK_DYNAMIC_STATE_VIEWPORT)); + anv_meta_save(&saved_state, cmd_buffer, + (1 << VK_DYNAMIC_STATE_VIEWPORT)); cmd_buffer->state.dynamic.viewport.count = 0; struct anv_subpass subpass = { @@ -156,8 +156,7 @@ anv_cmd_buffer_clear_attachments(struct anv_cmd_buffer *cmd_buffer, meta_emit_clear(cmd_buffer, pass->num_color_clear_attachments, instance_data, ds_clear_value); - /* Restore API state */ - anv_cmd_buffer_restore(cmd_buffer, &saved_state); + anv_meta_restore(&saved_state, cmd_buffer); } static nir_shader * @@ -401,8 +400,8 @@ void anv_CmdClearColorImage( ANV_FROM_HANDLE(anv_image, image, _image); struct anv_meta_saved_state saved_state; - anv_cmd_buffer_save(cmd_buffer, &saved_state, - (1 << VK_DYNAMIC_STATE_VIEWPORT)); + anv_meta_save(&saved_state, cmd_buffer, + (1 << VK_DYNAMIC_STATE_VIEWPORT)); cmd_buffer->state.dynamic.viewport.count = 0; for (uint32_t r = 0; r < rangeCount; r++) { @@ -514,8 +513,7 @@ void anv_CmdClearColorImage( } } - /* Restore API state */ - anv_cmd_buffer_restore(cmd_buffer, &saved_state); + anv_meta_restore(&saved_state, cmd_buffer); } void anv_CmdClearDepthStencilImage( |