android: radeonsi/gfx10: generate gfx10_format_table.h (v2)
authorMauro Rossi <issor.oruam@gmail.com>
Sat, 6 Jul 2019 19:27:21 +0000 (21:27 +0200)
committerMauro Rossi <issor.oruam@gmail.com>
Wed, 10 Jul 2019 07:03:46 +0000 (09:03 +0200)
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 <issor.oruam@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/Android.mk

index 76309a4ebc2b8450aa422427b659f3ba35da502a..e402da639e7a8c62190365bfac8ffeaf95e76c90 100644 (file)
@@ -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
+
 LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates)
 
 $(call mesa-build-with-llvm)