Skip to content

freedreno: a7xx prep

Rob Clark requested to merge robclark/mesa:fd/a7xx-prep into main

This pulls out an assortment of a7xx prep. It is a mix of various c++-proofing, gallium switch over to c++, register additions, and gen_header.py updates to generate templatized reg builders for regs that differ btwn a6xx and a7xx. This generates something that at runtime is no more instructions, but doesn't involve a lot of copy/paste (or generally massively restructuring the driver). I have some intention to also take advantage of templates to reduce draw overhead depending on bound state (and I guess w/ vk dynamic state, a similar thing could perhaps be useful for turnip).

The end goal is switching to templates to handle generational differences, which most of the time can be abstracted by the packed-struct reg/pkt builders (but there will be a few exceptions, new pkts/regs for a7xx). Eventually I'd like to block legacy (non-template-pack-struct) builders for anything that has more than a single variant, to prevent mistakenly using the wrong version. But that will have to land after turnip conversion that @Danil is working on.

Merge request reports