Mauro Rossi 於 2019年7月7日 週日 上午4:17寫道:
>
> Fix Android building rules for gfx10_format_table.h generated header
>
> (v2) Add LOCAL_C_INCLUDES += $(intermediates)/radeonsi to fix error:
>
> external/mesa/src/gallium/drivers/radeonsi/si_state.c:46:10:
> fatal error: 'gfx10_format_table.h' file not found
> ^~
> 1 error generated.
>
> Fixes: 0ffa229 ("radeonsi/gfx10: generate gfx10_format_table.h")
> Signed-off-by: Mauro Rossi
> ---
> src/gallium/drivers/radeonsi/Android.mk | 16
> 1 file changed, 16 insertions(+)
>
> diff --git a/src/gallium/drivers/radeonsi/Android.mk
> b/src/gallium/drivers/radeonsi/Android.mk
> index 76309a4ebc..e402da639e 100644
> --- a/src/gallium/drivers/radeonsi/Android.mk
> +++ b/src/gallium/drivers/radeonsi/Android.mk
> @@ -61,6 +61,22 @@ $(intermediates)/radeonsi/si_driinfo.h: $(MERGE_DRIINFO)
> $(GEN_DRIINFO_INPUTS)
> @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
> $(hide) $(MESA_PYTHON2) $(MERGE_DRIINFO) $(GEN_DRIINFO_INPUTS) > $@
> || ($(RM) $@; false)
>
> +GEN10_FORMAT_TABLE_INPUTS := \
> + $(MESA_TOP)/src/gallium/auxiliary/util/u_format.csv \
> + $(MESA_TOP)/src/amd/registers/gfx10-rsrc.json
> +
> +GEN10_FORMAT_TABLE_DEP := \
> + $(MESA_TOP)/src/amd/registers/regdb.py
> +
> +GEN10_FORMAT_TABLE := $(LOCAL_PATH)/gfx10_format_table.py
> +
> +$(intermediates)/radeonsi/gfx10_format_table.h: $(GEN10_FORMAT_TABLE)
> $(GEN10_FORMAT_TABLE_INPUTS) $(GEN10_FORMAT_TABLE_DEP)
> + @mkdir -p $(dir $@)
> + @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
> + $(hide) $(MESA_PYTHON2) $(GEN10_FORMAT_TABLE)
> $(GEN10_FORMAT_TABLE_INPUTS) > $@ || ($(RM) $@; false)
> +
> +LOCAL_C_INCLUDES += $(intermediates)/radeonsi
I'm curious why we need this.
Then I noticed the two generated headers
si_driinfo_h and gfx10_format_table.h are used inconsistently.
si_driinfo_h is included with a prefix radeonsi/, (e.g., in pipe_radeonsi.c)
#include "radeonsi/si_driinfo.h"
while gfx10_format_table.h isn't: (e.g. radv_private.h)
#include "gfx10_format_table.h"
Shouldn't them be unified?
> LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates)
>
> $(call mesa-build-with-llvm)
--
Chih-Wei
Android-x86 project
http://www.android-x86.org
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev