On Wed, Jun 28, 2017 at 1:18 PM, Eric Anholt <[email protected]> wrote: > I really liked this idea, as it should help with management of packet > parsing tools like the CL dump. The python script is forked off of theirs > because our packets are byte-based instead of dwords, and the changes to > do so while avoiding performance regressions due to unaligned accesses > were quite invasive. > --- > > I'm hoping for an ack from Jason or Kenneth on the genxml script fork > to the new location, and an Android test from Rob. Full branch using > the XML stuff is at vc4-xml of my Mesa tree. > > Android.mk | 1 + > configure.ac | 1 + > src/Makefile.am | 4 + > src/broadcom/.gitignore | 1 + > .../Android.genxml.mk} | 43 +- > src/{intel => broadcom}/Android.mk | 5 - > src/{amd => broadcom}/Makefile.am | 22 +- > .../Makefile.genxml.am} | 18 +- > src/broadcom/Makefile.sources | 12 + > src/broadcom/cle/gen_pack_header.py | 547 > +++++++++++++++++++++ > src/broadcom/cle/v3d_packet_helpers.h | 189 +++++++ > src/broadcom/cle/v3d_packet_v21.xml | 220 +++++++++ > src/gallium/drivers/vc4/Android.mk | 5 +- > 13 files changed, 1035 insertions(+), 33 deletions(-) > create mode 100644 src/broadcom/.gitignore > copy src/{mesa/Android.libmesa_git_sha1.mk => broadcom/Android.genxml.mk} > (60%) > copy src/{intel => broadcom}/Android.mk (86%) > copy src/{amd => broadcom}/Makefile.am (75%) > copy src/{intel/Makefile.common.am => broadcom/Makefile.genxml.am} (74%) > create mode 100644 src/broadcom/Makefile.sources > create mode 100644 src/broadcom/cle/gen_pack_header.py > create mode 100644 src/broadcom/cle/v3d_packet_helpers.h > create mode 100644 src/broadcom/cle/v3d_packet_v21.xml > > diff --git a/Android.mk b/Android.mk > index 418570e607bb..9203c87a4e35 100644 > --- a/Android.mk > +++ b/Android.mk > @@ -112,6 +112,7 @@ SUBDIRS := \ > src/util \ > src/egl \ > src/amd \ > + src/broadcom \ > src/intel \ > src/mesa/drivers/dri \ > src/vulkan > diff --git a/configure.ac b/configure.ac > index c9dc51bc0d86..cb5d6683afe6 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -2734,6 +2734,7 @@ AC_CONFIG_FILES([Makefile > src/Makefile > src/amd/Makefile > src/amd/vulkan/Makefile > + src/broadcom/Makefile > src/compiler/Makefile > src/egl/Makefile > src/egl/main/egl.pc > diff --git a/src/Makefile.am b/src/Makefile.am > index df912c442af1..1f18cb65699a 100644 > --- a/src/Makefile.am > +++ b/src/Makefile.am > @@ -93,6 +93,10 @@ if HAVE_INTEL_DRIVERS > SUBDIRS += intel > endif > > +if HAVE_GALLIUM_VC4 > +SUBDIRS += broadcom > +endif > + > if NEED_OPENGL_COMMON > SUBDIRS += mesa > endif > diff --git a/src/broadcom/.gitignore b/src/broadcom/.gitignore > new file mode 100644 > index 000000000000..fcc603f0cf01 > --- /dev/null > +++ b/src/broadcom/.gitignore > @@ -0,0 +1 @@ > +cle/*_pack.h > diff --git a/src/mesa/Android.libmesa_git_sha1.mk > b/src/broadcom/Android.genxml.mk > similarity index 60% > copy from src/mesa/Android.libmesa_git_sha1.mk > copy to src/broadcom/Android.genxml.mk
This is a strange diff. > index 0fd176bf7d5d..461efd61085f 100644 > --- a/src/mesa/Android.libmesa_git_sha1.mk > +++ b/src/broadcom/Android.genxml.mk > @@ -1,6 +1,5 @@ > -# Mesa 3-D graphics library > -# > -# Copyright (C) 2017 Mauro Rossi <[email protected]> > +# Copyright © 2016 Intel Corporation > +# Copyright © 2016 Mauro Rossi <[email protected]> > # > # Permission is hereby granted, free of charge, to any person obtaining a > # copy of this software and associated documentation files (the "Software"), > @@ -19,18 +18,18 @@ > # 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. > +# > > -# ---------------------------------------------------------------------- > -# libmesa_git_sha1 > -# ---------------------------------------------------------------------- > - > -LOCAL_PATH := $(call my-dir) > +# --------------------------------------- > +# Build libmesa_genxml > +# --------------------------------------- > > include $(CLEAR_VARS) > > -LOCAL_MODULE := libmesa_git_sha1 > +LOCAL_MODULE := libmesa_broadcom_genxml > > LOCAL_MODULE_CLASS := STATIC_LIBRARIES > + > intermediates := $(call local-generated-sources-dir) > > # dummy.c source file is generated to meet the build system's rules. > @@ -41,19 +40,23 @@ $(intermediates)/dummy.c: > @echo "Gen Dummy: $(PRIVATE_MODULE) <= $(notdir $(@))" > $(hide) touch $@ > > -LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, git_sha1.h) > +# This is the list of auto-generated files headers > +LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, > $(BROADCOM_GENXML_GENERATED_FILES)) > > -$(intermediates)/git_sha1.h: $(wildcard $(MESA_TOP)/.git/logs/HEAD) > +define header-gen > @mkdir -p $(dir $@) > - @echo "GIT-SHA1: $(PRIVATE_MODULE) <= git" > - $(hide) touch $@ > - $(hide) if which git > /dev/null; then \ > - git --git-dir $(MESA_TOP)/.git log -n 1 --oneline | \ > - sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' > \ > - > $@; \ > - fi > - > -LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates) > + @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))" > + $(hide) $(PRIVATE_SCRIPT) $(PRIVATE_SCRIPT_FLAGS) $(PRIVATE_XML) > $@ > +endef > + > +$(intermediates)/genxml/v3d_packet_v21_pack.h: PRIVATE_SCRIPT := > $(MESA_PYTHON2) $(LOCAL_PATH)/cle/gen_pack_header.py > +$(intermediates)/genxml/v3d_packet_v21_pack.h: PRIVATE_XML := > $(LOCAL_PATH)/cle/v3d_packet_v21.xml > +$(intermediates)/genxml/v3d_packet_v21_pack.h: > $(LOCAL_PATH)/cle/v3d_packet_v21.xml $(LOCAL_PATH)/cle/gen_pack_header.py As Emil pointed out: s/genxml/cle/ With that, it builds fine on Android at least. Tested-by: Rob Herring <[email protected]> Rob _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
