[RFC v3 18/22] vulkan/wsi: Rename needs_linear_copy to different_gpu

Louis-Francis Ratté-Boulianne lfrb at collabora.com
Wed Sep 27 05:28:48 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   | 10 +++++-----
 src/intel/vulkan/anv_wsi.c  |  2 +-
 src/vulkan/wsi/wsi_common.h |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/amd/vulkan/radv_wsi.c b/src/amd/vulkan/radv_wsi.c
index 189bee03ce..dd820dc431 100644
--- a/src/amd/vulkan/radv_wsi.c
+++ b/src/amd/vulkan/radv_wsi.c
@@ -225,7 +225,7 @@ static VkResult
 radv_wsi_image_create(VkDevice device_h,
 		      const VkSwapchainCreateInfoKHR *pCreateInfo,
 		      const VkAllocationCallbacks* pAllocator,
-		      bool linear,
+		      bool different_gpu,
 		      struct wsi_image_base *wsi_image)
 {
 	VkResult result = VK_SUCCESS;
@@ -238,7 +238,7 @@ radv_wsi_image_create(VkDevice device_h,
 	if (result != VK_SUCCESS)
 		return result;
 
-	if (linear) {
+	if (different_gpu) {
 		result = radv_wsi_image_alloc(device_h, pCreateInfo, pAllocator,
 					      true, &wsi_image->linear_image,
 					      &wsi_image->linear_memory);
@@ -250,9 +250,9 @@ radv_wsi_image_create(VkDevice device_h,
 	}
 
 	RADV_FROM_HANDLE(radv_device_memory, memory,
-			 linear ? wsi_image->linear_memory : wsi_image->memory);
-	image = radv_image_from_handle(linear ? wsi_image->linear_image :
-	                                        wsi_image->image);
+			 different_gpu ? wsi_image->linear_memory : wsi_image->memory);
+	image = radv_image_from_handle(different_gpu ? wsi_image->linear_image :
+						       wsi_image->image);
 	surface = &image->surface;
 
 	RADV_FROM_HANDLE(radv_device, device, device_h);
diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c
index 73c46c3951..750bc645ae 100644
--- a/src/intel/vulkan/anv_wsi.c
+++ b/src/intel/vulkan/anv_wsi.c
@@ -172,7 +172,7 @@ static VkResult
 anv_wsi_image_create(VkDevice device_h,
                      const VkSwapchainCreateInfoKHR *pCreateInfo,
                      const VkAllocationCallbacks* pAllocator,
-                     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 ee0fb8357a..8172f4b318 100644
--- a/src/vulkan/wsi/wsi_common.h
+++ b/src/vulkan/wsi/wsi_common.h
@@ -49,7 +49,7 @@ struct wsi_image_fns {
    VkResult (*create_wsi_image)(VkDevice device_h,
                                 const VkSwapchainCreateInfoKHR *pCreateInfo,
                                 const VkAllocationCallbacks *pAllocator,
-                                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 xorg-devel mailing list