OSDN Git Service

util/vulkan: Move Vulkan utilities to src/vulkan/util
authorAlex Smith <asmith@feralinteractive.com>
Tue, 6 Jun 2017 11:31:05 +0000 (12:31 +0100)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 6 Jun 2017 15:17:13 +0000 (08:17 -0700)
We have Vulkan utilities in both src/util and src/vulkan/util. The
latter seems a more appropriate place for Vulkan-specific things, so
move them there.

v2: Android build system changes (from Tapani Pälli)

Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
22 files changed:
Android.common.mk
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_formats.c
src/amd/vulkan/radv_private.h
src/amd/vulkan/radv_wsi.c
src/intel/Android.vulkan.mk
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_formats.c
src/intel/vulkan/anv_pass.c
src/intel/vulkan/anv_private.h
src/intel/vulkan/anv_queue.c
src/intel/vulkan/anv_wsi.c
src/intel/vulkan/genX_cmd_buffer.c
src/util/Makefile.sources
src/vulkan/Android.mk
src/vulkan/Makefile.am
src/vulkan/Makefile.sources
src/vulkan/util/vk_alloc.h [moved from src/util/vk_alloc.h with 100% similarity]
src/vulkan/util/vk_util.h [moved from src/util/vk_util.h with 100% similarity]
src/vulkan/wsi/wsi_common.h
src/vulkan/wsi/wsi_common_wayland.c
src/vulkan/wsi/wsi_common_x11.c

index 44ad97b..6bd3081 100644 (file)
@@ -37,6 +37,7 @@ LOCAL_CFLAGS += \
        -Wno-missing-field-initializers \
        -Wno-initializer-overrides \
        -Wno-mismatched-tags \
+       -DVERSION=\"$(MESA_VERSION)\" \
        -DPACKAGE_VERSION=\"$(MESA_VERSION)\" \
        -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\"
 
index 887916f..a812527 100644 (file)
@@ -33,7 +33,7 @@
 #include "radv_cs.h"
 #include "util/disk_cache.h"
 #include "util/strtod.h"
-#include "util/vk_util.h"
+#include "vk_util.h"
 #include <xf86drm.h>
 #include <amdgpu.h>
 #include <amdgpu_drm.h>
index 6cff0a5..b13adb9 100644 (file)
@@ -28,7 +28,8 @@
 #include "sid.h"
 #include "r600d_common.h"
 
-#include "util/vk_util.h"
+#include "vk_util.h"
+
 #include "util/u_half.h"
 #include "util/format_srgb.h"
 #include "util/format_r11g11b10f.h"
index ed80ba7..a3920a7 100644 (file)
@@ -47,8 +47,8 @@
 #include "compiler/shader_enums.h"
 #include "util/macros.h"
 #include "util/list.h"
-#include "util/vk_alloc.h"
 #include "main/macros.h"
+#include "vk_alloc.h"
 
 #include "radv_radeon_winsys.h"
 #include "ac_binary.h"
index 51fe159..cdb04ca 100644 (file)
@@ -26,7 +26,7 @@
 #include "radv_private.h"
 #include "radv_meta.h"
 #include "wsi_common.h"
