From 1791dab5ef44c69ea6cfbfa0352b4ffb07026fa9 Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Thu, 13 Sep 2018 11:33:19 +0900 Subject: [PATCH] Fixed some build warnings. - display.c : Added definition TIZEN_SUPPORT_D2D_MODE to disable codes related to D2D mode. Change-Id: I6a94f8c7f322ee468b40edfc6e8fec7a0f190bae Signed-off-by: Joonbum Ko --- src/wsi/display.c | 8 ++++++++ src/wsi/swapchain.c | 2 +- src/wsi/swapchain_tpl.c | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/wsi/display.c b/src/wsi/display.c index c8ef77b..1162dcd 100644 --- a/src/wsi/display.c +++ b/src/wsi/display.c @@ -25,6 +25,11 @@ #include "wsi.h" #include +#ifndef TIZEN_SUPPORT_D2D_MODE +#define TIZEN_SUPPORT_D2D_MODE 0 +#endif + +#if TIZEN_SUPPORT_D2D_MODE static void add_tdm_layer(vk_physical_device_t *pdev, tdm_layer *layer, vk_display_t *display, tdm_output *output) @@ -130,6 +135,7 @@ add_tdm_output(vk_physical_device_t *pdev, tdm_output *output) /* Finally increase display count. */ pdev->display_count++; } +#endif static void display_fini(vk_display_t *display) @@ -149,11 +155,13 @@ vk_physical_device_fini_display(vk_physical_device_t *pdev) for (i = 0; i < pdev->display_count; i++) display_fini(&pdev->displays[i]); +#if TIZEN_SUPPORT_D2D_MODE for (i = 0; i < pdev->plane_count; i++) plane_fini(&pdev->planes[i]); if (pdev->tdm_display) tdm_display_deinit(pdev->tdm_display); +#endif pdev->tdm_display = NULL; pdev->display_count = 0; diff --git a/src/wsi/swapchain.c b/src/wsi/swapchain.c index a51b560..6515dc6 100644 --- a/src/wsi/swapchain.c +++ b/src/wsi/swapchain.c @@ -325,7 +325,7 @@ vk_QueuePresentKHR(VkQueue queue, uint32_t i; vk_icd_t *icd = vk_get_icd(); VkResult res = VK_SUCCESS; - VkPresentRegionsKHR *region_info = NULL; + const VkPresentRegionsKHR *region_info = NULL; const VkPresentRegionKHR *regions = NULL; for (i = 0; i < info->swapchainCount; i++) { diff --git a/src/wsi/swapchain_tpl.c b/src/wsi/swapchain_tpl.c index 708b21e..e0a67ac 100644 --- a/src/wsi/swapchain_tpl.c +++ b/src/wsi/swapchain_tpl.c @@ -80,7 +80,7 @@ swapchain_tpl_queue_present_image(VkQueue queue, } for (int i = 0; i < num_rects; i++) { - VkRectLayerKHR *pRects = &rects[i]; + const VkRectLayerKHR *pRects = &rects[i]; //copy first 4 ints from VkRectLayerKHR memcpy((char *)region->rects + sizeof(int)*4*i, (char *)pRects, sizeof(int) * 4); } -- 2.7.4