[Mesa-dev] [PATCH 3/6] radv: skip descriptors flush for some meta operations

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


It would be better to rely on RADV_META_SAVE_DESCRIPTORS but
we can't really do it for now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/amd/vulkan/radv_meta_clear.c      | 10 ++++++----
 src/amd/vulkan/radv_meta_decompress.c |  5 +++--
 src/amd/vulkan/radv_meta_fast_clear.c |  5 +++--
 src/amd/vulkan/radv_meta_resolve.c    |  5 +++--
 4 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c
index 0f895f8c50..fbbea85224 100644
--- a/src/amd/vulkan/radv_meta_clear.c
+++ b/src/amd/vulkan/radv_meta_clear.c
@@ -374,8 +374,9 @@ emit_color_clear(struct radv_cmd_buffer *cmd_buffer,
 
 	radv_cmd_buffer_set_subpass(cmd_buffer, &clear_subpass, false);
 
-	radv_CmdBindPipeline(cmd_buffer_h, VK_PIPELINE_BIND_POINT_GRAPHICS,
-			     pipeline);
+	radv_bind_pipeline(cmd_buffer, VK_PIPELINE_BIND_POINT_GRAPHICS,
+			   radv_pipeline_from_handle(pipeline),
+			   RADV_BIND_PIPELINE_SKIP_DESCRIPTORS);
 
 	radv_CmdSetViewport(radv_cmd_buffer_to_handle(cmd_buffer), 0, 1, &(VkViewport) {
 			.x = clear_rect->rect.offset.x,
@@ -642,8 +643,9 @@ emit_depthstencil_clear(struct radv_cmd_buffer *cmd_buffer,
 							 clear_rect,
 							 clear_value);
 
-	radv_CmdBindPipeline(cmd_buffer_h, VK_PIPELINE_BIND_POINT_GRAPHICS,
-			     pipeline);
+	radv_bind_pipeline(cmd_buffer, VK_PIPELINE_BIND_POINT_GRAPHICS,
+			   radv_pipeline_from_handle(pipeline),
+			   RADV_BIND_PIPELINE_SKIP_DESCRIPTORS);
 
 	if (depth_view_can_fast_clear(cmd_buffer, iview, aspects,
 	                              subpass->depth_stencil_attachment.layout,
diff --git a/src/amd/vulkan/radv_meta_decompress.c b/src/amd/vulkan/radv_meta_decompress.c
index b86f3925cf..163e18851a 100644
--- a/src/amd/vulkan/radv_meta_decompress.c
+++ b/src/amd/vulkan/radv_meta_decompress.c
@@ -269,8 +269,9 @@ emit_depth_decomp(struct radv_cmd_buffer *cmd_buffer,
 {
 	VkCommandBuffer cmd_buffer_h = radv_cmd_buffer_to_handle(cmd_buffer);
 
-	radv_CmdBindPipeline(cmd_buffer_h, VK_PIPELINE_BIND_POINT_GRAPHICS,
-			     pipeline_h);
+	radv_bind_pipeline(cmd_buffer, VK_PIPELINE_BIND_POINT_GRAPHICS,
+			   radv_pipeline_from_handle(pipeline_h),
+			   RADV_BIND_PIPELINE_SKIP_DESCRIPTORS);
 
 	radv_CmdSetViewport(radv_cmd_buffer_to_handle(cmd_buffer), 0, 1, &(VkViewport) {
 		.x = 0,
diff --git a/src/amd/vulkan/radv_meta_fast_clear.c b/src/amd/vulkan/radv_meta_fast_clear.c
index 38da63246a..eeef470f1a 100644
--- a/src/amd/vulkan/radv_meta_fast_clear.c
+++ b/src/amd/vulkan/radv_meta_fast_clear.c
@@ -292,8 +292,9 @@ emit_fast_clear_flush(struct radv_cmd_buffer *cmd_buffer,
 {
 	VkCommandBuffer cmd_buffer_h = radv_cmd_buffer_to_handle(cmd_buffer);
 
-	radv_CmdBindPipeline(cmd_buffer_h, VK_PIPELINE_BIND_POINT_GRAPHICS,
-			     pipeline);
+	radv_bind_pipeline(cmd_buffer, VK_PIPELINE_BIND_POINT_GRAPHICS,
+			   radv_pipeline_from_handle(pipeline),
+			   RADV_BIND_PIPELINE_SKIP_DESCRIPTORS);
 
 	radv_CmdSetViewport(radv_cmd_buffer_to_handle(cmd_buffer), 0, 1, &(VkViewport) {
 			.x = 0,
diff --git a/src/amd/vulkan/radv_meta_resolve.c b/src/amd/vulkan/radv_meta_resolve.c
index 254861ad18..85d1f8eecd 100644
--- a/src/amd/vulkan/radv_meta_resolve.c
+++ b/src/amd/vulkan/radv_meta_resolve.c
@@ -268,8 +268,9 @@ emit_resolve(struct radv_cmd_buffer *cmd_buffer,
 
 	cmd_buffer->state.flush_bits |= RADV_CMD_FLAG_FLUSH_AND_INV_CB;
 
-	radv_CmdBindPipeline(cmd_buffer_h, VK_PIPELINE_BIND_POINT_GRAPHICS,
-			     device->meta_state.resolve.pipeline);
+	radv_bind_pipeline(cmd_buffer, VK_PIPELINE_BIND_POINT_GRAPHICS,
+			   radv_pipeline_from_handle(device->meta_state.resolve.pipeline),
+			   RADV_BIND_PIPELINE_SKIP_DESCRIPTORS);
 
 	radv_CmdSetViewport(radv_cmd_buffer_to_handle(cmd_buffer), 0, 1, &(VkViewport) {
 		.x = dest_offset->x,
-- 
2.14.2



More information about the mesa-dev mailing list