[Mesa-dev] [RFC v5 15/19] vulkan/wsi: Rename needs_linear_copy to different_gpu

Louis-Francis Ratté-Boulianne lfrb at collabora.com
Mon Nov 6 22:02:45 UTC 2017


From: Daniel Stone <daniels at collabora.com>

That's what it actually means; the fact it generally means a linear copy
is requires is incidental.

Signed-off-by: Daniel Stone <daniels at collabora.com>
---
 src/amd/vulkan/radv_wsi.c   | 6 +++---
 src/intel/vulkan/anv_wsi.c  | 2 +-
 src/vulkan/wsi/wsi_common.h | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/amd/vulkan/radv_wsi.c b/src/amd/vulkan/radv_wsi.c
index 66082c4ae0..c4c6ff9736 100644
--- a/src/amd/vulkan/radv_wsi.c
+++ b/src/amd/vulkan/radv_wsi.c
@@ -144,7 +144,7 @@ radv_wsi_image_create(VkDevice device_h,
 		      const VkSwapchainCreateInfoKHR *pCreateInfo,
 		      const VkAllocationCallbacks* pAllocator,
 		      bool should_export,
-		      bool linear,
+		      bool different_gpu,
 		      struct wsi_image_base *wsi_image)
 {
 	VkResult result = VK_SUCCESS;
@@ -170,7 +170,7 @@ radv_wsi_image_create(VkDevice device_h,
 						   .arrayLayers = 1,
 						   .samples = 1,
 						   /* FIXME: Need a way to use X tiling to allow scanout */
-						   .tiling = linear ? VK_IMAGE_TILING_LINEAR : VK_IMAGE_TILING_OPTIMAL,
+						   .tiling = different_gpu ? VK_IMAGE_TILING_LINEAR : VK_IMAGE_TILING_OPTIMAL,
 						   .usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT,
 						   .flags = 0,
 					   },
@@ -196,7 +196,7 @@ radv_wsi_image_create(VkDevice device_h,
 					     .sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
 					     .pNext = &ded_alloc,
 					     .allocationSize = image->size,
-					     .memoryTypeIndex = linear ? 1 : 0,
+					     .memoryTypeIndex = different_gpu ? 1 : 0,
 				     },
 				     NULL /* XXX: pAllocator */,
 				     RADV_MEM_IMPLICIT_SYNC,
diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c
index 929905052d..740bbff9d3 100644
--- a/src/intel/vulkan/anv_wsi.c
+++ b/src/intel/vulkan/anv_wsi.c
@@ -173,7 +173,7 @@ anv_wsi_image_create(VkDevice device_h,
                      const VkSwapchainCreateInfoKHR *pCreateInfo,
                      const VkAllocationCallbacks* pAllocator,
                      bool should_export,
-                     bool linear,
+                     bool different_gpu,
                      struct wsi_image_base *wsi_image)
 {
    struct anv_device *device = anv_device_from_handle(device_h);
diff --git a/src/vulkan/wsi/wsi_common.h b/src/vulkan/wsi/wsi_common.h
index c8a2df08f1..d808a4cfdc 100644
--- a/src/vulkan/wsi/wsi_common.h
+++ b/src/vulkan/wsi/wsi_common.h
@@ -48,7 +48,7 @@ struct wsi_image_fns {
                                 const VkSwapchainCreateInfoKHR *pCreateInfo,
                                 const VkAllocationCallbacks *pAllocator,
                                 bool should_export,
-                                bool linear,
+                                bool different_gpu,
                                 struct wsi_image_base *image_p);
    void (*free_wsi_image)(VkDevice device,
                           const VkAllocationCallbacks *pAllocator,
-- 
2.13.0



More information about the mesa-dev mailing list