[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
Tue Jun 14 00:48:15 UTC 2016


>The patch that I've sent was a "fixup" (i.e. is to be squashed with
>the commit name that follows). That very same has the headers in the
>Makefiles.sources

Hi, I had missed that src/intel/genxml/Makefile.sources was already OK
in original Jason's patch,
so there's no need for changes there.

Good news and last update for tonight, I found a way to simplify the
generated headers rules
and avoid the warnings about dummy.c recipe.

I did one last desperate try by moving dummy.c generation part after
all .h generated headers rules
and guess what, the warnings disappeared.

Tested and working Ok, please consider that the following is
equivalent to Emil's fixup! patch:


>From 83078aa616c429c496b467d23fa2390f1a6008bc Mon Sep 17 00:00:00 2001
From: Mauro Rossi <issor.oruam at gmail.com>
Date: Tue, 14 Jun 2016 02:26:30 +0200
Subject: [PATCH] android: genxml: optimize autogenerated headers rules

Simplifications in the rules that generate
gen{*}_pack.h headers in Android builds.
---
 src/intel/genxml/Android.mk | 42 ++++++++----------------------------------
 1 file changed, 8 insertions(+), 34 deletions(-)

diff --git a/src/intel/genxml/Android.mk b/src/intel/genxml/Android.mk
index e5b7597..cbae83a 100644
--- a/src/intel/genxml/Android.mk
+++ b/src/intel/genxml/Android.mk
@@ -32,6 +32,14 @@ LOCAL_MODULE_CLASS := STATIC_LIBRARIES

 intermediates := $(call local-generated-sources-dir)

+# This is the list of auto-generated files headers
+LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/genxml/,
$(GENXML_GENERATED_FILES))
+
+$(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)
+
 # dummy.c source file is generated to meet the build system's rules.
 LOCAL_GENERATED_SOURCES += $(intermediates)/dummy.c

@@ -40,40 +48,6 @@ $(intermediates)/dummy.c:
  @echo "Gen Dummy: $(PRIVATE_MODULE) <= $(notdir $(@))"
  $(hide) touch $@

-# 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_EXPORT_C_INCLUDE_DIRS := \
  $(MESA_TOP)/src/intel \
  $(intermediates)
-- 
2.7.4


More information about the mesa-dev mailing list