Re: [Mesa-dev] [PATCH] vc4: Introduce XML-based packet header generation like Intel's.
On Wed, Jun 28, 2017 at 1:18 PM, Eric Anholtwrote: > 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 ..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 > +# Copyright © 2016 Intel Corporation > +# Copyright © 2016 Mauro Rossi > # > # 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
Re: [Mesa-dev] [PATCH] vc4: Introduce XML-based packet header generation like Intel's.
Kenneth Graunkewrites: > [ Unknown signature status ] > On Wednesday, June 28, 2017 11:18:40 AM PDT Eric Anholt 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 > > Neat! I think it would be nice to standardize on a schema for the XML > files, if only so things stay a bit more familiar across drivers. It > might allow us to share some tools too...but I'm not sure how realistic > that is, either. We can always do that later. > > You should rip off the INTEL_DEBUG=bat code as well. :) > > Acked-by: Kenneth Graunke I had just done basic code-generation that unpacks from the packed field, and code-generation that printfs an unpacked struct. With that, I had to add just a bit of glue for switching over the set of packets and recording addresses out of structs. do_batch_dump() looks *so* much nicer, though. Hmm. signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] vc4: Introduce XML-based packet header generation like Intel's.
On Wednesday, June 28, 2017 11:18:40 AM PDT Eric Anholt 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 Neat! I think it would be nice to standardize on a schema for the XML files, if only so things stay a bit more familiar across drivers. It might allow us to share some tools too...but I'm not sure how realistic that is, either. We can always do that later. You should rip off the INTEL_DEBUG=bat code as well. :) Acked-by: Kenneth Graunkesignature.asc Description: This is a digitally signed message part. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] vc4: Introduce XML-based packet header generation like Intel's.
On Wed, Jun 28, 2017 at 11:18 AM, Eric Anholtwrote: > 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. > Fine with me. One day, it'd be neat if we could recombine but a fork seems like a good initial plan to me. Acked-by: Jason Ekstrand Glad to see genxml be useful for more than just us! :-) --Jason > 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 > > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] vc4: Introduce XML-based packet header generation like Intel's.
Hi Eric, On 28 June 2017 at 19:18, Eric Anholtwrote: > 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. > Even though I'm not one of the above people, I've spotted a few things which I hope you'll find useful. > --- a/src/mesa/Android.libmesa_git_sha1.mk > +++ b/src/broadcom/Android.genxml.mk > +# --- > +# Build libmesa_genxml Does not match with actual name below. Update or simply drop the comment? > +# --- > > include $(CLEAR_VARS) > > -LOCAL_MODULE := libmesa_git_sha1 > +LOCAL_MODULE := libmesa_broadcom_genxml > Nicely done on renaming the lib. Otherwise it would have conflicted with the Intel one or gone unnoticed if one builds w/o Intel. > +$(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 Based on the .gitignore and Autotools build you want s/genxml/cle/ here. > + $(call header-gen) > + > +LOCAL_EXPORT_C_INCLUDE_DIRS := \ > + $(MESA_TOP)/src/intel \ s/intel/broadcom/ ? > --- /dev/null > +++ b/src/broadcom/Makefile.sources > @@ -0,0 +1,12 @@ > +BROADCOM_GENXML_GENERATED_FILES = \ > + cle/v3d_packet_v21_pack.h \ > + $() > + > +BROADCOM_GENXML_XML_FILES = \ > + cle/v3d_packet_v21.xml \ > + $() > + > +BROADCOM_FILES = \ > + cle/v3d_packet_helpers.h \ > + $() > + Can I bribe you to drop the $() lines? > --- /dev/null > +++ b/src/broadcom/cle/gen_pack_header.py > @@ -0,0 +1,547 @@ > +#!/usr/bin/env python2 Please drop this line. Afaict the script should be python3 safe, plus we use manually invoke correct version of python and strip the file execute bit. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev