From b3d46cb539c10004fc6e67a435bea29236ce53fc Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sat, 6 Jul 2019 20:21:31 +0200 Subject: [PATCH] android: amd/common/gfx10: add register JSON MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Acked-by: Marek Olšák --- src/amd/Android.common.mk | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/src/amd/Android.common.mk b/src/amd/Android.common.mk index 1a3a00b9bc6..d5a266215f0 100644 --- a/src/amd/Android.common.mk +++ b/src/amd/Android.common.mk @@ -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 \ -- 2.30.2