[Mesa-dev] [PATCH 1/3] mesa: Add _mesa_format_fallback_rgbx_to_rgba() [v2]

Rob Herring robh at kernel.org
Wed Jun 28 21:42:37 UTC 2017


On Wed, Jun 28, 2017 at 4:23 PM, Chad Versace <chadversary at chromium.org> wrote:
> On Wed 28 Jun 2017, Rob Herring wrote:
>> On Tue, Jun 27, 2017 at 1:00 PM, Chad Versace <chadversary at chromium.org> wrote:
>> > The new function takes a mesa_format and, if the format is an alpha
>> > format with a non-alpha variant, returns the non-alpha format.
>> > Otherwise, it returns the original format.
>>
>> [...]
>>
>> > @@ -123,6 +124,17 @@ $(intermediates)/main/get_hash.h: $(glapi)/gl_and_es_API.xml \
>> >                 $(LOCAL_PATH)/main/get_hash_params.py $(GET_HASH_GEN)
>> >         $(call es-gen)
>> >
>> > +FORMAT_FALLBACK := $(LOCAL_PATH)/main/format_fallback.py
>> > +format_fallback_deps := \
>> > +       $(LOCAL_PATH)/main/formats.csv \
>> > +       $(LOCAL_PATH)/main/format_parser.py \
>> > +       $(FORMAT_FALLBACK)
>> > +
>> > +$(intermediates)/main/format_fallback.c: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(FORMAT_FALLBACK)
>> > +$(intermediates)/main/format_fallback.c: PRIVATE_XML :=
>> > +$(intermediates)/main/format_fallback.c: $(format_fallback_deps)
>> > +       $(call es-gen, $<)
>>
>> This breaks on Android because the script wants the output in $2 and
>> es-gen outputs to stdout:
>>
>> FAILED: out/target/product/linaro_x86_64/gen/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/main/format_fallback.c
>> /bin/bash -c "python external/mesa3d/src/mesa/main/format_fallback.py
>> external/mesa3d/src/mesa/main/formats.csv  >
>> out/target/product/linaro_x86_64/gen/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/main/format_fallback.c"
>> usage: format_fallback.py [-h] csv out
>> format_fallback.py: error: too few arguments
>
> My fault. After Jason rewrote the script, I forgot to re-test the
> Android.mk build. Do you already have a fix? If not, I'll make one.

I've hacked up the makefile just open coding the commands instead of
using es-gen. Did you want to fix it there or in the
format_fallback.py script to make <out> optional?

Rob


More information about the mesa-dev mailing list