}
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];
}
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;
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 {
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
};
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
}
}
}
- 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 = {
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 *
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++) {
}
}
- /* Restore API state */
- anv_cmd_buffer_restore(cmd_buffer, &saved_state);
+ anv_meta_restore(&saved_state, cmd_buffer);
}
void anv_CmdClearDepthStencilImage(