[Mesa-dev] [RFC 0/2] Alternate default config mechanism

Tapani Pälli tapani.palli at intel.com
Tue May 14 07:17:10 UTC 2019


On 5/13/19 6:52 PM, Haehnle, Nicolai wrote:
> This approach seems entirely incompatible with si_debug_options.h, and
> will be an absolute maintenance nightmare going forward for adding /
> removing options, because you're introducing a second location where
> options are defined.
> 
> Quite frankly, this seems like a terrible idea as-is.
> 
> If you really can't use XML for whatever reason, then please find some
> way of deriving both the tables here and the XML from the same single
> source of truth.

I was looking at this yesterday and came up with same conclusion. We 
should have the options in one place. Currently libexpat is statically 
linked with Android >=O, maybe for such restricted environments we could 
just inline the xml as is at compile time and parse that later or 
alternatively (maybe cleaner) parse and generate default option cache 
already during compilation?


> Cheers,
> Nicolai
> 
> On 10.05.19 08:02, Sumit Semwal wrote:
>> Mesa uses libexpat for many configuration parsing needs; however some
>> userspaces like Android may not want to use libexpat for various reasons -
>> eg some might restrict reading of any config xml files from filesystems.
>>
>> This patchset proposes a simple lookup mechanism for the default values
>> as per current core mesa, keeping the same mesa-internal API as existing
>> xmlconfig.c.
>>
>> Note:
>> This RFC doesn't change mesa drivers that directly use libexpat API - vc4
>> and intel gen decoder. If these drivers need Android to be enabled for
>> them, I request help from the experts there.
>>
>> For building and testing this on current AOSP/master, I have two hack patches
>> - one provides empty dummy declarations for the XML* API in use in
>> gen_decoder, while the other disables vc4 decoder functionality. These can be
>> found at [1].
>>
>> These have been built and boot-tested to UI on dragonboard.
>>
>> [1]: https://git.linaro.org/people/sumit.semwal/aosp/external/mesa3d.git/log/?h=expat_wip
>>
>> Sumit Semwal (2):
>>     mesa: utils: provide alternate default config mechanism
>>     mesa: Android: enable altxmlconfig for O+
>>
>>    src/gallium/targets/dri/Android.mk |   8 +-
>>    src/mesa/drivers/dri/Android.mk    |  12 +-
>>    src/util/Android.mk                |  12 +-
>>    src/util/Makefile.sources          |   2 +-
>>    src/util/altxmlconfig.c            | 261 +++++++++++++++++++++++++++++
>>    5 files changed, 275 insertions(+), 20 deletions(-)
>>    create mode 100644 src/util/altxmlconfig.c
>>
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list