android: amd/common/gfx10: add register JSON
authorMauro Rossi <issor.oruam@gmail.com>
Sat, 6 Jul 2019 18:21:31 +0000 (20:21 +0200)
committerMauro Rossi <issor.oruam@gmail.com>
Wed, 10 Jul 2019 07:03:51 +0000 (09:03 +0200)
The necessary Android makefile building rules are added
and the generation rules are simplified for readability

Fixes the following building errors:

external/mesa/src/amd/common/ac_llvm_build.c:1496:45:
error: use of undeclared identifier 'V_008F0C_IMG_FORMAT_8_UINT'
   case V_008F0C_BUF_DATA_FORMAT_8: format = V_008F0C_IMG_FORMAT_8_UINT; break;
                                             ^
Fixes: 74a26af ("amd/common/gfx10: add register JSON")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
src/amd/Android.common.mk

index 1a3a00b9bc6b552ec5f0ebc5bd207744d4c16921..d5a266215f02af1db424b00a538c0216c13e6749 100644 (file)
@@ -41,14 +41,32 @@ LOCAL_MODULE_CLASS := STATIC_LIBRARIES
 intermediates := $(call local-generated-sources-dir)
 LOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/, $(AMD_GENERATED_FILES))
 
-$(LOCAL_GENERATED_SOURCES): PRIVATE_PYTHON := $(MESA_PYTHON2)
-$(LOCAL_GENERATED_SOURCES): PRIVATE_CUSTOM_TOOL = $(PRIVATE_PYTHON) $^ > $@
-
-$(intermediates)/common/sid_tables.h: $(LOCAL_PATH)/common/sid_tables.py $(LOCAL_PATH)/common/sid.h $(LOCAL_PATH)/registers/amdgfxregs.json $(LOCAL_PATH)/registers/pkt3.json
-       $(transform-generated-source)
-
-$(intermediates)/common/amdgfxregs.h: $(LOCAL_PATH)/registers/makeregheader.py $(LOCAL_PATH)/registers/amdgfxregs.json $(LOCAL_PATH)/registers/pkt3.json
-       $(transform-generated-source) --sort address --guard AMDGFXREGS_H
+SID_TABLES := $(LOCAL_PATH)/common/sid_tables.py
+
+SID_TABLES_INPUTS := \
+       $(LOCAL_PATH)/common/sid.h \
+       $(LOCAL_PATH)/registers/amdgfxregs.json \
+       $(LOCAL_PATH)/registers/pkt3.json \
+       $(LOCAL_PATH)/registers/gfx10.json \
+       $(LOCAL_PATH)/registers/gfx10-rsrc.json
+
+$(intermediates)/common/sid_tables.h: $(SID_TABLES) $(SID_TABLES_INPUTS)
+       @mkdir -p $(dir $@)
+       @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
+       $(hide) $(MESA_PYTHON2) $(SID_TABLES) $(SID_TABLES_INPUTS) > $@ || ($(RM) $@; false)
+
+AMDGFXREGS := $(LOCAL_PATH)/registers/makeregheader.py
+
+AMDGFXREGS_INPUTS := \
+       $(LOCAL_PATH)/registers/amdgfxregs.json \
+       $(LOCAL_PATH)/registers/pkt3.json \
+       $(LOCAL_PATH)/registers/gfx10.json \
+       $(LOCAL_PATH)/registers/gfx10-rsrc.json
+
+$(intermediates)/common/amdgfxregs.h: $(AMDGFXREGS) $(AMDGFXREGS_INPUTS)
+       @mkdir -p $(dir $@)
+       @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
+       $(hide) $(MESA_PYTHON2) $(AMDGFXREGS) $(AMDGFXREGS_INPUTS) --sort address --guard AMDGFXREGS_H > $@ || ($(RM) $@; false)
 
 LOCAL_C_INCLUDES := \
        $(MESA_TOP)/include \