[Mesa-dev] [PATCH] fixup! genxml: Add enough XML for gens 4, 4.5, and 5 to get SURFACE_STATE
Mauro Rossi
issor.oruam at gmail.com
Mon Jun 13 22:15:02 UTC 2016
Hi Jason, Emil,
Jason patch equires additional changes to correctly complete the
builld as the new generated headers gen{4,45,5}_pack.h need also to be
added to src/intel/Makefile.sources in GENXML_GENERATED_FILES variable
I've not been able to explore the reuse if autoconf rules, because it
is a task too complex for me,
but I've found a way to reduce the complexity in genxml Android.mk by
using wildcards and $(call transform-generated-source) macro like in
src/mesa/util Android.mk makefile.
Emil, when you talk about reusing autoconf rules, do you mean to use
androgenizer (from collabora?) as a mean to generate the Android.mk
(on the fly)?
In the meantime this is what I can provide now.
Emil fixup! can be skipped and, as a proposal, can be replaced by the
following two addendum patches to Jason's
The first was tested and build was completed correctly, for the second
it should be ok, but please review them.
KR
Mauro
>From 92d78d17e3b99cf7a94e3942788be347bd7dffe6 Mon Sep 17 00:00:00 2001
From: Mauro Rossi <issor.oruam at gmail.com>
Date: Mon, 13 Jun 2016 23:50:05 +0200
Subject: [PATCH 1/2] android: genxml: optimize autogenerated headers rules
Simplifications in the rules that generate
gen{*}_pack.h headers in Android builds.
---
src/intel/genxml/Android.mk | 34 ++++------------------------------
1 file changed, 4 insertions(+), 30 deletions(-)
diff --git a/src/intel/genxml/Android.mk b/src/intel/genxml/Android.mk
index e5b7597..b99a495 100644
--- a/src/intel/genxml/Android.mk
+++ b/src/intel/genxml/Android.mk
@@ -43,36 +43,10 @@ $(intermediates)/dummy.c:
# This is the list of auto-generated files headers
LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/genxml/,
$(GENXML_GENERATED_FILES))
-define header-gen
- @mkdir -p $(dir $@)
- @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"
- $(hide) $(PRIVATE_SCRIPT) $(PRIVATE_XML) > $@
-endef
-
-$(intermediates)/genxml/gen6_pack.h: PRIVATE_SCRIPT :=
$(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py
-$(intermediates)/genxml/gen6_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen6.xml
-$(intermediates)/genxml/gen6_pack.h: $(LOCAL_PATH)/gen6.xml
$(LOCAL_PATH)/gen_pack_header.py
- $(call header-gen)
-
-$(intermediates)/genxml/gen7_pack.h: PRIVATE_SCRIPT :=
$(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py
-$(intermediates)/genxml/gen7_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen7.xml
-$(intermediates)/genxml/gen7_pack.h: $(LOCAL_PATH)/gen7.xml
$(LOCAL_PATH)/gen_pack_header.py
- $(call header-gen)
-
-$(intermediates)/genxml/gen75_pack.h: PRIVATE_SCRIPT :=
$(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py
-$(intermediates)/genxml/gen75_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen75.xml
-$(intermediates)/genxml/gen75_pack.h: $(LOCAL_PATH)/gen75.xml
$(LOCAL_PATH)/gen_pack_header.py
- $(call header-gen)
-
-$(intermediates)/genxml/gen8_pack.h: PRIVATE_SCRIPT :=
$(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py
-$(intermediates)/genxml/gen8_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen8.xml
-$(intermediates)/genxml/gen8_pack.h: $(LOCAL_PATH)/gen8.xml
$(LOCAL_PATH)/gen_pack_header.py
- $(call header-gen)
-
-$(intermediates)/genxml/gen9_pack.h: PRIVATE_SCRIPT :=
$(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py
-$(intermediates)/genxml/gen9_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen9.xml
-$(intermediates)/genxml/gen9_pack.h: $(LOCAL_PATH)/gen9.xml
$(LOCAL_PATH)/gen_pack_header.py
- $(call header-gen)
+$(LOCAL_GENERATED_SOURCES): PRIVATE_PYTHON := $(MESA_PYTHON2)
+$(LOCAL_GENERATED_SOURCES): PRIVATE_CUSTOM_TOOL = $(PRIVATE_PYTHON) $^ > $@
+$(LOCAL_GENERATED_SOURCES): $(intermediates)/genxml/%_pack.h:
$(LOCAL_PATH)/gen_pack_header.py $(LOCAL_PATH)/%.xml
+ $(transform-generated-source)
LOCAL_EXPORT_C_INCLUDE_DIRS := \
$(MESA_TOP)/src/intel \
--
2.7.4
>From d30d1fc43081caf06c6e7d380b54da4c175ba99c Mon Sep 17 00:00:00 2001
From: Mauro Rossi <issor.oruam at gmail.com>
Date: Tue, 14 Jun 2016 00:05:23 +0200
Subject: [PATCH 2/2] android: genxml: update Makefile.sources with
gen{4,45,5}_pack.h
Makefile.sources need to be updated to correctly build Android.
---
src/intel/genxml/Makefile.sources | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/intel/genxml/Makefile.sources
b/src/intel/genxml/Makefile.sources
index 9298b4a..86c0bbe 100644
--- a/src/intel/genxml/Makefile.sources
+++ b/src/intel/genxml/Makefile.sources
@@ -1,4 +1,7 @@
GENXML_GENERATED_FILES = \
+ gen4_pack.h \
+ gen45_pack.h \
+ gen5_pack.h \
gen6_pack.h \
gen7_pack.h \
gen75_pack.h \
--
2.7.4
More information about the mesa-dev
mailing list