diff options
author | Alex Smith <[email protected]> | 2017-06-06 12:31:05 +0100 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-06-06 08:17:13 -0700 |
commit | 621b3410f5f88e2a3743bc025b100717cac26e63 (patch) | |
tree | 1b3714721de48490a4a25f361e93c400f0e03f7b | |
parent | 2ef73473c8eedab679637334a0af597d26222e0a (diff) |
util/vulkan: Move Vulkan utilities to src/vulkan/util
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 <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Acked-by: Jason Ekstrand <[email protected]>
-rw-r--r-- | Android.common.mk | 1 | ||||
-rw-r--r-- | src/amd/vulkan/radv_device.c | 2 | ||||
-rw-r--r-- | src/amd/vulkan/radv_formats.c | 3 | ||||
-rw-r--r-- | src/amd/vulkan/radv_private.h | 2 | ||||
-rw-r--r-- | src/amd/vulkan/radv_wsi.c | 2 | ||||
-rw-r--r-- | src/intel/Android.vulkan.mk | 1 | ||||
-rw-r--r-- | src/intel/vulkan/anv_device.c | 2 | ||||
-rw-r--r-- | src/intel/vulkan/anv_formats.c | 3 | ||||
-rw-r--r-- | src/intel/vulkan/anv_pass.c | 2 | ||||
-rw-r--r-- | src/intel/vulkan/anv_private.h | 2 | ||||
-rw-r--r-- | src/intel/vulkan/anv_queue.c | 2 | ||||
-rw-r--r-- | src/intel/vulkan/anv_wsi.c | 2 | ||||
-rw-r--r-- | src/intel/vulkan/genX_cmd_buffer.c | 2 | ||||
-rw-r--r-- | src/util/Makefile.sources | 4 | ||||
-rw-r--r-- | src/vulkan/Android.mk | 2 | ||||
-rw-r--r-- | src/vulkan/Makefile.am | 7 | ||||
-rw-r--r-- | src/vulkan/Makefile.sources | 4 | ||||
-rw-r--r-- | src/vulkan/util/vk_alloc.h (renamed from src/util/vk_alloc.h) | 0 | ||||
-rw-r--r-- | src/vulkan/util/vk_util.h (renamed from src/util/vk_util.h) | 0 | ||||
-rw-r--r-- | src/vulkan/wsi/wsi_common.h | 2 | ||||
-rw-r--r-- | src/vulkan/wsi/wsi_common_wayland.c | 2 | ||||
-rw-r--r-- | src/vulkan/wsi/wsi_common_x11.c | 2 |
22 files changed, 30 insertions, 19 deletions
diff --git a/Android.common.mk b/Android.common.mk index 44ad97b6be2..6bd30816bc4 100644 --- a/Android.common.mk +++ b/Android.common.mk @@ -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\" diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 887916f558f..a812527ebe4 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -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> diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c index 6cff0a5384e..b13adb9abdc 100644 --- a/src/amd/vulkan/radv_formats.c +++ b/src/amd/vulkan/radv_formats.c @@ -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" diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index ed80ba79e7f..a3920a72702 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -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" diff --git a/src/amd/vulkan/radv_wsi.c b/src/amd/vulkan/radv_wsi.c index 51fe159aaf8..cdb04ca9628 100644 --- a/src/amd/vulkan/radv_wsi.c +++ b/src/amd/vulkan/radv_wsi.c @@ -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, diff --git a/src/intel/Android.vulkan.mk b/src/intel/Android.vulkan.mk index 2ede3f75b32..e31c4391df0 100644 --- a/src/intel/Android.vulkan.mk +++ b/src/intel/Android.vulkan.mk @@ -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 diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index ab484ed0f9a..52e5d7b0252 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -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" diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index 25801e8b065..104d4f7a5fe 100644 --- a/src/intel/vulkan/anv_formats.c +++ b/src/intel/vulkan/anv_formats.c @@ -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 diff --git a/src/intel/vulkan/anv_pass.c b/src/intel/vulkan/anv_pass.c index 93f14830cc5..1b30c1409d9 100644 --- a/src/intel/vulkan/anv_pass.c +++ b/src/intel/vulkan/anv_pass.c @@ -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) diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index c261faa78b8..fe6ac3bc1bd 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -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; diff --git a/src/intel/vulkan/anv_queue.c b/src/intel/vulkan/anv_queue.c index be7fd310081..fd4d36297f0 100644 --- a/src/intel/vulkan/anv_queue.c +++ b/src/intel/vulkan/anv_queue.c @@ -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" diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c index 7575f58ff24..9369f26a8fa 100644 --- a/src/intel/vulkan/anv_wsi.c +++ b/src/intel/vulkan/anv_wsi.c @@ -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 = { diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 072d0d50325..59430a24eb9 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -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" diff --git a/src/util/Makefile.sources b/src/util/Makefile.sources index e9057343dc2..e9f820a3ee0 100644 --- a/src/util/Makefile.sources +++ b/src/util/Makefile.sources @@ -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 diff --git a/src/vulkan/Android.mk b/src/vulkan/Android.mk index 7653f34c68a..8eb42ece878 100644 --- a/src/vulkan/Android.mk +++ b/src/vulkan/Android.mk @@ -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) diff --git a/src/vulkan/Makefile.am b/src/vulkan/Makefile.am index 71fb2d97bba..c897a07d6a8 100644 --- a/src/vulkan/Makefile.am +++ b/src/vulkan/Makefile.am @@ -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 diff --git a/src/vulkan/Makefile.sources b/src/vulkan/Makefile.sources index 63f4ac11620..9962c1b077d 100644 --- a/src/vulkan/Makefile.sources +++ b/src/vulkan/Makefile.sources @@ -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 diff --git a/src/util/vk_alloc.h b/src/vulkan/util/vk_alloc.h index 29150218269..29150218269 100644 --- a/src/util/vk_alloc.h +++ b/src/vulkan/util/vk_alloc.h diff --git a/src/util/vk_util.h b/src/vulkan/util/vk_util.h index 5ff1f00195c..5ff1f00195c 100644 --- a/src/util/vk_util.h +++ b/src/vulkan/util/vk_util.h diff --git a/src/vulkan/wsi/wsi_common.h b/src/vulkan/wsi/wsi_common.h index 8aee9c73513..8166b7dd344 100644 --- a/src/vulkan/wsi/wsi_common.h +++ b/src/vulkan/wsi/wsi_common.h @@ -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> diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c index 644ed62b414..dd283a12111 100644 --- a/src/vulkan/wsi/wsi_common_wayland.c +++ b/src/vulkan/wsi/wsi_common_wayland.c @@ -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" diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c index 5be56f1232f..ecdaf914344 100644 --- a/src/vulkan/wsi/wsi_common_x11.c +++ b/src/vulkan/wsi/wsi_common_x11.c @@ -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" |