From f6d95876888c81559d4ba773e4e6c82b184e708e Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 18 Feb 2016 10:19:02 -0800 Subject: [PATCH] vulkan: Move XML and generator into src/intel/genxml --- configure.ac | 2 ++ src/Makefile.am | 1 + src/intel/Makefile.am | 22 +++++++++++++ src/intel/genxml/.gitignore | 1 + src/intel/genxml/Makefile.am | 31 +++++++++++++++++++ src/{vulkan => intel/genxml}/gen7.xml | 0 src/{vulkan => intel/genxml}/gen75.xml | 0 src/{vulkan => intel/genxml}/gen8.xml | 0 src/{vulkan => intel/genxml}/gen9.xml | 0 .../genxml}/gen_pack_header.py | 0 src/vulkan/Makefile.am | 10 ++---- src/vulkan/anv_batch_chain.c | 4 +-- src/vulkan/anv_device.c | 2 +- src/vulkan/anv_formats.c | 2 -- src/vulkan/gen7_cmd_buffer.c | 4 +-- src/vulkan/gen7_pipeline.c | 4 +-- src/vulkan/gen7_state.c | 4 +-- src/vulkan/gen8_cmd_buffer.c | 4 +-- src/vulkan/gen8_pipeline.c | 4 +-- src/vulkan/gen8_state.c | 4 +-- src/vulkan/genX_cmd_buffer.c | 8 ++--- src/vulkan/genX_pipeline.c | 8 ++--- 22 files changed, 82 insertions(+), 33 deletions(-) create mode 100644 src/intel/Makefile.am create mode 100644 src/intel/genxml/.gitignore create mode 100644 src/intel/genxml/Makefile.am rename src/{vulkan => intel/genxml}/gen7.xml (100%) rename src/{vulkan => intel/genxml}/gen75.xml (100%) rename src/{vulkan => intel/genxml}/gen8.xml (100%) rename src/{vulkan => intel/genxml}/gen9.xml (100%) rename src/{vulkan => intel/genxml}/gen_pack_header.py (100%) diff --git a/configure.ac b/configure.ac index 71bec624121..d6692b73ff1 100644 --- a/configure.ac +++ b/configure.ac @@ -2518,6 +2518,8 @@ AC_CONFIG_FILES([Makefile src/glx/apple/Makefile src/glx/tests/Makefile src/gtest/Makefile + src/intel/Makefile + src/intel/genxml/Makefile src/isl/Makefile src/loader/Makefile src/mapi/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index 272e68ce875..25b48c65009 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -57,6 +57,7 @@ AM_CFLAGS = $(VISIBILITY_CFLAGS) AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS) if HAVE_VULKAN +SUBDIRS += intel SUBDIRS += isl SUBDIRS += vulkan endif diff --git a/src/intel/Makefile.am b/src/intel/Makefile.am new file mode 100644 index 00000000000..0a6f411c7ba --- /dev/null +++ b/src/intel/Makefile.am @@ -0,0 +1,22 @@ +# Copyright © 2016 Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. + +SUBDIRS = genxml diff --git a/src/intel/genxml/.gitignore b/src/intel/genxml/.gitignore new file mode 100644 index 00000000000..dd114953c31 --- /dev/null +++ b/src/intel/genxml/.gitignore @@ -0,0 +1 @@ +gen*_pack.h diff --git a/src/intel/genxml/Makefile.am b/src/intel/genxml/Makefile.am new file mode 100644 index 00000000000..36ba526c154 --- /dev/null +++ b/src/intel/genxml/Makefile.am @@ -0,0 +1,31 @@ +# Copyright © 2016 Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. + +BUILT_SOURCES = \ + gen7_pack.h \ + gen75_pack.h \ + gen8_pack.h \ + gen9_pack.h + +%_pack.h : %.xml gen_pack_header.py + $(AM_V_GEN) $(srcdir)/gen_pack_header.py $< > $@ + +CLEANFILES = $(BUILT_SOURCES) diff --git a/src/vulkan/gen7.xml b/src/intel/genxml/gen7.xml similarity index 100% rename from src/vulkan/gen7.xml rename to src/intel/genxml/gen7.xml diff --git a/src/vulkan/gen75.xml b/src/intel/genxml/gen75.xml similarity index 100% rename from src/vulkan/gen75.xml rename to src/intel/genxml/gen75.xml diff --git a/src/vulkan/gen8.xml b/src/intel/genxml/gen8.xml similarity index 100% rename from src/vulkan/gen8.xml rename to src/intel/genxml/gen8.xml diff --git a/src/vulkan/gen9.xml b/src/intel/genxml/gen9.xml similarity index 100% rename from src/vulkan/gen9.xml rename to src/intel/genxml/gen9.xml diff --git a/src/vulkan/gen_pack_header.py b/src/intel/genxml/gen_pack_header.py similarity index 100% rename from src/vulkan/gen_pack_header.py rename to src/intel/genxml/gen_pack_header.py diff --git a/src/vulkan/Makefile.am b/src/vulkan/Makefile.am index 220bdbf5cec..50d972e6c7e 100644 --- a/src/vulkan/Makefile.am +++ b/src/vulkan/Makefile.am @@ -61,6 +61,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/mesa/drivers/dri/i965 \ -I$(top_srcdir)/src/gallium/auxiliary \ -I$(top_srcdir)/src/gallium/include \ + -I$(top_srcdir)/src/intel/ \ -I$(top_srcdir)/src/isl/ \ -I$(top_builddir)/src \ -I$(top_builddir)/src/compiler \ @@ -99,11 +100,7 @@ VULKAN_SOURCES = \ BUILT_SOURCES = \ anv_entrypoints.h \ - anv_entrypoints.c \ - gen7_pack.h \ - gen75_pack.h \ - gen8_pack.h \ - gen9_pack.h + anv_entrypoints.c libanv_gen7_la_SOURCES = \ genX_cmd_buffer.c \ @@ -165,9 +162,6 @@ anv_entrypoints.h : anv_entrypoints_gen.py $(vulkan_include_HEADERS) anv_entrypoints.c : anv_entrypoints_gen.py $(vulkan_include_HEADERS) $(AM_V_GEN) cat $(vulkan_include_HEADERS) | $(CPP) $(VULKAN_ENTRYPOINT_CPPFLAGS) - | $(PYTHON2) $< code > $@ -%_pack.h : %.xml gen_pack_header.py - $(AM_V_GEN) $(srcdir)/gen_pack_header.py $< > $@ - CLEANFILES = $(BUILT_SOURCES) libvulkan_intel_la_LIBADD = $(WAYLAND_LIBS) -lxcb -lxcb-dri3 \ diff --git a/src/vulkan/anv_batch_chain.c b/src/vulkan/anv_batch_chain.c index a050fa05c8e..d24dd06d7eb 100644 --- a/src/vulkan/anv_batch_chain.c +++ b/src/vulkan/anv_batch_chain.c @@ -29,8 +29,8 @@ #include "anv_private.h" -#include "gen7_pack.h" -#include "gen8_pack.h" +#include "genxml/gen7_pack.h" +#include "genxml/gen8_pack.h" /** \file anv_batch_chain.c * diff --git a/src/vulkan/anv_device.c b/src/vulkan/anv_device.c index c3a370b0542..a8835f74179 100644 --- a/src/vulkan/anv_device.c +++ b/src/vulkan/anv_device.c @@ -32,7 +32,7 @@ #include "util/strtod.h" #include "util/debug.h" -#include "gen7_pack.h" +#include "genxml/gen7_pack.h" struct anv_dispatch_table dtable; diff --git a/src/vulkan/anv_formats.c b/src/vulkan/anv_formats.c index 09cd8b9ddf9..7798a7bbde3 100644 --- a/src/vulkan/anv_formats.c +++ b/src/vulkan/anv_formats.c @@ -24,8 +24,6 @@ #include "anv_private.h" #include "brw_surface_formats.h" -#include "gen7_pack.h" - #define RGBA ((struct anv_format_swizzle) { 0, 1, 2, 3 }) #define BGRA ((struct anv_format_swizzle) { 2, 1, 0, 3 }) diff --git a/src/vulkan/gen7_cmd_buffer.c b/src/vulkan/gen7_cmd_buffer.c index 7c12394b088..23327ec0724 100644 --- a/src/vulkan/gen7_cmd_buffer.c +++ b/src/vulkan/gen7_cmd_buffer.c @@ -29,8 +29,8 @@ #include "anv_private.h" -#include "gen7_pack.h" -#include "gen75_pack.h" +#include "genxml/gen7_pack.h" +#include "genxml/gen75_pack.h" static uint32_t cmd_buffer_flush_push_constants(struct anv_cmd_buffer *cmd_buffer) diff --git a/src/vulkan/gen7_pipeline.c b/src/vulkan/gen7_pipeline.c index c4f7a369598..7c054fa56d5 100644 --- a/src/vulkan/gen7_pipeline.c +++ b/src/vulkan/gen7_pipeline.c @@ -29,8 +29,8 @@ #include "anv_private.h" -#include "gen7_pack.h" -#include "gen75_pack.h" +#include "genxml/gen7_pack.h" +#include "genxml/gen75_pack.h" #include "genX_pipeline_util.h" diff --git a/src/vulkan/gen7_state.c b/src/vulkan/gen7_state.c index 0f66a5056c7..77bdb75260c 100644 --- a/src/vulkan/gen7_state.c +++ b/src/vulkan/gen7_state.c @@ -29,8 +29,8 @@ #include "anv_private.h" -#include "gen7_pack.h" -#include "gen75_pack.h" +#include "genxml/gen7_pack.h" +#include "genxml/gen75_pack.h" #include "genX_state_util.h" diff --git a/src/vulkan/gen8_cmd_buffer.c b/src/vulkan/gen8_cmd_buffer.c index 5ca6f6978c9..b741612c891 100644 --- a/src/vulkan/gen8_cmd_buffer.c +++ b/src/vulkan/gen8_cmd_buffer.c @@ -29,8 +29,8 @@ #include "anv_private.h" -#include "gen8_pack.h" -#include "gen9_pack.h" +#include "genxml/gen8_pack.h" +#include "genxml/gen9_pack.h" static uint32_t cmd_buffer_flush_push_constants(struct anv_cmd_buffer *cmd_buffer) diff --git a/src/vulkan/gen8_pipeline.c b/src/vulkan/gen8_pipeline.c index eec3f7aafdd..f0411562fba 100644 --- a/src/vulkan/gen8_pipeline.c +++ b/src/vulkan/gen8_pipeline.c @@ -29,8 +29,8 @@ #include "anv_private.h" -#include "gen8_pack.h" -#include "gen9_pack.h" +#include "genxml/gen8_pack.h" +#include "genxml/gen9_pack.h" #include "genX_pipeline_util.h" diff --git a/src/vulkan/gen8_state.c b/src/vulkan/gen8_state.c index 45b8080d0bf..04cfff5444d 100644 --- a/src/vulkan/gen8_state.c +++ b/src/vulkan/gen8_state.c @@ -29,8 +29,8 @@ #include "anv_private.h" -#include "gen8_pack.h" -#include "gen9_pack.h" +#include "genxml/gen8_pack.h" +#include "genxml/gen9_pack.h" #include "genX_state_util.h" diff --git a/src/vulkan/genX_cmd_buffer.c b/src/vulkan/genX_cmd_buffer.c index e25a20b3d7a..5498d1d68c6 100644 --- a/src/vulkan/genX_cmd_buffer.c +++ b/src/vulkan/genX_cmd_buffer.c @@ -27,13 +27,13 @@ #include "anv_private.h" #if (ANV_GEN == 9) -# include "gen9_pack.h" +# include "genxml/gen9_pack.h" #elif (ANV_GEN == 8) -# include "gen8_pack.h" +# include "genxml/gen8_pack.h" #elif (ANV_IS_HASWELL) -# include "gen75_pack.h" +# include "genxml/gen75_pack.h" #elif (ANV_GEN == 7) -# include "gen7_pack.h" +# include "genxml/gen7_pack.h" #endif void diff --git a/src/vulkan/genX_pipeline.c b/src/vulkan/genX_pipeline.c index b62e401c4ee..4c2e0bc6e0d 100644 --- a/src/vulkan/genX_pipeline.c +++ b/src/vulkan/genX_pipeline.c @@ -24,13 +24,13 @@ #include "anv_private.h" #if (ANV_GEN == 9) -# include "gen9_pack.h" +# include "genxml/gen9_pack.h" #elif (ANV_GEN == 8) -# include "gen8_pack.h" +# include "genxml/gen8_pack.h" #elif (ANV_IS_HASWELL) -# include "gen75_pack.h" +# include "genxml/gen75_pack.h" #elif (ANV_GEN == 7) -# include "gen7_pack.h" +# include "genxml/gen7_pack.h" #endif VkResult -- 2.30.2