[Mesa-dev] [PATCH 6/6] radv: skip constants upload for some meta operations

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


This is actually a no-op but I think it improves consistency
with the RADV_BIND_PIPELINE_SKIP_DESCRIPTORS flag.

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

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

diff --git a/src/amd/vulkan/radv_meta_buffer.c b/src/amd/vulkan/radv_meta_buffer.c
index e009234f04..538b8d47f5 100644
--- a/src/amd/vulkan/radv_meta_buffer.c
+++ b/src/amd/vulkan/radv_meta_buffer.c
@@ -357,9 +357,9 @@ static void copy_buffer_shader(struct radv_cmd_buffer *cmd_buffer,
 		.size = size
 	};
 
-	radv_CmdBindPipeline(radv_cmd_buffer_to_handle(cmd_buffer),
-			     VK_PIPELINE_BIND_POINT_COMPUTE,
-			     device->meta_state.buffer.copy_pipeline);
+	radv_bind_pipeline(cmd_buffer, VK_PIPELINE_BIND_POINT_COMPUTE,
+			   radv_pipeline_from_handle(device->meta_state.buffer.copy_pipeline),
+			   RADV_BIND_PIPELINE_SKIP_CONSTANTS);
 
 	radv_meta_push_descriptor_set(cmd_buffer, VK_PIPELINE_BIND_POINT_COMPUTE,
 			              device->meta_state.buffer.copy_p_layout,
diff --git a/src/amd/vulkan/radv_meta_decompress.c b/src/amd/vulkan/radv_meta_decompress.c
index 163e18851a..d73be8f742 100644
--- a/src/amd/vulkan/radv_meta_decompress.c
+++ b/src/amd/vulkan/radv_meta_decompress.c
@@ -271,7 +271,8 @@ emit_depth_decomp(struct radv_cmd_buffer *cmd_buffer,
 
 	radv_bind_pipeline(cmd_buffer, VK_PIPELINE_BIND_POINT_GRAPHICS,
 			   radv_pipeline_from_handle(pipeline_h),
-			   RADV_BIND_PIPELINE_SKIP_DESCRIPTORS);
+			   RADV_BIND_PIPELINE_SKIP_DESCRIPTORS |
+			   RADV_BIND_PIPELINE_SKIP_CONSTANTS);
 
 	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 eeef470f1a..4269105751 100644
--- a/src/amd/vulkan/radv_meta_fast_clear.c
+++ b/src/amd/vulkan/radv_meta_fast_clear.c
@@ -294,7 +294,8 @@ emit_fast_clear_flush(struct radv_cmd_buffer *cmd_buffer,
 
 	radv_bind_pipeline(cmd_buffer, VK_PIPELINE_BIND_POINT_GRAPHICS,
 			   radv_pipeline_from_handle(pipeline),
-			   RADV_BIND_PIPELINE_SKIP_DESCRIPTORS);
+			   RADV_BIND_PIPELINE_SKIP_DESCRIPTORS |
+			   RADV_BIND_PIPELINE_SKIP_CONSTANTS);
 
 	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 85d1f8eecd..c6ce93159c 100644
--- a/src/amd/vulkan/radv_meta_resolve.c
+++ b/src/amd/vulkan/radv_meta_resolve.c
@@ -270,7 +270,8 @@ emit_resolve(struct radv_cmd_buffer *cmd_buffer,
 
 	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_BIND_PIPELINE_SKIP_DESCRIPTORS |
+			   RADV_BIND_PIPELINE_SKIP_CONSTANTS);
 
 	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