[Mesa-dev] [PATCH 2/3] radv/meta: use VK_NULL_HANDLE for handles

Grazvydas Ignotas notasas at gmail.com
Sat Dec 10 19:10:04 UTC 2016


Otherwise we get 32bit warnings because handle is plain uint64_t there
and NULL is not suited to initialize that.

Signed-off-by: Grazvydas Ignotas <notasas at gmail.com>
---
no commit access, somebody please push

 src/amd/vulkan/radv_meta_blit2d.c     | 2 +-
 src/amd/vulkan/radv_meta_bufimage.c   | 2 +-
 src/amd/vulkan/radv_meta_resolve_cs.c | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/amd/vulkan/radv_meta_blit2d.c b/src/amd/vulkan/radv_meta_blit2d.c
index 5a42fd8..6b622e7 100644
--- a/src/amd/vulkan/radv_meta_blit2d.c
+++ b/src/amd/vulkan/radv_meta_blit2d.c
@@ -163,7 +163,7 @@ blit2d_bind_src(struct radv_cmd_buffer *cmd_buffer,
 								  .descriptorType = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,
 								  .pImageInfo = (VkDescriptorImageInfo[]) {
 								  {
-									  .sampler = NULL,
+									  .sampler = VK_NULL_HANDLE,
 									  .imageView = radv_image_view_to_handle(&tmp->iview),
 									  .imageLayout = VK_IMAGE_LAYOUT_GENERAL,
 								  },
diff --git a/src/amd/vulkan/radv_meta_bufimage.c b/src/amd/vulkan/radv_meta_bufimage.c
index 01e48e4..3107718 100644
--- a/src/amd/vulkan/radv_meta_bufimage.c
+++ b/src/amd/vulkan/radv_meta_bufimage.c
@@ -327,7 +327,7 @@ itob_bind_descriptors(struct radv_cmd_buffer *cmd_buffer,
 						  .descriptorType = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,
 						  .pImageInfo = (VkDescriptorImageInfo[]) {
 							  {
-								  .sampler = NULL,
+								  .sampler = VK_NULL_HANDLE,
 								  .imageView = radv_image_view_to_handle(&tmp->src_iview),
 								  .imageLayout = VK_IMAGE_LAYOUT_GENERAL,
 							  },
diff --git a/src/amd/vulkan/radv_meta_resolve_cs.c b/src/amd/vulkan/radv_meta_resolve_cs.c
index 126823b..bfe4cee 100644
--- a/src/amd/vulkan/radv_meta_resolve_cs.c
+++ b/src/amd/vulkan/radv_meta_resolve_cs.c
@@ -405,7 +405,7 @@ void radv_meta_resolve_compute_image(struct radv_cmd_buffer *cmd_buffer,
 						  .descriptorType = VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,
 						  .pImageInfo = (VkDescriptorImageInfo[]) {
 							  {
-								  .sampler = NULL,
+								  .sampler = VK_NULL_HANDLE,
 								  .imageView = radv_image_view_to_handle(&src_iview),
 								  .imageLayout = VK_IMAGE_LAYOUT_GENERAL,
 							  },
@@ -420,7 +420,7 @@ void radv_meta_resolve_compute_image(struct radv_cmd_buffer *cmd_buffer,
 						  .descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE,
 						  .pImageInfo = (VkDescriptorImageInfo[]) {
 							  {
-								  .sampler = NULL,
+								  .sampler = VK_NULL_HANDLE,
 								  .imageView = radv_image_view_to_handle(&dest_iview),
 								  .imageLayout = VK_IMAGE_LAYOUT_GENERAL,
 							  },
-- 
2.7.4



More information about the mesa-dev mailing list