Re: [Mesa-dev] [PATCH v2 12/32] radv: Move wsi initialization later in physical_device_init

2017-11-30 Thread Chad Versace
On Tue 28 Nov 2017, Jason Ekstrand wrote:
> We need it to happen after memory type setup so that we can query memory
> types in wsi_device_init.
> ---
>  src/amd/vulkan/radv_device.c | 13 +++--
>  1 file changed, 7 insertions(+), 6 deletions(-)

Patches 10-12 are
Reviewed-by: Chad Versace 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH v2 12/32] radv: Move wsi initialization later in physical_device_init

2017-11-28 Thread Jason Ekstrand
We need it to happen after memory type setup so that we can query memory
types in wsi_device_init.
---
 src/amd/vulkan/radv_device.c | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index b715014..e147cb8 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -214,16 +214,10 @@ radv_physical_device_init(struct radv_physical_device 
*device,
 
device->local_fd = fd;
device->ws->query_info(device->ws, >rad_info);
-   result = radv_init_wsi(device);
-   if (result != VK_SUCCESS) {
-   device->ws->destroy(device->ws);
-   goto fail;
-   }
 
device->name = get_chip_name(device->rad_info.family);
 
if (radv_device_get_cache_uuid(device->rad_info.family, 
device->cache_uuid)) {
-   radv_finish_wsi(device);
device->ws->destroy(device->ws);
result = vk_errorf(VK_ERROR_INITIALIZATION_FAILED,
   "cannot generate UUID");
@@ -259,6 +253,13 @@ radv_physical_device_init(struct radv_physical_device 
*device,
device->has_clear_state = device->rad_info.chip_class >= CIK;
 
radv_physical_device_init_mem_types(device);
+
+   result = radv_init_wsi(device);
+   if (result != VK_SUCCESS) {
+   device->ws->destroy(device->ws);
+   goto fail;
+   }
+
return VK_SUCCESS;
 
 fail:
-- 
2.5.0.400.gff86faf

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