Re: [Mesa-dev] [PATCH] fixup! genxml: Add enough XML for gens 4, 4.5, and 5 to get SURFACE_STATE
> On Mon, Jun 20, 2016 at 4:49 PM, Chad Versace> wrote: > > Emil, how do you test the Android build? I tried building i965 using > > vanilla AOSP, but that turned into a long journey in yak shaving. > > Fun, isn't it. Here's cut-n-paste from my CI job that is tracks AOSP > Hi, in this moment in order to build mesa-dev for marshamallow-x86, the following two changes are necessary: 1) Revert of commit 112e988 "Android: move libdrm settings to top-level Android.common.mk" or a building error due to missing libdrm shared for host will appear. 2) applying the patch already sumbitted by Rob to mesa-dev ML: "Android: add missing u_math.h include path for libmesa_isl" Cheers Mauro ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] fixup! genxml: Add enough XML for gens 4, 4.5, and 5 to get SURFACE_STATE
On Mon, Jun 20, 2016 at 4:49 PM, Chad Versacewrote: > Emil, how do you test the Android build? I tried building i965 using > vanilla AOSP, but that turned into a long journey in yak shaving. Fun, isn't it. Here's cut-n-paste from my CI job that is tracks AOSP and mesa master: repo init -u https://android.googlesource.com/platform/manifest -b master cd .repo rm -rf local_manifests git clone https://github.com/robherring/android_manifest -b mesa-master-test local_manifests cd .. repo sync -f --force-sync -j16 cd external/mesa3d rev=$(git rev-parse freedesktop/master) # temporary until upstream can build git pull --no-edit https://github.com/robherring/mesa.git android-build-test # Enable gpu drivers sed -i -e 's/\(^MESA_GPU_DRIVERS.*\)/MESA_GPU_DRIVERS := $(strip $(BOARD_GPU_DRIVERS)) i915 i965 r300g r600g i915g swrast vc4/' Android.mk # Commit it so repo will throw it away git commit -m "Android: enable GPU drivers" -a -s cd ../.. # configure the device cd device/linaro/generic make defconfig all cd ../../.. source build/envsetup.sh for arch in arm64 x86_64; do lunch linaro_${arch}-userdebug make -k -j8 gallium_dri i915_dri i965_dri libGLES_mesa gralloc.drm || { true; failed=1; } done > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] fixup! genxml: Add enough XML for gens 4, 4.5, and 5 to get SURFACE_STATE
Hi, I tested the optimized one with android-x86 before submitting the patch to mesa-dev, also re-tested several times in the last two days with mesa 12.0.0rc3 mesa 12 and later need some changes in drm_gralloc, expecially this one: https://github.com/maurossi/hardware_drm_gralloc/commit/4d3317104c547e47db61df3bbcc552b0892ef009 Mauro ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] fixup! genxml: Add enough XML for gens 4, 4.5, and 5 to get SURFACE_STATE
Emil, how do you test the Android build? I tried building i965 using vanilla AOSP, but that turned into a long journey in yak shaving. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] fixup! genxml: Add enough XML for gens 4, 4.5, and 5 to get SURFACE_STATE
>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 RossiDate: 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 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] fixup! genxml: Add enough XML for gens 4, 4.5, and 5 to get SURFACE_STATE
> Jason, feel free to pick whichever patch you like - the annoyingly > verbose from me or the shorter (en route to victory) from Mauro. > > -Emil Hi, just one final warning my condensed PATCH 1/2 works, but I just noticed now that it produces the following Warnings including ./external/mesa/Android.mk ... external/mesa/src/intel/genxml/Android.mk:48: target 'out/target/product/x86/gen/STATIC_LIBRARIES/libmesa_genxml_intermediates/dummy.c' doesn't match the target pattern external/mesa/src/intel/genxml/Android.mk:49: warning: overriding recipe for target 'out/target/product/x86/gen/STATIC_LIBRARIES/libmesa_genxml_intermediates/dummy.c' external/mesa/src/intel/genxml/Android.mk:39: warning: ignoring old recipe for target 'out/target/product/x86/gen/STATIC_LIBRARIES/libmesa_genxml_intermediates/dummy.c' The thing is that I don't know how to remove those warnings, because if I remove the rules for dummy.c generation I just get the building errors of missing gen*pack.h headers. This Android build system is really a beast with headers only projects like genxml If you know how to avoid those warnings do as you may, if not It is better to stick to Emil fixup! patch that was already resolving and without warnings. Mauro ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] fixup! genxml: Add enough XML for gens 4, 4.5, and 5 to get SURFACE_STATE
Hi Mauro, On 13 June 2016 at 23:15, Mauro Rossiwrote: > 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 > 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 > 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)? > Last time I've tried that androgenizer wasn't worth it for a couple of reasons: - one needs to explicitly run ./autogen.sh && make android (iirc) to generate the android makefiles - but most importantly, all the difference(s) between android and autoconf had to be moved in the Makefile.am What I'm saying is that there's not need for all the Android abstraction imho. 1) Take the newly (reduced) hunk $(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) 2) Strip out all the Androidisms and you'll get something like: $(LOCAL_GENERATED_SOURCES): $(intermediates)/genxml/%_pack.h: $(LOCAL_PATH)/gen_pack_header.py $(LOCAL_PATH)/%.xml $(MESA_PYTHON2) $^ > $@ 3) Now if we assume that Android hasn't borken SUFFIX rules, that could become SUFFIXES = _pack.h .xml $(LOCAL_GENERATED_SOURCES): $(LOCAL_PATH)/gen_pack_header.py .xml_pack.h: $(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py $< > $@ 4) and a similar looking autoconf one SUFFIXES = _pack.h .xml $(BUILT_SOURCES): gen_pack_header.py .xml_pack.h: $(PYTHON_GEN) $(srcdir)/gen_pack_header.py $< > $@ Step 5 and onwards entails expanding (add srcdir for both gen_pack_header.py) and moving the autoconf one to another file (might need to prefix gen_pack_header.py. And finally doing flexing the android and autoconf variables (PYTHON_GEN := MESA_PYTHON2 and/or alike) and including the rule file into the android build. Note: most of the above is approximation, but should serve as nice guide what I have in mind. Please don't worry to much if you cannot test on autoconf side of things. Just post some patch(es) once things are working on Android side. > 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 > Jason, feel free to pick whichever patch you like - the annoyingly verbose from me or the shorter (en route to victory) from Mauro. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] fixup! genxml: Add enough XML for gens 4, 4.5, and 5 to get SURFACE_STATE
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 RossiDate: 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 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 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] fixup! genxml: Add enough XML for gens 4, 4.5, and 5 to get SURFACE_STATE
Wire up the Android build Cc: Jason EkstrandCc: Mauro Rossi --- Mauro, can you please follow up with my earlier suggestion about reusing the autoconf rules from within the Android build. Duplicating all of them is getting a bit annoying. Thanks Emil src/intel/genxml/Android.mk | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/intel/genxml/Android.mk b/src/intel/genxml/Android.mk index e5b7597..39b5e2c 100644 --- a/src/intel/genxml/Android.mk +++ b/src/intel/genxml/Android.mk @@ -49,6 +49,21 @@ define header-gen $(hide) $(PRIVATE_SCRIPT) $(PRIVATE_XML) > $@ endef +$(intermediates)/genxml/gen4_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py +$(intermediates)/genxml/gen4_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen4.xml +$(intermediates)/genxml/gen4_pack.h: $(LOCAL_PATH)/gen4.xml $(LOCAL_PATH)/gen_pack_header.py + $(call header-gen) + +$(intermediates)/genxml/gen45_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py +$(intermediates)/genxml/gen45_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen45.xml +$(intermediates)/genxml/gen45_pack.h: $(LOCAL_PATH)/gen45.xml $(LOCAL_PATH)/gen_pack_header.py + $(call header-gen) + +$(intermediates)/genxml/gen5_pack.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/gen_pack_header.py +$(intermediates)/genxml/gen5_pack.h: PRIVATE_XML := $(LOCAL_PATH)/gen5.xml +$(intermediates)/genxml/gen5_pack.h: $(LOCAL_PATH)/gen5.xml $(LOCAL_PATH)/gen_pack_header.py + $(call header-gen) + $(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 -- 2.8.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev