From 8818aff8602d2a3b64b176f62ccfdfe916b71bb7 Mon Sep 17 00:00:00 2001 From: "deasung.kim" Date: Sun, 24 Apr 2016 14:55:06 +0900 Subject: [PATCH] surface: use tpl_display_query_supported_buffer_count_from_native_window this patch depends on https://review.tizen.org/gerrit/#/c/66840 Change-Id: If852d63bd0be788a8d21356d161de4b4a57d7177 --- src/wsi/surface.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wsi/surface.c b/src/wsi/surface.c index 09003e6..9039b40 100644 --- a/src/wsi/surface.c +++ b/src/wsi/surface.c @@ -51,6 +51,8 @@ vk_GetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice pdev, { VkIcdSurfaceWayland *sfc = (VkIcdSurfaceWayland *)(uintptr_t)surface; tpl_display_t *display; + int min, max; + tpl_result_t res; VK_CHECK(sfc->base.platform == VK_ICD_WSI_PLATFORM_WAYLAND, return VK_ERROR_DEVICE_LOST, "Not supported platform surface.\n"); @@ -58,15 +60,13 @@ vk_GetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice pdev, display = vk_get_tpl_display(sfc->display); VK_CHECK(display, return VK_ERROR_DEVICE_LOST, "vk_get_tpl_display() failed.\n"); -#if 0 - res = tpl_surface_query_supported_buffer_count(sfc->tpl.surface, &min, &max); + res = tpl_display_query_supported_buffer_count_from_native_window(display, sfc->surface, &min, &max); VK_CHECK(res == TPL_ERROR_NONE, return VK_ERROR_DEVICE_LOST, - "tpl_surface_query_supported_buffer_count() failed.\n"); -#endif + "tpl_display_query_native_window_supported_buffer_count() failed.\n"); /* TODO: Hard-coded. */ - caps->minImageCount = 3; - caps->maxImageCount = 3; + caps->minImageCount = min; + caps->maxImageCount = max; caps->currentExtent.width = -1; caps->currentExtent.height = -1; -- 2.7.4