[Mesa-dev] [PATCH 2/6] radv: skip descriptors flush when restoring meta pipelines

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri Oct 6 10:19:46 UTC 2017


Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/amd/vulkan/radv_meta.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/amd/vulkan/radv_meta.c b/src/amd/vulkan/radv_meta.c
index 3f57618ad2..d12797a76c 100644
--- a/src/amd/vulkan/radv_meta.c
+++ b/src/amd/vulkan/radv_meta.c
@@ -94,10 +94,14 @@ void
 radv_meta_restore(const struct radv_meta_saved_state *state,
 		  struct radv_cmd_buffer *cmd_buffer)
 {
+	uint32_t bind_flags = 0;
+
+	if (!(state->flags & RADV_META_SAVE_DESCRIPTORS))
+		bind_flags |= RADV_BIND_PIPELINE_SKIP_DESCRIPTORS;
+
 	if (state->flags & RADV_META_SAVE_GRAPHICS_PIPELINE) {
-		radv_CmdBindPipeline(radv_cmd_buffer_to_handle(cmd_buffer),
-				     VK_PIPELINE_BIND_POINT_GRAPHICS,
-				     radv_pipeline_to_handle(state->old_pipeline));
+		radv_bind_pipeline(cmd_buffer, VK_PIPELINE_BIND_POINT_GRAPHICS,
+				   state->old_pipeline, bind_flags);
 
 		cmd_buffer->state.dirty |= RADV_CMD_DIRTY_PIPELINE;
 
@@ -118,9 +122,8 @@ radv_meta_restore(const struct radv_meta_saved_state *state,
 	}
 
 	if (state->flags & RADV_META_SAVE_COMPUTE_PIPELINE) {
-		radv_CmdBindPipeline(radv_cmd_buffer_to_handle(cmd_buffer),
-				     VK_PIPELINE_BIND_POINT_COMPUTE,
-				     radv_pipeline_to_handle(state->old_pipeline));
+		radv_bind_pipeline(cmd_buffer, VK_PIPELINE_BIND_POINT_COMPUTE,
+				   state->old_pipeline, bind_flags);
 	}
 
 	if (state->flags & RADV_META_SAVE_DESCRIPTORS) {
-- 
2.14.2



More information about the mesa-dev mailing list