Re: [Mesa-dev] [PATCH 07/22] anv/wsi/x11: abstract WSI interface from internals.

2016-10-18 Thread Emil Velikov
On 17 October 2016 at 05:24, Dave Airlie  wrote:
> From: Dave Airlie 
>
> This allows the API and the internals to be split, and the
> internals shared.
> ---
>  src/intel/vulkan/anv_wsi_x11.c | 33 -
>  1 file changed, 24 insertions(+), 9 deletions(-)
>
> diff --git a/src/intel/vulkan/anv_wsi_x11.c b/src/intel/vulkan/anv_wsi_x11.c
> index ccaabea..6eb06c3 100644
> --- a/src/intel/vulkan/anv_wsi_x11.c
> +++ b/src/intel/vulkan/anv_wsi_x11.c
> @@ -233,16 +233,15 @@ visual_has_alpha(xcb_visualtype_t *visual, unsigned 
> depth)
> return (all_mask & ~rgb_mask) != 0;
>  }
>
> -VkBool32 anv_GetPhysicalDeviceXcbPresentationSupportKHR(
> -VkPhysicalDevicephysicalDevice,
> +static VkBool32 anv_get_physical_device_xcb_presentation_support(
> +struct anv_wsi_device *wsi_device,
> +VkAllocationCallbacks *alloc,
Nit: indentation (here and below) seems off.

-Emil
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 07/22] anv/wsi/x11: abstract WSI interface from internals.

2016-10-16 Thread Dave Airlie
From: Dave Airlie 

This allows the API and the internals to be split, and the
internals shared.
---
 src/intel/vulkan/anv_wsi_x11.c | 33 -
 1 file changed, 24 insertions(+), 9 deletions(-)

diff --git a/src/intel/vulkan/anv_wsi_x11.c b/src/intel/vulkan/anv_wsi_x11.c
index ccaabea..6eb06c3 100644
--- a/src/intel/vulkan/anv_wsi_x11.c
+++ b/src/intel/vulkan/anv_wsi_x11.c
@@ -233,16 +233,15 @@ visual_has_alpha(xcb_visualtype_t *visual, unsigned depth)
return (all_mask & ~rgb_mask) != 0;
 }
 
-VkBool32 anv_GetPhysicalDeviceXcbPresentationSupportKHR(
-VkPhysicalDevicephysicalDevice,
+static VkBool32 anv_get_physical_device_xcb_presentation_support(
+struct anv_wsi_device *wsi_device,
+VkAllocationCallbacks *alloc,
 uint32_tqueueFamilyIndex,
 xcb_connection_t*   connection,
 xcb_visualid_t  visual_id)
 {
-   ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice);
-
struct wsi_x11_connection *wsi_conn =
-  wsi_x11_get_connection(>wsi_device, >instance->alloc, 
connection);
+  wsi_x11_get_connection(wsi_device, alloc, connection);
 
if (!wsi_conn->has_dri3) {
   fprintf(stderr, "vulkan: No DRI3 support\n");
@@ -259,16 +258,32 @@ VkBool32 anv_GetPhysicalDeviceXcbPresentationSupportKHR(
return true;
 }
 
+VkBool32 anv_GetPhysicalDeviceXcbPresentationSupportKHR(
+VkPhysicalDevicephysicalDevice,
+uint32_tqueueFamilyIndex,
+xcb_connection_t*   connection,
+xcb_visualid_t  visual_id)
+{
+   ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice);
+
+   return anv_get_physical_device_xcb_presentation_support(
+  >wsi_device,
+  >instance->alloc,
+  queueFamilyIndex, connection, visual_id);
+}
+
 VkBool32 anv_GetPhysicalDeviceXlibPresentationSupportKHR(
 VkPhysicalDevicephysicalDevice,
 uint32_tqueueFamilyIndex,
 Display*dpy,
 VisualIDvisualID)
 {
-   return anv_GetPhysicalDeviceXcbPresentationSupportKHR(physicalDevice,
- queueFamilyIndex,
- 
XGetXCBConnection(dpy),
- visualID);
+   ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice);
+
+   return anv_get_physical_device_xcb_presentation_support(
+  >wsi_device,
+  >instance->alloc,
+  queueFamilyIndex, XGetXCBConnection(dpy), visualID);
 }
 
 static xcb_connection_t*
-- 
2.5.5

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev