[Mesa-dev] [PATCH] vc4: Introduce XML-based packet header generation like Intel's.
Eric Anholt
eric at anholt.net
Thu Jun 29 18:37:20 UTC 2017
Kenneth Graunke <kenneth at whitecape.org> writes:
> [ 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 <kenneth at whitecape.org>
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170629/1cf2ccc3/attachment.sig>
More information about the mesa-dev
mailing list