-#include "util/vk_util.h"
+#include "vk_util.h"
 
 static const struct wsi_callbacks wsi_cbs = {
    .get_phys_device_format_properties = radv_GetPhysicalDeviceFormatProperties,
index 2ede3f7..e31c439 100644 (file)
@@ -31,6 +31,7 @@ VULKAN_COMMON_INCLUDES := \
        $(MESA_TOP)/src/gallium/include \
        $(MESA_TOP)/src/mesa \
        $(MESA_TOP)/src/vulkan/wsi \
+       $(MESA_TOP)/src/vulkan/util \
        $(MESA_TOP)/src/intel \
        $(MESA_TOP)/src/intel/vulkan
 
index ab484ed..52e5d7b 100644 (file)
@@ -35,7 +35,7 @@
 #include "util/debug.h"
 #include "util/build_id.h"
 #include "util/mesa-sha1.h"
-#include "util/vk_util.h"
+#include "vk_util.h"
 
 #include "genxml/gen7_pack.h"
 
index 25801e8..104d4f7 100644 (file)
@@ -23,8 +23,7 @@
 
 #include "anv_private.h"
 #include "vk_format_info.h"
-
-#include "util/vk_util.h"
+#include "vk_util.h"
 
 /*
  * gcc-4 and earlier don't allow compound literals where a constant
index 93f1483..1b30c14 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "anv_private.h"
 
-#include "util/vk_util.h"
+#include "vk_util.h"
 
 static unsigned
 num_subpass_attachments(const VkSubpassDescription *desc)
index c261faa..fe6ac3b 100644 (file)
@@ -47,7 +47,7 @@
 #include "util/macros.h"
 #include "util/list.h"
 #include "util/u_vector.h"
-#include "util/vk_alloc.h"
+#include "vk_alloc.h"
 
 /* Pre-declarations needed for WSI entrypoints */
 struct wl_surface;
index be7fd31..fd4d362 100644 (file)
@@ -30,7 +30,7 @@
 #include <sys/eventfd.h>
 
 #include "anv_private.h"
-#include "util/vk_util.h"
+#include "vk_util.h"
 
 #include "genxml/gen7_pack.h"
 
index 7575f58..9369f26 100644 (file)
@@ -24,7 +24,7 @@
 #include "anv_private.h"
 #include "wsi_common.h"
 #include "vk_format_info.h"
-#include "util/vk_util.h"
+#include "vk_util.h"
 
 #ifdef VK_USE_PLATFORM_WAYLAND_KHR
 static const struct wsi_callbacks wsi_cbs = {
index 072d0d5..59430a2 100644 (file)
@@ -26,7 +26,7 @@
 
 #include "anv_private.h"
 #include "vk_format_info.h"
-#include "util/vk_util.h"
+#include "vk_util.h"
 
 #include "common/gen_l3_config.h"
 #include "genxml/gen_macros.h"
index e905734..e9f820a 100644 (file)
@@ -51,9 +51,7 @@ MESA_UTIL_FILES := \
        u_string.h \
        u_thread.h \
        u_vector.c \
-       u_vector.h \
-       vk_alloc.h \
-       vk_util.h
+       u_vector.h
 
 MESA_UTIL_GENERATED_FILES = \
        format_srgb.c
index 7653f34..8eb42ec 100644 (file)
@@ -41,6 +41,8 @@ LOCAL_C_INCLUDES := \
 LOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/, \
        $(VULKAN_UTIL_GENERATED_FILES))
 
+LOCAL_SRC_FILES := $(VULKAN_UTIL_FILES))
+
 vulkan_api_xml = $(MESA_TOP)/src/vulkan/registry/vk.xml
 
 $(LOCAL_GENERATED_SOURCES): $(MESA_TOP)/src/vulkan/util/gen_enum_to_str.py $(vulkan_api_xml)
index 71fb2d9..c897a07 100644 (file)
@@ -11,6 +11,10 @@ PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
 EXTRA_DIST = \
        util/gen_enum_to_str.py
 
+VULKAN_UTIL_SOURCES = \
+       $(VULKAN_UTIL_FILES) \
+       $(VULKAN_UTIL_GENERATED_FILES)
+
 BUILT_SOURCES = \
        $(VULKAN_UTIL_GENERATED_FILES)
 
@@ -18,12 +22,13 @@ util/vk_enum_to_str.c util/vk_enum_to_str.h: util/gen_enum_to_str.py $(vulkan_ap
        $(MKDIR_GEN)
        $(PYTHON_GEN) $(srcdir)/util/gen_enum_to_str.py --xml $(vulkan_api_xml) --outdir $(top_builddir)/src/vulkan/util
 
-libvulkan_util_la_SOURCES = $(VULKAN_UTIL_GENERATED_FILES)
+libvulkan_util_la_SOURCES = $(VULKAN_UTIL_SOURCES)
 
 AM_CPPFLAGS = \
        $(DEFINES) \
        -I$(top_srcdir)/include \
        -I$(top_srcdir)/src \
+       -I$(top_srcdir)/src/vulkan/util \
        -I$(top_srcdir)/src/gallium/auxiliary \
        -I$(top_srcdir)/src/gallium/include
 
index 63f4ac1..9962c1b 100644 (file)
@@ -15,6 +15,10 @@ VULKAN_WSI_X11_FILES := \
        wsi/wsi_common_x11.c \
        wsi/wsi_common_x11.h
 
+VULKAN_UTIL_FILES := \
+       util/vk_alloc.h \
+       util/vk_util.h
+
 VULKAN_UTIL_GENERATED_FILES := \
        util/vk_enum_to_str.c \
        util/vk_enum_to_str.h
similarity index 100%
rename from src/util/vk_util.h
rename to src/vulkan/util/vk_util.h
index 8aee9c7..8166b7d 100644 (file)
@@ -26,7 +26,7 @@
 #include <stdint.h>
 #include <stdbool.h>
 
-#include "util/vk_alloc.h"
+#include "vk_alloc.h"
 #include <vulkan/vulkan.h>
 #include <vulkan/vk_icd.h>
 
index 644ed62..dd283a1 100644 (file)
@@ -31,7 +31,7 @@
 #include <string.h>
 #include <pthread.h>
 
-#include "util/vk_util.h"
+#include "vk_util.h"
 #include "wsi_common_wayland.h"
 #include "wayland-drm-client-protocol.h"
 
index 5be56f1..ecdaf91 100644 (file)
@@ -38,7 +38,7 @@
 #include <xf86drm.h>
 #include "util/hash_table.h"
 
-#include "util/vk_util.h"
+#include "vk_util.h"
 #include "wsi_common.h"
 #include "wsi_common_x11.h"
 #include "wsi_common_queue.h"