<div dir="ltr"><div>Acked-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br><br></div>I haven't looked at the details, but it's a good idea. Thanks for doing it!<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 6, 2017 at 4:31 AM, Alex Smith <span dir="ltr"><<a href="mailto:asmith@feralinteractive.com" target="_blank">asmith@feralinteractive.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">We have Vulkan utilities in both src/util and src/vulkan/util. The<br>
latter seems a more appropriate place for Vulkan-specific things, so<br>
move them there.<br>
<br>
</span>v2: Android build system changes (from Tapani Pälli)<br>
<span class=""><br>
Signed-off-by: Alex Smith <<a href="mailto:asmith@feralinteractive.com">asmith@feralinteractive.com</a>><br>
---<br>
</span> <a href="http://Android.common.mk" rel="noreferrer" target="_blank">Android.common.mk</a> | 1 +<br>
<span class=""> src/amd/vulkan/radv_device.c | 2 +-<br>
src/amd/vulkan/radv_formats.c | 3 ++-<br>
src/amd/vulkan/radv_private.h | 2 +-<br>
src/amd/vulkan/radv_wsi.c | 2 +-<br>
</span> src/intel/<a href="http://Android.vulkan.mk" rel="noreferrer" target="_blank">Android.vulkan.mk</a> | 1 +<br>
<span class=""> src/intel/vulkan/anv_device.c | 2 +-<br>
src/intel/vulkan/anv_formats.c | 3 +--<br>
src/intel/vulkan/anv_pass.c | 2 +-<br>
src/intel/vulkan/anv_private.h | 2 +-<br>
src/intel/vulkan/anv_queue.c | 2 +-<br>
src/intel/vulkan/anv_wsi.c | 2 +-<br>
src/intel/vulkan/genX_cmd_<wbr>buffer.c | 2 +-<br>
src/util/Makefile.sources | 4 +---<br>
</span> src/vulkan/Android.mk | 2 ++<br>
<span class=""> src/vulkan/Makefile.am | 7 ++++++-<br>
src/vulkan/Makefile.sources | 4 ++++<br>
src/{ => vulkan}/util/vk_alloc.h | 0<br>
src/{ => vulkan}/util/vk_util.h | 0<br>
src/vulkan/wsi/wsi_common.h | 2 +-<br>
src/vulkan/wsi/wsi_common_<wbr>wayland.c | 2 +-<br>
src/vulkan/wsi/wsi_common_x11.<wbr>c | 2 +-<br>
</span> 22 files changed, 30 insertions(+), 19 deletions(-)<br>
<span class=""> rename src/{ => vulkan}/util/vk_alloc.h (100%)<br>
rename src/{ => vulkan}/util/vk_util.h (100%)<br>
<br>
</span>diff --git a/<a href="http://Android.common.mk" rel="noreferrer" target="_blank">Android.common.mk</a> b/<a href="http://Android.common.mk" rel="noreferrer" target="_blank">Android.common.mk</a><br>
index 44ad97b..6bd3081 100644<br>
--- a/<a href="http://Android.common.mk" rel="noreferrer" target="_blank">Android.common.mk</a><br>
+++ b/<a href="http://Android.common.mk" rel="noreferrer" target="_blank">Android.common.mk</a><br>
@@ -37,6 +37,7 @@ LOCAL_CFLAGS += \<br>
-Wno-missing-field-<wbr>initializers \<br>
-Wno-initializer-overrides \<br>
-Wno-mismatched-tags \<br>
+ -DVERSION=\"$(MESA_VERSION)\" \<br>
-DPACKAGE_VERSION=\"$(MESA_<wbr>VERSION)\" \<br>
-DPACKAGE_BUGREPORT=\"<a href="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\" rel="noreferrer" target="_blank">https://<wbr>bugs.freedesktop.org/enter_<wbr>bug.cgi?product=Mesa\</a>"<br>
<div><div class="h5"><br>
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c<br>
index 887916f..a812527 100644<br>
--- a/src/amd/vulkan/radv_device.c<br>
+++ b/src/amd/vulkan/radv_device.c<br>
@@ -33,7 +33,7 @@<br>
#include "radv_cs.h"<br>
#include "util/disk_cache.h"<br>
#include "util/strtod.h"<br>
-#include "util/vk_util.h"<br>
+#include "vk_util.h"<br>
#include <xf86drm.h><br>
#include <amdgpu.h><br>
#include <amdgpu_drm.h><br>
diff --git a/src/amd/vulkan/radv_formats.<wbr>c b/src/amd/vulkan/radv_formats.<wbr>c<br>
index 6cff0a5..b13adb9 100644<br>
--- a/src/amd/vulkan/radv_formats.<wbr>c<br>
+++ b/src/amd/vulkan/radv_formats.<wbr>c<br>
@@ -28,7 +28,8 @@<br>
#include "sid.h"<br>
#include "r600d_common.h"<br>
<br>
-#include "util/vk_util.h"<br>
+#include "vk_util.h"<br>
+<br>
#include "util/u_half.h"<br>
#include "util/format_srgb.h"<br>
#include "util/format_r11g11b10f.h"<br>
diff --git a/src/amd/vulkan/radv_private.<wbr>h b/src/amd/vulkan/radv_private.<wbr>h<br>
index ed80ba7..a3920a7 100644<br>
--- a/src/amd/vulkan/radv_private.<wbr>h<br>
+++ b/src/amd/vulkan/radv_private.<wbr>h<br>
@@ -47,8 +47,8 @@<br>
#include "compiler/shader_enums.h"<br>
#include "util/macros.h"<br>
#include "util/list.h"<br>
-#include "util/vk_alloc.h"<br>
#include "main/macros.h"<br>
+#include "vk_alloc.h"<br>
<br>
#include "radv_radeon_winsys.h"<br>
#include "ac_binary.h"<br>
diff --git a/src/amd/vulkan/radv_wsi.c b/src/amd/vulkan/radv_wsi.c<br>
index 51fe159..cdb04ca 100644<br>
--- a/src/amd/vulkan/radv_wsi.c<br>
+++ b/src/amd/vulkan/radv_wsi.c<br>
@@ -26,7 +26,7 @@<br>
#include "radv_private.h"<br>
#include "radv_meta.h"<br>
#include "wsi_common.h"<br>
-#include "util/vk_util.h"<br>
+#include "vk_util.h"<br>
<br>
static const struct wsi_callbacks wsi_cbs = {<br>
.get_phys_device_format_<wbr>properties = radv_<wbr>GetPhysicalDeviceFormatPropert<wbr>ies,<br>
</div></div>diff --git a/src/intel/<a href="http://Android.vulkan.mk" rel="noreferrer" target="_blank">Android.vulkan.mk</a> b/src/intel/<a href="http://Android.vulkan.mk" rel="noreferrer" target="_blank">Android.vulkan.mk</a><br>
index 2ede3f7..e31c439 100644<br>
--- a/src/intel/<a href="http://Android.vulkan.mk" rel="noreferrer" target="_blank">Android.vulkan.mk</a><br>
+++ b/src/intel/<a href="http://Android.vulkan.mk" rel="noreferrer" target="_blank">Android.vulkan.mk</a><br>
@@ -31,6 +31,7 @@ VULKAN_COMMON_INCLUDES := \<br>
$(MESA_TOP)/src/gallium/<wbr>include \<br>
$(MESA_TOP)/src/mesa \<br>
$(MESA_TOP)/src/vulkan/wsi \<br>
+ $(MESA_TOP)/src/vulkan/util \<br>
$(MESA_TOP)/src/intel \<br>
$(MESA_TOP)/src/intel/vulkan<br>
<div><div class="h5"><br>
diff --git a/src/intel/vulkan/anv_device.<wbr>c b/src/intel/vulkan/anv_device.<wbr>c<br>
index aacd07f..6079588 100644<br>
--- a/src/intel/vulkan/anv_device.<wbr>c<br>
+++ b/src/intel/vulkan/anv_device.<wbr>c<br>
@@ -35,7 +35,7 @@<br>
#include "util/debug.h"<br>
#include "util/build_id.h"<br>
#include "util/mesa-sha1.h"<br>
-#include "util/vk_util.h"<br>
+#include "vk_util.h"<br>
<br>
#include "genxml/gen7_pack.h"<br>
<br>
diff --git a/src/intel/vulkan/anv_<wbr>formats.c b/src/intel/vulkan/anv_<wbr>formats.c<br>
index 25801e8..104d4f7 100644<br>
--- a/src/intel/vulkan/anv_<wbr>formats.c<br>
+++ b/src/intel/vulkan/anv_<wbr>formats.c<br>
@@ -23,8 +23,7 @@<br>
<br>
#include "anv_private.h"<br>
#include "vk_format_info.h"<br>
-<br>
-#include "util/vk_util.h"<br>
+#include "vk_util.h"<br>
<br>
/*<br>
* gcc-4 and earlier don't allow compound literals where a constant<br>
diff --git a/src/intel/vulkan/anv_pass.c b/src/intel/vulkan/anv_pass.c<br>
index 93f1483..1b30c14 100644<br>
--- a/src/intel/vulkan/anv_pass.c<br>
+++ b/src/intel/vulkan/anv_pass.c<br>
@@ -23,7 +23,7 @@<br>
<br>
#include "anv_private.h"<br>
<br>
-#include "util/vk_util.h"<br>
+#include "vk_util.h"<br>
<br>
static unsigned<br>
num_subpass_attachments(const VkSubpassDescription *desc)<br>
diff --git a/src/intel/vulkan/anv_<wbr>private.h b/src/intel/vulkan/anv_<wbr>private.h<br>
index c261faa..fe6ac3b 100644<br>
--- a/src/intel/vulkan/anv_<wbr>private.h<br>
+++ b/src/intel/vulkan/anv_<wbr>private.h<br>
@@ -47,7 +47,7 @@<br>
#include "util/macros.h"<br>
#include "util/list.h"<br>
#include "util/u_vector.h"<br>
-#include "util/vk_alloc.h"<br>
+#include "vk_alloc.h"<br>
<br>
/* Pre-declarations needed for WSI entrypoints */<br>
struct wl_surface;<br>
diff --git a/src/intel/vulkan/anv_queue.c b/src/intel/vulkan/anv_queue.c<br>
index be7fd31..fd4d362 100644<br>
--- a/src/intel/vulkan/anv_queue.c<br>
+++ b/src/intel/vulkan/anv_queue.c<br>
@@ -30,7 +30,7 @@<br>
#include <sys/eventfd.h><br>
<br>
#include "anv_private.h"<br>
-#include "util/vk_util.h"<br>
+#include "vk_util.h"<br>
<br>
#include "genxml/gen7_pack.h"<br>
<br>
diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c<br>
index 7575f58..9369f26 100644<br>
--- a/src/intel/vulkan/anv_wsi.c<br>
+++ b/src/intel/vulkan/anv_wsi.c<br>
@@ -24,7 +24,7 @@<br>
#include "anv_private.h"<br>
#include "wsi_common.h"<br>
#include "vk_format_info.h"<br>
-#include "util/vk_util.h"<br>
+#include "vk_util.h"<br>
<br>
#ifdef VK_USE_PLATFORM_WAYLAND_KHR<br>
static const struct wsi_callbacks wsi_cbs = {<br>
diff --git a/src/intel/vulkan/genX_cmd_<wbr>buffer.c b/src/intel/vulkan/genX_cmd_<wbr>buffer.c<br>
index 072d0d5..59430a2 100644<br>
--- a/src/intel/vulkan/genX_cmd_<wbr>buffer.c<br>
+++ b/src/intel/vulkan/genX_cmd_<wbr>buffer.c<br>
@@ -26,7 +26,7 @@<br>
<br>
#include "anv_private.h"<br>
#include "vk_format_info.h"<br>
-#include "util/vk_util.h"<br>
+#include "vk_util.h"<br>
<br>
#include "common/gen_l3_config.h"<br>
#include "genxml/gen_macros.h"<br>
diff --git a/src/util/Makefile.sources b/src/util/Makefile.sources<br>
index e905734..e9f820a 100644<br>
--- a/src/util/Makefile.sources<br>
+++ b/src/util/Makefile.sources<br>
@@ -51,9 +51,7 @@ MESA_UTIL_FILES := \<br>
u_string.h \<br>
u_thread.h \<br>
u_vector.c \<br>
- u_vector.h \<br>
- vk_alloc.h \<br>
- vk_util.h<br>
+ u_vector.h<br>
<br>
MESA_UTIL_GENERATED_FILES = \<br>
format_srgb.c<br>
</div></div>diff --git a/src/vulkan/Android.mk b/src/vulkan/Android.mk<br>
index 7653f34..8eb42ec 100644<br>
--- a/src/vulkan/Android.mk<br>
+++ b/src/vulkan/Android.mk<br>
@@ -41,6 +41,8 @@ LOCAL_C_INCLUDES := \<br>
LOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/, \<br>
$(VULKAN_UTIL_GENERATED_FILES)<wbr>)<br>
<br>
+LOCAL_SRC_FILES := $(VULKAN_UTIL_FILES))<br>
+<br>
vulkan_api_xml = $(MESA_TOP)/src/vulkan/<wbr>registry/vk.xml<br>
<br>
$(LOCAL_GENERATED_SOURCES): $(MESA_TOP)/src/vulkan/util/<wbr>gen_enum_to_str.py $(vulkan_api_xml)<br>
<div class="HOEnZb"><div class="h5">diff --git a/src/vulkan/Makefile.am b/src/vulkan/Makefile.am<br>
index 71fb2d9..c897a07 100644<br>
--- a/src/vulkan/Makefile.am<br>
+++ b/src/vulkan/Makefile.am<br>
@@ -11,6 +11,10 @@ PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)<br>
EXTRA_DIST = \<br>
util/gen_enum_to_str.py<br>
<br>
+VULKAN_UTIL_SOURCES = \<br>
+ $(VULKAN_UTIL_FILES) \<br>
+ $(VULKAN_UTIL_GENERATED_FILES)<br>
+<br>
BUILT_SOURCES = \<br>
$(VULKAN_UTIL_GENERATED_FILES)<br>
<br>
@@ -18,12 +22,13 @@ util/vk_enum_to_str.c util/vk_enum_to_str.h: util/gen_enum_to_str.py $(vulkan_ap<br>
$(MKDIR_GEN)<br>
$(PYTHON_GEN) $(srcdir)/util/gen_enum_to_<wbr>str.py --xml $(vulkan_api_xml) --outdir $(top_builddir)/src/vulkan/<wbr>util<br>
<br>
-libvulkan_util_la_SOURCES = $(VULKAN_UTIL_GENERATED_FILES)<br>
+libvulkan_util_la_SOURCES = $(VULKAN_UTIL_SOURCES)<br>
<br>
AM_CPPFLAGS = \<br>
$(DEFINES) \<br>
-I$(top_srcdir)/include \<br>
-I$(top_srcdir)/src \<br>
+ -I$(top_srcdir)/src/vulkan/<wbr>util \<br>
-I$(top_srcdir)/src/gallium/<wbr>auxiliary \<br>
-I$(top_srcdir)/src/gallium/<wbr>include<br>
<br>
diff --git a/src/vulkan/Makefile.sources b/src/vulkan/Makefile.sources<br>
index 63f4ac1..9962c1b 100644<br>
--- a/src/vulkan/Makefile.sources<br>
+++ b/src/vulkan/Makefile.sources<br>
@@ -15,6 +15,10 @@ VULKAN_WSI_X11_FILES := \<br>
wsi/wsi_common_x11.c \<br>
wsi/wsi_common_x11.h<br>
<br>
+VULKAN_UTIL_FILES := \<br>
+ util/vk_alloc.h \<br>
+ util/vk_util.h<br>
+<br>
VULKAN_UTIL_GENERATED_FILES := \<br>
util/vk_enum_to_str.c \<br>
util/vk_enum_to_str.h<br>
diff --git a/src/util/vk_alloc.h b/src/vulkan/util/vk_alloc.h<br>
similarity index 100%<br>
rename from src/util/vk_alloc.h<br>
rename to src/vulkan/util/vk_alloc.h<br>
diff --git a/src/util/vk_util.h b/src/vulkan/util/vk_util.h<br>
similarity index 100%<br>
rename from src/util/vk_util.h<br>
rename to src/vulkan/util/vk_util.h<br>
diff --git a/src/vulkan/wsi/wsi_common.h b/src/vulkan/wsi/wsi_common.h<br>
index 8aee9c7..8166b7d 100644<br>
--- a/src/vulkan/wsi/wsi_common.h<br>
+++ b/src/vulkan/wsi/wsi_common.h<br>
@@ -26,7 +26,7 @@<br>
#include <stdint.h><br>
#include <stdbool.h><br>
<br>
-#include "util/vk_alloc.h"<br>
+#include "vk_alloc.h"<br>
#include <vulkan/vulkan.h><br>
#include <vulkan/vk_icd.h><br>
<br>
diff --git a/src/vulkan/wsi/wsi_common_<wbr>wayland.c b/src/vulkan/wsi/wsi_common_<wbr>wayland.c<br>
index 644ed62..dd283a1 100644<br>
--- a/src/vulkan/wsi/wsi_common_<wbr>wayland.c<br>
+++ b/src/vulkan/wsi/wsi_common_<wbr>wayland.c<br>
@@ -31,7 +31,7 @@<br>
#include <string.h><br>
#include <pthread.h><br>
<br>
-#include "util/vk_util.h"<br>
+#include "vk_util.h"<br>
#include "wsi_common_wayland.h"<br>
#include "wayland-drm-client-protocol.<wbr>h"<br>
<br>
diff --git a/src/vulkan/wsi/wsi_common_<wbr>x11.c b/src/vulkan/wsi/wsi_common_<wbr>x11.c<br>
index 5be56f1..ecdaf91 100644<br>
--- a/src/vulkan/wsi/wsi_common_<wbr>x11.c<br>
+++ b/src/vulkan/wsi/wsi_common_<wbr>x11.c<br>
@@ -38,7 +38,7 @@<br>
#include <xf86drm.h><br>
#include "util/hash_table.h"<br>
<br>
-#include "util/vk_util.h"<br>
+#include "vk_util.h"<br>
#include "wsi_common.h"<br>
#include "wsi_common_x11.h"<br>
#include "wsi_common_queue.h"<br>
--<br>
2.9.4<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</div></div></blockquote></div><br></div>