[Mesa-dev] [PATCH v2 1/6] vulkan/util: Move vk_format from amd/vulkan to vulkan/util

alexandros.frantzis at collabora.com alexandros.frantzis at collabora.com
Wed Jul 12 10:16:01 UTC 2017


From: Alexandros Frantzis <alexandros.frantzis at collabora.com>

Move vk_format utilities to a more accessible location, to allow other
vulkan code to use it.
---
 src/amd/vulkan/Makefile.am                           | 10 +---------
 src/amd/vulkan/Makefile.sources                      |  2 --
 src/vulkan/Makefile.am                               | 10 +++++++++-
 src/vulkan/Makefile.sources                          |  4 +++-
 src/{amd/vulkan => vulkan/util}/vk_format.h          |  0
 src/{amd/vulkan => vulkan/util}/vk_format_layout.csv |  0
 src/{amd/vulkan => vulkan/util}/vk_format_parse.py   |  0
 src/{amd/vulkan => vulkan/util}/vk_format_table.py   |  0
 8 files changed, 13 insertions(+), 13 deletions(-)
 rename src/{amd/vulkan => vulkan/util}/vk_format.h (100%)
 rename src/{amd/vulkan => vulkan/util}/vk_format_layout.csv (100%)
 rename src/{amd/vulkan => vulkan/util}/vk_format_parse.py (100%)
 rename src/{amd/vulkan => vulkan/util}/vk_format_table.py (100%)

diff --git a/src/amd/vulkan/Makefile.am b/src/amd/vulkan/Makefile.am
index a645432e74..69ebf44811 100644
--- a/src/amd/vulkan/Makefile.am
+++ b/src/amd/vulkan/Makefile.am
@@ -115,21 +115,13 @@ radv_entrypoints.c : radv_entrypoints_gen.py $(vulkan_api_xml)
 	$(AM_V_GEN) cat $(vulkan_api_xml) |\
 	$(PYTHON2) $(srcdir)/radv_entrypoints_gen.py code > $@
 
-vk_format_table.c: vk_format_table.py \
-		   vk_format_parse.py \
-                   vk_format_layout.csv
-	$(PYTHON2) $(srcdir)/vk_format_table.py $(srcdir)/vk_format_layout.csv > $@
-
 BUILT_SOURCES = $(VULKAN_GENERATED_FILES)
 CLEANFILES = $(BUILT_SOURCES) dev_icd.json radeon_icd. at host_cpu@.json
 EXTRA_DIST = \
 	$(top_srcdir)/include/vulkan/vk_icd.h \
 	dev_icd.json.in \
 	radeon_icd.json.in \
-	radv_entrypoints_gen.py \
-	vk_format_layout.csv \
-	vk_format_parse.py \
-	vk_format_table.py
+	radv_entrypoints_gen.py
 
 libvulkan_radeon_la_LIBADD = $(VULKAN_LIB_DEPS)
 
diff --git a/src/amd/vulkan/Makefile.sources b/src/amd/vulkan/Makefile.sources
index d3e0c81e9a..c84c03356d 100644
--- a/src/amd/vulkan/Makefile.sources
+++ b/src/amd/vulkan/Makefile.sources
@@ -62,8 +62,6 @@ VULKAN_FILES := \
 	radv_util.h \
 	radv_wsi.c \
 	si_cmd_buffer.c \
-	vk_format_table.c \
-	vk_format.h \
 	$(RADV_WS_AMDGPU_FILES)
 
 VULKAN_WSI_WAYLAND_FILES := \
diff --git a/src/vulkan/Makefile.am b/src/vulkan/Makefile.am
index c897a07d6a..4c96e353eb 100644
--- a/src/vulkan/Makefile.am
+++ b/src/vulkan/Makefile.am
@@ -9,7 +9,10 @@ MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
 PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
 
 EXTRA_DIST = \
-	util/gen_enum_to_str.py
+	util/gen_enum_to_str.py \
+	util/vk_format_layout.csv \
+	util/vk_format_parse.py \
+	util/vk_format_table.py
 
 VULKAN_UTIL_SOURCES = \
 	$(VULKAN_UTIL_FILES) \
@@ -22,6 +25,11 @@ 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
 
+util/vk_format_table.c: util/vk_format_table.py \
+                        util/vk_format_parse.py \
+                        util/vk_format_layout.csv
+	$(PYTHON2) $(srcdir)/util/vk_format_table.py $(srcdir)/util/vk_format_layout.csv > $@
+
 libvulkan_util_la_SOURCES = $(VULKAN_UTIL_SOURCES)
 
 AM_CPPFLAGS = \
diff --git a/src/vulkan/Makefile.sources b/src/vulkan/Makefile.sources
index 2cf7218e92..526b382e32 100644
--- a/src/vulkan/Makefile.sources
+++ b/src/vulkan/Makefile.sources
@@ -17,9 +17,11 @@ VULKAN_WSI_X11_FILES := \
 
 VULKAN_UTIL_FILES := \
 	util/vk_alloc.h \
+	util/vk_format.h \
 	util/vk_util.c \
 	util/vk_util.h
 
 VULKAN_UTIL_GENERATED_FILES := \
 	util/vk_enum_to_str.c \
-	util/vk_enum_to_str.h
+	util/vk_enum_to_str.h \
+	util/vk_format_table.c
diff --git a/src/amd/vulkan/vk_format.h b/src/vulkan/util/vk_format.h
similarity index 100%
rename from src/amd/vulkan/vk_format.h
rename to src/vulkan/util/vk_format.h
diff --git a/src/amd/vulkan/vk_format_layout.csv b/src/vulkan/util/vk_format_layout.csv
similarity index 100%
rename from src/amd/vulkan/vk_format_layout.csv
rename to src/vulkan/util/vk_format_layout.csv
diff --git a/src/amd/vulkan/vk_format_parse.py b/src/vulkan/util/vk_format_parse.py
similarity index 100%
rename from src/amd/vulkan/vk_format_parse.py
rename to src/vulkan/util/vk_format_parse.py
diff --git a/src/amd/vulkan/vk_format_table.py b/src/vulkan/util/vk_format_table.py
similarity index 100%
rename from src/amd/vulkan/vk_format_table.py
rename to src/vulkan/util/vk_format_table.py
-- 
2.13.2



More information about the mesa-dev mailing list