summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_meta.h
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-10-03 14:12:05 +0200
committerSamuel Pitoiset <[email protected]>2017-10-06 09:49:05 +0200
commit807f2d4f338f456fdf662546ac4a2ae30172a5c0 (patch)
tree52711a5e88744b53e3ad004a0e2f89942935dd38 /src/amd/vulkan/radv_meta.h
parenta3a497c92152bece5698f05969d497694e033c19 (diff)
radv: introduce the concept of meta save flags
This will allow us to save/restore the different states on-demand based on the meta operation. For now, this saves/restores all states. Compute will follow once the graphics part is done. The main idea is to merge all save/restore helpers. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_meta.h')
-rw-r--r--src/amd/vulkan/radv_meta.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_meta.h b/src/amd/vulkan/radv_meta.h
index 252514540ed..0ea7ec537be 100644
--- a/src/amd/vulkan/radv_meta.h
+++ b/src/amd/vulkan/radv_meta.h
@@ -33,7 +33,16 @@
extern "C" {
#endif
+enum radv_meta_save_flags {
+ RADV_META_SAVE_PASS = (1 << 0),
+ RADV_META_SAVE_CONSTANTS = (1 << 1),
+ RADV_META_SAVE_DESCRIPTORS = (1 << 2),
+ RADV_META_SAVE_GRAPHICS_PIPELINE = (1 << 3),
+};
+
struct radv_meta_saved_state {
+ uint32_t flags;
+
struct radv_descriptor_set *old_descriptor_set0;
struct radv_pipeline *old_pipeline;
struct radv_viewport_state viewport;
@@ -182,7 +191,8 @@ void radv_fast_clear_flush_image_inplace(struct radv_cmd_buffer *cmd_buffer,
const VkImageSubresourceRange *subresourceRange);
void radv_meta_save_graphics_reset_vport_scissor_novertex(struct radv_meta_saved_state *saved_state,
- struct radv_cmd_buffer *cmd_buffer);
+ struct radv_cmd_buffer *cmd_buffer,
+ uint32_t flags);
void radv_meta_resolve_compute_image(struct radv_cmd_buffer *cmd_buffer,
struct radv_image *src_image,