summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--loader/CMakeLists.txt5
-rw-r--r--loader/loader.c3
-rw-r--r--loader/log.c17
-rw-r--r--packaging/vulkan-loader.spec7
4 files changed, 27 insertions, 5 deletions
diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt
index c6366eef..7359177b 100644
--- a/loader/CMakeLists.txt
+++ b/loader/CMakeLists.txt
@@ -350,6 +350,11 @@ else()
PROPERTIES SOVERSION "1"
VERSION ${VULKAN_LOADER_VERSION})
target_link_libraries(vulkan PRIVATE ${CMAKE_DL_LIBS} m Threads::Threads)
+ option(TIZEN_PLATFORM "If build for Tizen platform")
+ if (TIZEN_PLATFORM)
+ add_definitions(-DTIZEN_PLATFORM)
+ target_link_libraries(vulkan PRIVATE dlog)
+ endif()
if (LOADER_ENABLE_ADDRESS_SANITIZER)
target_compile_options(vulkan PUBLIC -fsanitize=address)
diff --git a/loader/loader.c b/loader/loader.c
index 1a5f938e..9eb6bc66 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -714,8 +714,7 @@ VkResult loader_init_generic_list(const struct loader_instance *inst, struct loa
}
void loader_destroy_generic_list(const struct loader_instance *inst, struct loader_generic_list *list) {
- if (list->count !=0)
- loader_instance_heap_free(inst, list->list);
+ loader_instance_heap_free(inst, list->list);
list->count = 0;
list->capacity = 0;
list->list = NULL;
diff --git a/loader/log.c b/loader/log.c
index 2474317b..2a4ab062 100644
--- a/loader/log.c
+++ b/loader/log.c
@@ -36,6 +36,10 @@
#include "loader_environment.h"
#include "settings.h"
#include "vk_loader_platform.h"
+#ifdef TIZEN_PLATFORM
+#include <dlog/dlog.h>
+#define LOG_TAG "VK_LOADER"
+#endif
uint32_t g_loader_debug = 0;
@@ -230,6 +234,19 @@ void loader_log(const struct loader_instance *inst, VkFlags msg_type, int32_t ms
OutputDebugString(msg);
OutputDebugString("\n");
#endif
+
+#ifdef TIZEN_PLATFORM
+ if ((msg_type & VULKAN_LOADER_ERROR_BIT) != 0) {
+ dlog_print(DLOG_ERROR, LOG_TAG, "%s %s\n", cmd_line_msg, msg);
+ } else if ((msg_type & VULKAN_LOADER_WARN_BIT) != 0) {
+ dlog_print(DLOG_WARN, LOG_TAG, "%s %s\n", cmd_line_msg, msg);
+ } else if ((msg_type & VULKAN_LOADER_INFO_BIT) != 0) {
+ dlog_print(DLOG_INFO, LOG_TAG, "%s %s\n", cmd_line_msg, msg);
+ } else if ((msg_type & VULKAN_LOADER_DEBUG_BIT) != 0) {
+ dlog_print(DLOG_DEBUG, LOG_TAG, "%s %s\n", cmd_line_msg, msg);
+ }
+#endif
+
}
void loader_log_asm_function_not_supported(const struct loader_instance *inst, VkFlags msg_type, int32_t msg_code,
diff --git a/packaging/vulkan-loader.spec b/packaging/vulkan-loader.spec
index 27393bcd..d1ab6470 100644
--- a/packaging/vulkan-loader.spec
+++ b/packaging/vulkan-loader.spec
@@ -1,5 +1,5 @@
Name: vulkan-loader
-Version: 1.3.240
+Version: 1.3.268
Release: 0
Summary: Vulkan ICD loader
Group: Graphics & UI Framework/GL
@@ -14,6 +14,7 @@ BuildRequires: pkgconfig(wayland-client)
BuildRequires: pkgconfig(wayland-cursor)
BuildRequires: pkgconfig(wayland-server)
BuildRequires: pkgconfig(wayland-egl)
+BuildRequires: pkgconfig(dlog)
%define BUILD_TYPE Debug
@@ -34,7 +35,7 @@ developing applications that use %{name}.
%build
cp %{SOURCE1001} .
export CFLAGS="$CFLAGS -w"
-cmake -DCMAKE_BUILD_TYPE=%{BUILD_TYPE} -DBUILD_TESTS=OFF \
+cmake -DCMAKE_BUILD_TYPE=%{BUILD_TYPE} -DBUILD_TESTS=OFF -DTIZEN_PLATFORM=ON \
-DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF -DBUILD_WSI_WAYLAND_SUPPORT=ON \
-DCMAKE_INSTALL_LIBDIR=%{_libdir} -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} -DCMAKE_INSTALL_DATADIR=%{_datadir}
make
@@ -65,4 +66,4 @@ mkdir -p %{buildroot}%{_sysconfdir}/vulkan/{explicit,implicit}_layer.d/ \
%files devel
%{_libdir}/pkgconfig/vulkan.pc
%{_libdir}/*.so
-
+%{_libdir}/cmake/*