Re: [Mesa-dev] [PATCH] Android: fix r300g only build
2017-04-27 17:36 GMT+02:00 Emil Velikov : > On 27 April 2017 at 16:11, Rob Herring wrote: > >> >> BTW, mesa lists this as the LLVM version requirements: >> >> LLVM_REQUIRED_GALLIUM=3.3.0 > src/gallium/auxiliary/{draw,gallivm}, used by > - nouveau (nv30), i915, r300, softpipe (yes) and svga - optional > - llvmpipe, swr, radeonsi - mandatory > >> LLVM_REQUIRED_OPENCL=3.6.0 > src/gallium/state_trackers/clover/ > >> LLVM_REQUIRED_R600=3.8.0 > src/gallium/drivers/{r600,radeon} > >> LLVM_REQUIRED_RADEONSI=3.8.0 > src/gallium/drivers/{radeonsi,radeon} > >> LLVM_REQUIRED_RADV=3.9.0 > src/amd/vulkan/ > >> LLVM_REQUIRED_SWR=3.9.0 > src/gallium/drivers/swr > >> >> I'm not exactly sure what in gallium only needs LLVM 3.3, but it looks >> to me like we need at least 3.8 and that would limit us to Android N >> and later for enabling LLVM. Is that a correct assumption for >> android-x86? We are only talking about what current mesa master >> supports here. >> Hi, >=N constraint was induced by changes in radeonsi/amdgpu that became effective in mesa 17.1, 17.0 is the last branch supporting M, due to llvm version 3.7 in AOSP/android-x86 for marshmallow but this should not be an issue as one day marshmallow-x86 development will go EoL > Rob the above list should help you connect the LLVM version dots. > On the question - as long as you guys are happy, I'm happy :-) > > -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] Android: fix r300g only build
On Thu, Apr 27, 2017 at 12:31 PM, Rob Herring wrote: > On Thu, Apr 27, 2017 at 11:18 AM, Ilia Mirkin wrote: >> On Thu, Apr 27, 2017 at 11:36 AM, Emil Velikov >> wrote: >>> On 27 April 2017 at 16:11, Rob Herring wrote: >>> BTW, mesa lists this as the LLVM version requirements: LLVM_REQUIRED_GALLIUM=3.3.0 >>> src/gallium/auxiliary/{draw,gallivm}, used by >>> - nouveau (nv30), i915, r300, softpipe (yes) and svga - optional >>> - llvmpipe, swr, radeonsi - mandatory >> >> Technically, it's optionally used by everything as it's used for >> GL_FEEDBACK implementation by st/mesa. But the drivers you point at do >> use it for more than just that. However for none of the "optional" >> ones is llvm required (perhaps that's your point) - draw can operate >> without llvm as well. > > Is there an advantage to using LLVM over not? Android-x86 only enables > LLVM for radeonsi and llvmpipe, though when enabled it is globally > enabled (which perhaps could have some side effects on other drivers). If you do a single build [with autoconf], LLVM is either on or off, for all drivers built in that build. Enabling LLVM has the advantage that ... LLVM gets used in those situations where the draw module is invoked, i.e. you get JIT'd vertex processing programs instead of the much slower interpreted approach. For nv30, "draw" gets used as a fallback path semi-frequently (i.e. an appreciable fraction of the time). For nv50/nvc0, it's really just GL_SELECT/GL_FEEDBACK usage by st/mesa -- this is a long-deprecated GL feature that is AFAIK not accessible from ES (and AFAIK there's no desktop GL on Android), so I wouldn't worry about it. http://docs.gl/gl3/glRenderMode -- poor man's transform feedback. Cheers, -ilia ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] Android: fix r300g only build
On Thu, Apr 27, 2017 at 11:18 AM, Ilia Mirkin wrote: > On Thu, Apr 27, 2017 at 11:36 AM, Emil Velikov > wrote: >> On 27 April 2017 at 16:11, Rob Herring wrote: >> >>> >>> BTW, mesa lists this as the LLVM version requirements: >>> >>> LLVM_REQUIRED_GALLIUM=3.3.0 >> src/gallium/auxiliary/{draw,gallivm}, used by >> - nouveau (nv30), i915, r300, softpipe (yes) and svga - optional >> - llvmpipe, swr, radeonsi - mandatory > > Technically, it's optionally used by everything as it's used for > GL_FEEDBACK implementation by st/mesa. But the drivers you point at do > use it for more than just that. However for none of the "optional" > ones is llvm required (perhaps that's your point) - draw can operate > without llvm as well. Is there an advantage to using LLVM over not? Android-x86 only enables LLVM for radeonsi and llvmpipe, though when enabled it is globally enabled (which perhaps could have some side effects on other drivers). Rob ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] Android: fix r300g only build
On 27 April 2017 at 17:18, Ilia Mirkin wrote: > On Thu, Apr 27, 2017 at 11:36 AM, Emil Velikov > wrote: >> On 27 April 2017 at 16:11, Rob Herring wrote: >> >>> >>> BTW, mesa lists this as the LLVM version requirements: >>> >>> LLVM_REQUIRED_GALLIUM=3.3.0 >> src/gallium/auxiliary/{draw,gallivm}, used by >> - nouveau (nv30), i915, r300, softpipe (yes) and svga - optional >> - llvmpipe, swr, radeonsi - mandatory > > Technically, it's optionally used by everything as it's used for > GL_FEEDBACK implementation by st/mesa. But the drivers you point at do > use it for more than just that. However for none of the "optional" > ones is llvm required (perhaps that's your point) - draw can operate > without llvm as well. > Yes, that's correct - a complete answer is: - nouveau explicitly use the draw module. which on its own optionally require LLVM. - llvm... use the gallivm module, which mandates LLVM All the gallium drivers implicitly use the draw module. The original reply aimed to provide quick and simply answer, for a non-dev. POV ;-) -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] Android: fix r300g only build
On Thu, Apr 27, 2017 at 11:36 AM, Emil Velikov wrote: > On 27 April 2017 at 16:11, Rob Herring wrote: > >> >> BTW, mesa lists this as the LLVM version requirements: >> >> LLVM_REQUIRED_GALLIUM=3.3.0 > src/gallium/auxiliary/{draw,gallivm}, used by > - nouveau (nv30), i915, r300, softpipe (yes) and svga - optional > - llvmpipe, swr, radeonsi - mandatory Technically, it's optionally used by everything as it's used for GL_FEEDBACK implementation by st/mesa. But the drivers you point at do use it for more than just that. However for none of the "optional" ones is llvm required (perhaps that's your point) - draw can operate without llvm as well. -ilia > >> LLVM_REQUIRED_OPENCL=3.6.0 > src/gallium/state_trackers/clover/ > >> LLVM_REQUIRED_R600=3.8.0 > src/gallium/drivers/{r600,radeon} > >> LLVM_REQUIRED_RADEONSI=3.8.0 > src/gallium/drivers/{radeonsi,radeon} > >> LLVM_REQUIRED_RADV=3.9.0 > src/amd/vulkan/ > >> LLVM_REQUIRED_SWR=3.9.0 > src/gallium/drivers/swr > >> >> I'm not exactly sure what in gallium only needs LLVM 3.3, but it looks >> to me like we need at least 3.8 and that would limit us to Android N >> and later for enabling LLVM. Is that a correct assumption for >> android-x86? We are only talking about what current mesa master >> supports here. >> > Rob the above list should help you connect the LLVM version dots. > On the question - as long as you guys are happy, I'm happy :-) > > -Emil > ___ > 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] Android: fix r300g only build
On 27 April 2017 at 16:11, Rob Herring wrote: > > BTW, mesa lists this as the LLVM version requirements: > > LLVM_REQUIRED_GALLIUM=3.3.0 src/gallium/auxiliary/{draw,gallivm}, used by - nouveau (nv30), i915, r300, softpipe (yes) and svga - optional - llvmpipe, swr, radeonsi - mandatory > LLVM_REQUIRED_OPENCL=3.6.0 src/gallium/state_trackers/clover/ > LLVM_REQUIRED_R600=3.8.0 src/gallium/drivers/{r600,radeon} > LLVM_REQUIRED_RADEONSI=3.8.0 src/gallium/drivers/{radeonsi,radeon} > LLVM_REQUIRED_RADV=3.9.0 src/amd/vulkan/ > LLVM_REQUIRED_SWR=3.9.0 src/gallium/drivers/swr > > I'm not exactly sure what in gallium only needs LLVM 3.3, but it looks > to me like we need at least 3.8 and that would limit us to Android N > and later for enabling LLVM. Is that a correct assumption for > android-x86? We are only talking about what current mesa master > supports here. > Rob the above list should help you connect the LLVM version dots. On the question - as long as you guys are happy, I'm happy :-) -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] Android: fix r300g only build
On Thu, Apr 27, 2017 at 8:07 AM, Rob Herring wrote: > On Wed, Apr 26, 2017 at 6:39 PM, Mauro Rossi wrote: >> 2017-04-27 0:37 GMT+02:00 Rob Herring : >>> >>> On Tue, Apr 25, 2017 at 3:12 PM, Rob Herring wrote: >>> > On Tue, Apr 25, 2017 at 1:50 PM, Mauro Rossi >>> > wrote: >>> >> 2017-04-25 18:21 GMT+02:00 Emil Velikov : >>> >>> >>> >>> On 24 April 2017 at 22:49, Rob Herring wrote: >>> >>> > On Mon, Apr 24, 2017 at 11:59 AM, Emil Velikov >>> >>> > wrote: >>> >>> >> Hi Rob, >>> >>> >> >>> >>> >> On 24 April 2017 at 17:46, Rob Herring wrote: >>> >>> >>> If r300g is the only radeon driver built, the Android build fails to >>> >>> >>> build: [...] >>> >> BTW, Rob have you tested the llvm 3.9.0 branch I provided for radeonsi >>> >> building purposes, does it build with AOSP/O preview? >>> > >>> > No, sorry I haven't gotten to that. >>> >>> I've now got radeonsi building and the necessary pieces for building >>> llvm in place. master has moved to blueprint files from makefiles, so >>> there wasn't a whole lot of direct reuse from your branch. I've pushed >>> the changes for LLVM[1] and the rest of my clean-up[2]. Any compile >>> testing on L or M in particular would be great. >>> >>> Rob >>> >>> [1] https://github.com/robherring/llvm.git amdgpu >>> [2] https://github.com/robherring/mesa.git android-make-cleanup >> >> >> Thanks Rob, I'll test build in the weekend on M, N >> as in L libdrm and especially drm_gralloc/drm_hwcomposer require a lot of >> hacks > > I would test with current libdrm. BTW, mesa lists this as the LLVM version requirements: LLVM_REQUIRED_GALLIUM=3.3.0 LLVM_REQUIRED_OPENCL=3.6.0 LLVM_REQUIRED_R600=3.8.0 LLVM_REQUIRED_RADEONSI=3.8.0 LLVM_REQUIRED_RADV=3.9.0 LLVM_REQUIRED_SWR=3.9.0 I'm not exactly sure what in gallium only needs LLVM 3.3, but it looks to me like we need at least 3.8 and that would limit us to Android N and later for enabling LLVM. Is that a correct assumption for android-x86? We are only talking about what current mesa master supports here. Rob ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] Android: fix r300g only build
On Wed, Apr 26, 2017 at 6:39 PM, Mauro Rossi wrote: > 2017-04-27 0:37 GMT+02:00 Rob Herring : >> >> On Tue, Apr 25, 2017 at 3:12 PM, Rob Herring wrote: >> > On Tue, Apr 25, 2017 at 1:50 PM, Mauro Rossi wrote: >> >> 2017-04-25 18:21 GMT+02:00 Emil Velikov : >> >>> >> >>> On 24 April 2017 at 22:49, Rob Herring wrote: >> >>> > On Mon, Apr 24, 2017 at 11:59 AM, Emil Velikov >> >>> > wrote: >> >>> >> Hi Rob, >> >>> >> >> >>> >> On 24 April 2017 at 17:46, Rob Herring wrote: >> >>> >>> If r300g is the only radeon driver built, the Android build fails to >> >>> >>> build: >> >>> >>> >> >>> >>> ninja: error: >> >>> >>> 'out/target/product/linaro_x86_64/obj/STATIC_LIBRARIES/libmesa_pipe_radeon_intermediates/export_includes', >> >>> >>> needed by >> >>> >>> 'out/target/product/linaro_x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/import_includes', >> >>> >>> missing and no known rule to make it >> >>> >>> >> >>> >>> This is because the path to build libmesa_pipe_radeon was only >> >>> >>> getting >> >>> >>> added for r600g and radeonsi, but the library dependency was added >> >>> >>> for >> >>> >>> all radeon drivers. As libmesa_pipe_radeon is not needed for r300g, >> >>> >>> drop >> >>> >>> the library dependency. >> >>> >>> >> >>> >> I think we want to move libmesa_amdgpu_addrlib in a similar way. The >> >>> >> lib is used/required by libmesa_winsys_amdgpu which is a r600/radeonsi >> >>> >> only. >> >>> >> Can you please build test that and send a patch (or even squash here >> >>> >> if you prefer)? >> >>> > >> >>> > You are right. Looking at this a bit more, I think we want to push all >> >>> > the "extra" libraries down into the driver makefiles. With that we can >> >>> > also properly export and import include directories. >> >>> > >> >>> >> The patch as-is >> >>> >> Acked-by: Emil Velikov >> >>> > >> >>> > This one fixes the build, so can you apply it and I'll send a >> >>> > follow-up series with further clean-ups. They'll need Mauro's help to >> >>> > test because I don't have radeonsi building. >> >>> > >> >>> Pushed this one, thanks. >> >>> >> >>> Fwiw one doesn't need anything r600 or radeonsi related. Just move >> >>> libmesa_amdgpu_addrlib out of r300 (as we do here for >> >>> libmesa_pipe_radeon) and see that things link fine. >> > >> > The problem is not needing h/w, but radeonsi doesn't build with >> > mainline AOSP. There's additional LLVM bits needed. >> > >> >>> Either way mostly thinking out loud. >> >>> >> >>> -Emil >> >> >> >> >> >> Hi Rob, Emil, >> >> >> >> I tested building r300g, r600g, radeonsi together and the build is broken, >> >> >> >> due to multiple symbols defintion, which happens due to the use of >> >> >> >> LOCAL_WHOLE_STATIC_LIBRARIES := \ >> >> $(gallium_DRIVERS) \ >> > >> > $(sort $(gallium_DRIVERS)) will fix this as sort removes duplicates. I >> > hit this in the follow-up I'm working on. Will post it soon. >> > >> >> ... >> >> >> >> prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/bin/ld: >> >> error: >> >> out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_pipe_radeon_intermediates/libmesa_pipe_radeon.a(cayman_msaa.o): >> >> multiple definition of 'cayman_emit_msaa_config' >> >> prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/bin/ld: >> >> out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_pipe_radeon_intermediates/libmesa_pipe_radeon.a(cayman_msaa.o): >> >> previous definition here >> >> >> >> [repeating for all other symbols] >> >> >> >> So now we need revert or correct to support radeonsi also, as before >> >> it was working, >> >> and have 'r300g U r600g U radeonsi' support is better that having the >> >> choice between 'r300g' and 'r300g U r600g'. >> >> >> >> BTW, Rob have you tested the llvm 3.9.0 branch I provided for radeonsi >> >> building purposes, does it build with AOSP/O preview? >> > >> > No, sorry I haven't gotten to that. >> >> I've now got radeonsi building and the necessary pieces for building >> llvm in place. master has moved to blueprint files from makefiles, so >> there wasn't a whole lot of direct reuse from your branch. I've pushed >> the changes for LLVM[1] and the rest of my clean-up[2]. Any compile >> testing on L or M in particular would be great. >> >> Rob >> >> [1] https://github.com/robherring/llvm.git amdgpu >> [2] https://github.com/robherring/mesa.git android-make-cleanup > > > Thanks Rob, I'll test build in the weekend on M, N > as in L libdrm and especially drm_gralloc/drm_hwcomposer require a lot of > hacks I would test with current libdrm. > Following questions about LLVM: > > I've seen that you unconditionally added libAMDGPU* whole static > libraries to libLLVM shared, > we were just discussing with Chih-Wei about keeping libLLVM gpu > agnostic as much as possible, > so if I understood it correctly it would be better to avoid setting > conditions to add libAMDGPU* based on radeonsi/swrast Perhaps, but I haven't figured out how to do that with b
Re: [Mesa-dev] [PATCH] Android: fix r300g only build
2017-04-27 0:37 GMT+02:00 Rob Herring : > > On Tue, Apr 25, 2017 at 3:12 PM, Rob Herring wrote: > > On Tue, Apr 25, 2017 at 1:50 PM, Mauro Rossi wrote: > >> 2017-04-25 18:21 GMT+02:00 Emil Velikov : > >>> > >>> On 24 April 2017 at 22:49, Rob Herring wrote: > >>> > On Mon, Apr 24, 2017 at 11:59 AM, Emil Velikov > >>> > wrote: > >>> >> Hi Rob, > >>> >> > >>> >> On 24 April 2017 at 17:46, Rob Herring wrote: > >>> >>> If r300g is the only radeon driver built, the Android build fails to > >>> >>> build: > >>> >>> > >>> >>> ninja: error: > >>> >>> 'out/target/product/linaro_x86_64/obj/STATIC_LIBRARIES/libmesa_pipe_radeon_intermediates/export_includes', > >>> >>> needed by > >>> >>> 'out/target/product/linaro_x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/import_includes', > >>> >>> missing and no known rule to make it > >>> >>> > >>> >>> This is because the path to build libmesa_pipe_radeon was only getting > >>> >>> added for r600g and radeonsi, but the library dependency was added for > >>> >>> all radeon drivers. As libmesa_pipe_radeon is not needed for r300g, > >>> >>> drop > >>> >>> the library dependency. > >>> >>> > >>> >> I think we want to move libmesa_amdgpu_addrlib in a similar way. The > >>> >> lib is used/required by libmesa_winsys_amdgpu which is a r600/radeonsi > >>> >> only. > >>> >> Can you please build test that and send a patch (or even squash here > >>> >> if you prefer)? > >>> > > >>> > You are right. Looking at this a bit more, I think we want to push all > >>> > the "extra" libraries down into the driver makefiles. With that we can > >>> > also properly export and import include directories. > >>> > > >>> >> The patch as-is > >>> >> Acked-by: Emil Velikov > >>> > > >>> > This one fixes the build, so can you apply it and I'll send a > >>> > follow-up series with further clean-ups. They'll need Mauro's help to > >>> > test because I don't have radeonsi building. > >>> > > >>> Pushed this one, thanks. > >>> > >>> Fwiw one doesn't need anything r600 or radeonsi related. Just move > >>> libmesa_amdgpu_addrlib out of r300 (as we do here for > >>> libmesa_pipe_radeon) and see that things link fine. > > > > The problem is not needing h/w, but radeonsi doesn't build with > > mainline AOSP. There's additional LLVM bits needed. > > > >>> Either way mostly thinking out loud. > >>> > >>> -Emil > >> > >> > >> Hi Rob, Emil, > >> > >> I tested building r300g, r600g, radeonsi together and the build is broken, > >> > >> due to multiple symbols defintion, which happens due to the use of > >> > >> LOCAL_WHOLE_STATIC_LIBRARIES := \ > >> $(gallium_DRIVERS) \ > > > > $(sort $(gallium_DRIVERS)) will fix this as sort removes duplicates. I > > hit this in the follow-up I'm working on. Will post it soon. > > > >> ... > >> > >> prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/bin/ld: > >> error: > >> out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_pipe_radeon_intermediates/libmesa_pipe_radeon.a(cayman_msaa.o): > >> multiple definition of 'cayman_emit_msaa_config' > >> prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/bin/ld: > >> out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_pipe_radeon_intermediates/libmesa_pipe_radeon.a(cayman_msaa.o): > >> previous definition here > >> > >> [repeating for all other symbols] > >> > >> So now we need revert or correct to support radeonsi also, as before > >> it was working, > >> and have 'r300g U r600g U radeonsi' support is better that having the > >> choice between 'r300g' and 'r300g U r600g'. > >> > >> BTW, Rob have you tested the llvm 3.9.0 branch I provided for radeonsi > >> building purposes, does it build with AOSP/O preview? > > > > No, sorry I haven't gotten to that. > > I've now got radeonsi building and the necessary pieces for building > llvm in place. master has moved to blueprint files from makefiles, so > there wasn't a whole lot of direct reuse from your branch. I've pushed > the changes for LLVM[1] and the rest of my clean-up[2]. Any compile > testing on L or M in particular would be great. > > Rob > > [1] https://github.com/robherring/llvm.git amdgpu > [2] https://github.com/robherring/mesa.git android-make-cleanup Thanks Rob, I'll test build in the weekend on M, N as in L libdrm and especially drm_gralloc/drm_hwcomposer require a lot of hacks Following questions about LLVM: I've seen that you unconditionally added libAMDGPU* whole static libraries to libLLVM shared, we were just discussing with Chih-Wei about keeping libLLVM gpu agnostic as much as possible, so if I understood it correctly it would be better to avoid setting conditions to add libAMDGPU* based on radeonsi/swrast and you consider safe to add libLLVMExecutionEngine, libLLVMRuntimeDyld, libLLVMMMCJIT and libLLVMMOrcJIT to all targets. We just added for x86/x86_64 and skipped libLLVMOrcJIT for the moment is libLLVMOrcJIT necessary with LLVM 3.9.0 to build AOSP/O ? Does the following BP part in shared lib
Re: [Mesa-dev] [PATCH] Android: fix r300g only build
On Tue, Apr 25, 2017 at 3:12 PM, Rob Herring wrote: > On Tue, Apr 25, 2017 at 1:50 PM, Mauro Rossi wrote: >> 2017-04-25 18:21 GMT+02:00 Emil Velikov : >>> >>> On 24 April 2017 at 22:49, Rob Herring wrote: >>> > On Mon, Apr 24, 2017 at 11:59 AM, Emil Velikov >>> > wrote: >>> >> Hi Rob, >>> >> >>> >> On 24 April 2017 at 17:46, Rob Herring wrote: >>> >>> If r300g is the only radeon driver built, the Android build fails to >>> >>> build: >>> >>> >>> >>> ninja: error: >>> >>> 'out/target/product/linaro_x86_64/obj/STATIC_LIBRARIES/libmesa_pipe_radeon_intermediates/export_includes', >>> >>> needed by >>> >>> 'out/target/product/linaro_x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/import_includes', >>> >>> missing and no known rule to make it >>> >>> >>> >>> This is because the path to build libmesa_pipe_radeon was only getting >>> >>> added for r600g and radeonsi, but the library dependency was added for >>> >>> all radeon drivers. As libmesa_pipe_radeon is not needed for r300g, drop >>> >>> the library dependency. >>> >>> >>> >> I think we want to move libmesa_amdgpu_addrlib in a similar way. The >>> >> lib is used/required by libmesa_winsys_amdgpu which is a r600/radeonsi >>> >> only. >>> >> Can you please build test that and send a patch (or even squash here >>> >> if you prefer)? >>> > >>> > You are right. Looking at this a bit more, I think we want to push all >>> > the "extra" libraries down into the driver makefiles. With that we can >>> > also properly export and import include directories. >>> > >>> >> The patch as-is >>> >> Acked-by: Emil Velikov >>> > >>> > This one fixes the build, so can you apply it and I'll send a >>> > follow-up series with further clean-ups. They'll need Mauro's help to >>> > test because I don't have radeonsi building. >>> > >>> Pushed this one, thanks. >>> >>> Fwiw one doesn't need anything r600 or radeonsi related. Just move >>> libmesa_amdgpu_addrlib out of r300 (as we do here for >>> libmesa_pipe_radeon) and see that things link fine. > > The problem is not needing h/w, but radeonsi doesn't build with > mainline AOSP. There's additional LLVM bits needed. > >>> Either way mostly thinking out loud. >>> >>> -Emil >> >> >> Hi Rob, Emil, >> >> I tested building r300g, r600g, radeonsi together and the build is broken, >> >> due to multiple symbols defintion, which happens due to the use of >> >> LOCAL_WHOLE_STATIC_LIBRARIES := \ >> $(gallium_DRIVERS) \ > > $(sort $(gallium_DRIVERS)) will fix this as sort removes duplicates. I > hit this in the follow-up I'm working on. Will post it soon. > >> ... >> >> prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/bin/ld: >> error: >> out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_pipe_radeon_intermediates/libmesa_pipe_radeon.a(cayman_msaa.o): >> multiple definition of 'cayman_emit_msaa_config' >> prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/bin/ld: >> out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_pipe_radeon_intermediates/libmesa_pipe_radeon.a(cayman_msaa.o): >> previous definition here >> >> [repeating for all other symbols] >> >> So now we need revert or correct to support radeonsi also, as before >> it was working, >> and have 'r300g U r600g U radeonsi' support is better that having the >> choice between 'r300g' and 'r300g U r600g'. >> >> BTW, Rob have you tested the llvm 3.9.0 branch I provided for radeonsi >> building purposes, does it build with AOSP/O preview? > > No, sorry I haven't gotten to that. I've now got radeonsi building and the necessary pieces for building llvm in place. master has moved to blueprint files from makefiles, so there wasn't a whole lot of direct reuse from your branch. I've pushed the changes for LLVM[1] and the rest of my clean-up[2]. Any compile testing on L or M in particular would be great. Rob [1] https://github.com/robherring/llvm.git amdgpu [2] https://github.com/robherring/mesa.git android-make-cleanup ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] Android: fix r300g only build
2017-04-25 22:12 GMT+02:00 Rob Herring : > On Tue, Apr 25, 2017 at 1:50 PM, Mauro Rossi wrote: >> 2017-04-25 18:21 GMT+02:00 Emil Velikov : >>> >>> On 24 April 2017 at 22:49, Rob Herring wrote: >>> > On Mon, Apr 24, 2017 at 11:59 AM, Emil Velikov >>> > wrote: >>> >> Hi Rob, >>> >> >>> >> On 24 April 2017 at 17:46, Rob Herring wrote: >>> >>> If r300g is the only radeon driver built, the Android build fails to >>> >>> build: >>> >>> >>> >>> ninja: error: >>> >>> 'out/target/product/linaro_x86_64/obj/STATIC_LIBRARIES/libmesa_pipe_radeon_intermediates/export_includes', >>> >>> needed by >>> >>> 'out/target/product/linaro_x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/import_includes', >>> >>> missing and no known rule to make it >>> >>> >>> >>> This is because the path to build libmesa_pipe_radeon was only getting >>> >>> added for r600g and radeonsi, but the library dependency was added for >>> >>> all radeon drivers. As libmesa_pipe_radeon is not needed for r300g, drop >>> >>> the library dependency. >>> >>> >>> >> I think we want to move libmesa_amdgpu_addrlib in a similar way. The >>> >> lib is used/required by libmesa_winsys_amdgpu which is a r600/radeonsi >>> >> only. >>> >> Can you please build test that and send a patch (or even squash here >>> >> if you prefer)? >>> > >>> > You are right. Looking at this a bit more, I think we want to push all >>> > the "extra" libraries down into the driver makefiles. With that we can >>> > also properly export and import include directories. >>> > >>> >> The patch as-is >>> >> Acked-by: Emil Velikov >>> > >>> > This one fixes the build, so can you apply it and I'll send a >>> > follow-up series with further clean-ups. They'll need Mauro's help to >>> > test because I don't have radeonsi building. >>> > >>> Pushed this one, thanks. >>> >>> Fwiw one doesn't need anything r600 or radeonsi related. Just move >>> libmesa_amdgpu_addrlib out of r300 (as we do here for >>> libmesa_pipe_radeon) and see that things link fine. > > The problem is not needing h/w, but radeonsi doesn't build with > mainline AOSP. There's additional LLVM bits needed. > >>> Either way mostly thinking out loud. >>> >>> -Emil >> >> >> Hi Rob, Emil, >> >> I tested building r300g, r600g, radeonsi together and the build is broken, >> >> due to multiple symbols defintion, which happens due to the use of >> >> LOCAL_WHOLE_STATIC_LIBRARIES := \ >> $(gallium_DRIVERS) \ > > $(sort $(gallium_DRIVERS)) will fix this as sort removes duplicates. I > hit this in the follow-up I'm working on. Will post it soon. Great! $(sort $(gallium_DRIVERS)) indeed works as in whole static dependencies the order does not matter. libmesa_amdgpu_addrlib is currently not a problem as it is unconditionally built, but which are the correct dependencies? radeonsi and r600g? What about keeping void lines between ifneq..endif in the whole list of drivers? Mauro ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] Android: fix r300g only build
On Tue, Apr 25, 2017 at 1:50 PM, Mauro Rossi wrote: > 2017-04-25 18:21 GMT+02:00 Emil Velikov : >> >> On 24 April 2017 at 22:49, Rob Herring wrote: >> > On Mon, Apr 24, 2017 at 11:59 AM, Emil Velikov >> > wrote: >> >> Hi Rob, >> >> >> >> On 24 April 2017 at 17:46, Rob Herring wrote: >> >>> If r300g is the only radeon driver built, the Android build fails to >> >>> build: >> >>> >> >>> ninja: error: >> >>> 'out/target/product/linaro_x86_64/obj/STATIC_LIBRARIES/libmesa_pipe_radeon_intermediates/export_includes', >> >>> needed by >> >>> 'out/target/product/linaro_x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/import_includes', >> >>> missing and no known rule to make it >> >>> >> >>> This is because the path to build libmesa_pipe_radeon was only getting >> >>> added for r600g and radeonsi, but the library dependency was added for >> >>> all radeon drivers. As libmesa_pipe_radeon is not needed for r300g, drop >> >>> the library dependency. >> >>> >> >> I think we want to move libmesa_amdgpu_addrlib in a similar way. The >> >> lib is used/required by libmesa_winsys_amdgpu which is a r600/radeonsi >> >> only. >> >> Can you please build test that and send a patch (or even squash here >> >> if you prefer)? >> > >> > You are right. Looking at this a bit more, I think we want to push all >> > the "extra" libraries down into the driver makefiles. With that we can >> > also properly export and import include directories. >> > >> >> The patch as-is >> >> Acked-by: Emil Velikov >> > >> > This one fixes the build, so can you apply it and I'll send a >> > follow-up series with further clean-ups. They'll need Mauro's help to >> > test because I don't have radeonsi building. >> > >> Pushed this one, thanks. >> >> Fwiw one doesn't need anything r600 or radeonsi related. Just move >> libmesa_amdgpu_addrlib out of r300 (as we do here for >> libmesa_pipe_radeon) and see that things link fine. The problem is not needing h/w, but radeonsi doesn't build with mainline AOSP. There's additional LLVM bits needed. >> Either way mostly thinking out loud. >> >> -Emil > > > Hi Rob, Emil, > > I tested building r300g, r600g, radeonsi together and the build is broken, > > due to multiple symbols defintion, which happens due to the use of > > LOCAL_WHOLE_STATIC_LIBRARIES := \ > $(gallium_DRIVERS) \ $(sort $(gallium_DRIVERS)) will fix this as sort removes duplicates. I hit this in the follow-up I'm working on. Will post it soon. > ... > > prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/bin/ld: > error: > out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_pipe_radeon_intermediates/libmesa_pipe_radeon.a(cayman_msaa.o): > multiple definition of 'cayman_emit_msaa_config' > prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/bin/ld: > out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_pipe_radeon_intermediates/libmesa_pipe_radeon.a(cayman_msaa.o): > previous definition here > > [repeating for all other symbols] > > So now we need revert or correct to support radeonsi also, as before > it was working, > and have 'r300g U r600g U radeonsi' support is better that having the > choice between 'r300g' and 'r300g U r600g'. > > BTW, Rob have you tested the llvm 3.9.0 branch I provided for radeonsi > building purposes, does it build with AOSP/O preview? No, sorry I haven't gotten to that. Rob ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] Android: fix r300g only build
2017-04-25 18:21 GMT+02:00 Emil Velikov : > > On 24 April 2017 at 22:49, Rob Herring wrote: > > On Mon, Apr 24, 2017 at 11:59 AM, Emil Velikov > > wrote: > >> Hi Rob, > >> > >> On 24 April 2017 at 17:46, Rob Herring wrote: > >>> If r300g is the only radeon driver built, the Android build fails to > >>> build: > >>> > >>> ninja: error: > >>> 'out/target/product/linaro_x86_64/obj/STATIC_LIBRARIES/libmesa_pipe_radeon_intermediates/export_includes', > >>> needed by > >>> 'out/target/product/linaro_x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/import_includes', > >>> missing and no known rule to make it > >>> > >>> This is because the path to build libmesa_pipe_radeon was only getting > >>> added for r600g and radeonsi, but the library dependency was added for > >>> all radeon drivers. As libmesa_pipe_radeon is not needed for r300g, drop > >>> the library dependency. > >>> > >> I think we want to move libmesa_amdgpu_addrlib in a similar way. The > >> lib is used/required by libmesa_winsys_amdgpu which is a r600/radeonsi > >> only. > >> Can you please build test that and send a patch (or even squash here > >> if you prefer)? > > > > You are right. Looking at this a bit more, I think we want to push all > > the "extra" libraries down into the driver makefiles. With that we can > > also properly export and import include directories. > > > >> The patch as-is > >> Acked-by: Emil Velikov > > > > This one fixes the build, so can you apply it and I'll send a > > follow-up series with further clean-ups. They'll need Mauro's help to > > test because I don't have radeonsi building. > > > Pushed this one, thanks. > > Fwiw one doesn't need anything r600 or radeonsi related. Just move > libmesa_amdgpu_addrlib out of r300 (as we do here for > libmesa_pipe_radeon) and see that things link fine. > Either way mostly thinking out loud. > > -Emil Hi Rob, Emil, I tested building r300g, r600g, radeonsi together and the build is broken, due to multiple symbols defintion, which happens due to the use of LOCAL_WHOLE_STATIC_LIBRARIES := \ $(gallium_DRIVERS) \ ... prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/bin/ld: error: out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_pipe_radeon_intermediates/libmesa_pipe_radeon.a(cayman_msaa.o): multiple definition of 'cayman_emit_msaa_config' prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/bin/ld: out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_pipe_radeon_intermediates/libmesa_pipe_radeon.a(cayman_msaa.o): previous definition here [repeating for all other symbols] So now we need revert or correct to support radeonsi also, as before it was working, and have 'r300g U r600g U radeonsi' support is better that having the choice between 'r300g' and 'r300g U r600g'. BTW, Rob have you tested the llvm 3.9.0 branch I provided for radeonsi building purposes, does it build with AOSP/O preview? Thanks Mauro PS: Moving libmesa_amdgpu_addrlib would cause the same duplication of symbols. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] Android: fix r300g only build
On 24 April 2017 at 22:49, Rob Herring wrote: > On Mon, Apr 24, 2017 at 11:59 AM, Emil Velikov > wrote: >> Hi Rob, >> >> On 24 April 2017 at 17:46, Rob Herring wrote: >>> If r300g is the only radeon driver built, the Android build fails to >>> build: >>> >>> ninja: error: >>> 'out/target/product/linaro_x86_64/obj/STATIC_LIBRARIES/libmesa_pipe_radeon_intermediates/export_includes', >>> needed by >>> 'out/target/product/linaro_x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/import_includes', >>> missing and no known rule to make it >>> >>> This is because the path to build libmesa_pipe_radeon was only getting >>> added for r600g and radeonsi, but the library dependency was added for >>> all radeon drivers. As libmesa_pipe_radeon is not needed for r300g, drop >>> the library dependency. >>> >> I think we want to move libmesa_amdgpu_addrlib in a similar way. The >> lib is used/required by libmesa_winsys_amdgpu which is a r600/radeonsi >> only. >> Can you please build test that and send a patch (or even squash here >> if you prefer)? > > You are right. Looking at this a bit more, I think we want to push all > the "extra" libraries down into the driver makefiles. With that we can > also properly export and import include directories. > >> The patch as-is >> Acked-by: Emil Velikov > > This one fixes the build, so can you apply it and I'll send a > follow-up series with further clean-ups. They'll need Mauro's help to > test because I don't have radeonsi building. > Pushed this one, thanks. Fwiw one doesn't need anything r600 or radeonsi related. Just move libmesa_amdgpu_addrlib out of r300 (as we do here for libmesa_pipe_radeon) and see that things link fine. Either way mostly thinking out loud. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] Android: fix r300g only build
On Mon, Apr 24, 2017 at 11:59 AM, Emil Velikov wrote: > Hi Rob, > > On 24 April 2017 at 17:46, Rob Herring wrote: >> If r300g is the only radeon driver built, the Android build fails to >> build: >> >> ninja: error: >> 'out/target/product/linaro_x86_64/obj/STATIC_LIBRARIES/libmesa_pipe_radeon_intermediates/export_includes', >> needed by >> 'out/target/product/linaro_x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/import_includes', >> missing and no known rule to make it >> >> This is because the path to build libmesa_pipe_radeon was only getting >> added for r600g and radeonsi, but the library dependency was added for >> all radeon drivers. As libmesa_pipe_radeon is not needed for r300g, drop >> the library dependency. >> > I think we want to move libmesa_amdgpu_addrlib in a similar way. The > lib is used/required by libmesa_winsys_amdgpu which is a r600/radeonsi > only. > Can you please build test that and send a patch (or even squash here > if you prefer)? You are right. Looking at this a bit more, I think we want to push all the "extra" libraries down into the driver makefiles. With that we can also properly export and import include directories. > The patch as-is > Acked-by: Emil Velikov This one fixes the build, so can you apply it and I'll send a follow-up series with further clean-ups. They'll need Mauro's help to test because I don't have radeonsi building. Rob ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] Android: fix r300g only build
Hi Rob, On 24 April 2017 at 17:46, Rob Herring wrote: > If r300g is the only radeon driver built, the Android build fails to > build: > > ninja: error: > 'out/target/product/linaro_x86_64/obj/STATIC_LIBRARIES/libmesa_pipe_radeon_intermediates/export_includes', > needed by > 'out/target/product/linaro_x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/import_includes', > missing and no known rule to make it > > This is because the path to build libmesa_pipe_radeon was only getting > added for r600g and radeonsi, but the library dependency was added for > all radeon drivers. As libmesa_pipe_radeon is not needed for r300g, drop > the library dependency. > I think we want to move libmesa_amdgpu_addrlib in a similar way. The lib is used/required by libmesa_winsys_amdgpu which is a r600/radeonsi only. Can you please build test that and send a patch (or even squash here if you prefer)? The patch as-is Acked-by: Emil Velikov -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev