[Mesa-dev] [PATCH] android: ac/debug: move sid_tables.h generation and IB decode to amd/common

Mauro Rossi issor.oruam at gmail.com
Thu Jan 12 00:14:12 UTC 2017


Hi,

I'm sending a patch to support recent changes in radeonsi and amd/common,
in order to fix android building errors due to files moved to amd/common.

The patch has been implemented as a merge of the two ports,
in order to fully test the build.

Please consider that patches to fix LLVMInitializeAMDGPU*
declarations, which are in final stages of review, should be
upstreamed, to be able to correctly apply this one.

Mauro


>From d6614af2763ea96940e16571005d4ab06e86304c Mon Sep 17 00:00:00 2001
From: Mauro Rossi <issor.oruam at gmail.com>
Date: Thu, 12 Jan 2017 00:35:06 +0100
Subject: [PATCH] android: ac/debug: move sid_tables.h generation and IB decode
 to amd/common

This patch is the porting to android of the following commits:

b838f64 "ac/debug: Move sid_tables.h generation to common code."
0ef1b4d "ac/debug: Move IB decode to common code."

Fixes android building errors due to sid_tables.h
and ac_debug.c, ac_debug.h moved to amd/common

Tested by building nougat-x86
---
 src/amd/Android.common.mk               | 16 +++++++++++++++-
 src/gallium/drivers/radeonsi/Android.mk | 15 +++------------
 2 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/src/amd/Android.common.mk b/src/amd/Android.common.mk
index c7fd193..58c3267 100644
--- a/src/amd/Android.common.mk
+++ b/src/amd/Android.common.mk
@@ -28,16 +28,30 @@ include $(CLEAR_VARS)

 LOCAL_MODULE := libmesa_amd_common

-LOCAL_SRC_FILES := $(AMD_COMPILER_FILES)
+LOCAL_SRC_FILES := \
+ $(AMD_COMPILER_FILES) \
+ $(AMD_DEBUG_FILES)

 LOCAL_CFLAGS += -DFORCE_BUILD_AMDGPU   # to enable
TARGET_LLVM(AMDGPU) LLVMInitialize* prototypes

+# generate sources
+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 $(MESA_TOP)/src/amd/common/sid.h
+ $(transform-generated-source)
+
 LOCAL_C_INCLUDES := \
  $(MESA_TOP)/include \
  $(MESA_TOP)/src \
  $(MESA_TOP)/src/amd/common \
  $(MESA_TOP)/src/gallium/include \
  $(MESA_TOP)/src/gallium/auxiliary \
+ $(intermediates)/common \
  external/llvm/include \
  external/llvm/device/include \
  external/libcxx/include \
diff --git a/src/gallium/drivers/radeonsi/Android.mk
b/src/gallium/drivers/radeonsi/Android.mk
index ee4e229..3625675 100644
--- a/src/gallium/drivers/radeonsi/Android.mk
+++ b/src/gallium/drivers/radeonsi/Android.mk
@@ -32,21 +32,12 @@ LOCAL_SRC_FILES := $(C_SOURCES)

 LOCAL_CFLAGS += -DFORCE_BUILD_AMDGPU   # to enable
TARGET_LLVM(AMDGPU) LLVMInitialize* prototypes

-LOCAL_C_INCLUDES := $(MESA_TOP)/src/amd/common
+LOCAL_C_INCLUDES := \
+ $(MESA_TOP)/src/amd/common \
+ $(call intermediates-dir-for,STATIC_LIBRARIES,libmesa_amd_common)/common

 LOCAL_SHARED_LIBRARIES := libdrm_radeon
 LOCAL_MODULE := libmesa_pipe_radeonsi

-# generate sources
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-intermediates := $(call local-generated-sources-dir)
-LOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/, $(GENERATED_SOURCES))
-
-$(LOCAL_GENERATED_SOURCES): PRIVATE_PYTHON := $(MESA_PYTHON2)
-$(LOCAL_GENERATED_SOURCES): PRIVATE_CUSTOM_TOOL = $(PRIVATE_PYTHON) $^ > $@
-
-$(intermediates)/sid_tables.h:  $(intermediates)/%.h:
$(LOCAL_PATH)/%.py $(MESA_TOP)/src/amd/common/sid.h
- $(transform-generated-source)
-
 include $(GALLIUM_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
-- 
2.9.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-android-ac-debug-move-sid_tables.h-generation-and-IB.patch
Type: text/x-patch
Size: 3150 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170112/2e99e71a/attachment.bin>


More information about the mesa-dev mailing list