Re: [Mesa-dev] [PATCH] gallivm: fix compilation against LLVM r317488

2017-11-07 Thread Tobias Droste
> >>> break; > >>> case LP_FLOAT_MODE_UNSAFE_FP_MATH: > >>> +#if HAVE_LLVM >= 0x0600 > >>> + flags.setFast(); > >>> +#else > >>> flags.setUnsafeAlgebra(); > >>> +#endif > >>>

[Mesa-dev] [PATCH] [RFC] gallivm: Use new LLVM fast-math-flags API

2017-11-06 Thread Tobias Droste
LLVM 6 changed the API on the fast-math-flags: https://reviews.llvm.org/rL317488 NOTE: This also enables the new flag 'ApproxFunc' to allow for approximations for library functions (sin, cos, ...). I'm not completly convinced, that this is something mesa should do. Signed-off-by: Tobias Droste

Re: [Mesa-dev] [PATCH 3/7] configure.ac: rework llvm libs handling for 3.9+

2017-10-05 Thread Tobias Droste
gt; +dnl llvm-config lists the system libs on a separate line. While > +dnl invoking --system-libs without --link-static assumes shared > link. > +dnl Everybody now, say - Thank you LLVM developers > +LLVM_LIBS="`echo $LLVM_LIBS | $SED

Re: [Mesa-dev] [PATCH 1/7] configure.ac: remove no longer necessary llvm-config --libs check

2017-10-05 Thread Tobias Droste
Reviewed-by: Tobias Droste <tdro...@gmx.de> Am Donnerstag, 5. Oktober 2017, 12:19:03 CEST schrieb Emil Velikov: > From: Emil Velikov <emil.veli...@collabora.com> > > Prior to the refactor/cleanup by Tobias one could add an invalid > component to LLVM_COMPONENTS. >

Re: [Mesa-dev] [PATCH 2/7] configure.ac: factor out detection for old and buggy llvm

2017-10-05 Thread Tobias Droste
Reviewed-by: Tobias Droste <tdro...@gmx.de> Am Donnerstag, 5. Oktober 2017, 12:19:04 CEST schrieb Emil Velikov: > From: Emil Velikov <emil.veli...@collabora.com> > > As of LLVM 3.9 one could use consistent ways to handle the component. > Factor out the current hand

Re: [Mesa-dev] [PATCH 6/7] configure.ac: add missing LLVM components for OpenCL

2017-10-05 Thread Tobias Droste
Reviewed-by: Tobias Droste <tdro...@gmx.de> Am Donnerstag, 5. Oktober 2017, 12:19:08 CEST schrieb Emil Velikov: > From: Emil Velikov <emil.veli...@collabora.com> > > Coverage and LTO seems to be hard requirements for Clang, while > coroutines is needed as of LLVM/Clang

Re: [Mesa-dev] [PATCH 5/7] configure.ac: add llvm_add_optional_component helper

2017-10-05 Thread Tobias Droste
ts. Others are to follow > shortly. > > Cc: mesa-sta...@lists.freedesktop.org > Cc: Tobias Droste <tdro...@gmx.de> > Signed-off-by: Emil Velikov <emil.veli...@collabora.com> > --- > Tobias, any preference if we keep this separate helperor fold it with > llvm_add_compo

Re: [Mesa-dev] [PATCH 2/6] configure.ac: Fix error message in radeon_llvm_check().

2017-03-06 Thread Tobias Droste
Oops... :-) Reviewed-by: Tobias Droste <tdro...@gmx.de> Am Montag, 6. März 2017, 20:06:07 CET schrieb Matt Turner: > It printed the version of LLVM ($1): > >configure: error: 3.6.0 requires libelf when using llvm > > instead of the driver name ($2): > >conf

Re: [Mesa-dev] [PATCH 2/4] util/disk_cache: compress individual cache entries

2017-03-01 Thread Tobias Droste
Hi Timothy, if you plan to support multiple compression algorithms, shouldn't "struct cache_entry_file_data" contain some info about what compression algorithm was used to compress the data? Or is this already there and I missed it? Am Donnerstag, 2. März 2017, 03:20:05 CET schrieb Matt

Re: [Mesa-dev] [PATCH 8/8] r600/radeonsi: enableglsl/tgsion-diskcache

2017-02-26 Thread Tobias Droste
Mit freundlichen Grüßen Am Freitag, 24. Februar 2017, 11:25:24 CET schrieb Marc Dietrich: > Am Donnerstag, 23. Februar 2017, 11:50:07 CET schrieb Emil Velikov: > > On 23 February 2017 at 10:20, Marc Dietrich wrote: > > > Am Donnerstag, 23. Februar 2017, 10:54:39 CET schrieb

Re: [Mesa-dev] [PATCH v2 07/17] configure.ac: Rework MESA_LLVM and LLVM detection

2017-02-09 Thread Tobias Droste
Reviewed-by: Tobias Droste <tdro...@gmx.de> Am Donnerstag, 9. Februar 2017, 20:54:26 CET schrieb Emil Velikov: > From: Tobias Droste <tdro...@gmx.de> > > Set FOUND_LLVM only when LLVM is present (checking for exact version/etc > is deferred) and use enable-gallium-llv

Re: [Mesa-dev] [PATCH v2 14/17] configure.ac: correctly manage llvm auto-detection

2017-02-09 Thread Tobias Droste
Reviewed-by: Tobias Droste <tdro...@gmx.de> for v2, too Am Donnerstag, 9. Februar 2017, 20:57:45 CET schrieb Emil Velikov: > From: Emil Velikov <emil.veli...@collabora.com> > > Earlier refactoring commits changed from one, dare I say it, broken > behaviour to another. Nam

Re: [Mesa-dev] [PATCH v2 06/17] configure.ac: move enable-gallium-llvm dependency with-gallium-drivers

2017-02-09 Thread Tobias Droste
st -n "$with_gallium_drivers"; then > done > fi > > -if test "x$enable_gallium_llvm" == "xyes"; then > +if test "x$enable_gallium_llvm" == "xyes" -a "$with_gallium_drivers"; then Does this actually work? Don't y

Re: [Mesa-dev] [PATCH 16/17] configure.ac: supersede --enable-gallium-llvm over --enable-llvm

2017-02-08 Thread Tobias Droste
Reviewed-by: Tobias Droste <tdro...@gmx.de> Am Dienstag, 7. Februar 2017, 22:44:58 CET schrieb Emil Velikov: > From: Emil Velikov <emil.veli...@collabora.com> > > Currently we have extra (somewhat questionable) modularity, such that > one could build some parts wi

Re: [Mesa-dev] [PATCH 05/17] configure.ac: Mandate --enable-gallium-llvm when checking LLVM version

2017-02-08 Thread Tobias Droste
Am Mittwoch, 8. Februar 2017, 10:39:56 CET schrieb Emil Velikov: > On 8 February 2017 at 01:03, Tobias Droste <tdro...@gmx.de> wrote: > > Small comment below. Either way: > > > > Reviewed-by: Tobias Droste <tdro...@gmx.de> > > > > Am Dienstag, 7. Fe

Re: [Mesa-dev] [PATCH 06/17] configure.ac: Remove artificial --enable-gallium-llvm dependency

2017-02-08 Thread Tobias Droste
Am Mittwoch, 8. Februar 2017, 10:49:47 CET schrieb Emil Velikov: > On 8 February 2017 at 01:08, Tobias Droste <tdro...@gmx.de> wrote: > > Does this cause problems if someone builds just intel classic drivers > > without LLVM installed? > > The classic (with_dri_driv

Re: [Mesa-dev] [PATCH 15/17] configure.ac: remove dummy radeon_gallium_llvm_check()

2017-02-07 Thread Tobias Droste
Reviewed-by: Tobias Droste <tdro...@gmx.de> Am Dienstag, 7. Februar 2017, 22:44:57 CET schrieb Emil Velikov: > From: Emil Velikov <emil.veli...@collabora.com> > > The extra function brings no added benefit as of earlier commit which > made llvm_require_version (as cal

Re: [Mesa-dev] [PATCH 13/17] configure.ac: disable enable_gallium_llvm in the !x86 case

2017-02-07 Thread Tobias Droste
Reviewed-by: Tobias Droste <tdro...@gmx.de> Am Dienstag, 7. Februar 2017, 22:44:55 CET schrieb Emil Velikov: > From: Emil Velikov <emil.veli...@collabora.com> > > Already implicitly handled throughout, but keep it clear and disable > gallium-llvm. This change should be

Re: [Mesa-dev] [PATCH 07/17] configure.ac: Rework MESA_LLVM and LLVM detection

2017-02-07 Thread Tobias Droste
Reviewed-by: Tobias Droste <tdro...@gmx.de> Am Dienstag, 7. Februar 2017, 22:44:49 CET schrieb Emil Velikov: > From: Tobias Droste <tdro...@gmx.de> > > Set FOUND_LLVM only when LLVM is present (checking for exact version/etc > is deferred) and use enable-gallium-llvm to

Re: [Mesa-dev] [PATCH 06/17] configure.ac: Remove artificial --enable-gallium-llvm dependency

2017-02-07 Thread Tobias Droste
h-gallium-drivers. > > Since we effectively made --enable-gallium-llvm mean --enable-llvm with > earlier commits, we need to remove the, now artificial, requirement. > > Otherwise we'll error (as below) when building RADV. > > configure: error: --enable-gallium-llvm is req

Re: [Mesa-dev] [PATCH 05/17] configure.ac: Mandate --enable-gallium-llvm when checking LLVM version

2017-02-07 Thread Tobias Droste
Small comment below. Either way: Reviewed-by: Tobias Droste <tdro...@gmx.de> Am Dienstag, 7. Februar 2017, 22:44:47 CET schrieb Emil Velikov: > From: Emil Velikov <emil.veli...@collabora.com> > > With this change we effectively require --enable-gallium-llvm when > bu

Re: [Mesa-dev] [PATCH 04/17] configure.ac: Rename the gallium_require_llvm helper

2017-02-07 Thread Tobias Droste
Reviewed-by: Tobias Droste <tdro...@gmx.de> Am Dienstag, 7. Februar 2017, 22:44:46 CET schrieb Emil Velikov: > From: Emil Velikov <emil.veli...@collabora.com> > > Drop the gallium prefix since we're about it use it throughout the > configure. > > Note we do want to

Re: [Mesa-dev] [PATCH 02/17] configure.ac: move AC_ARG_ENABLE([gallium-llvm] hunk further up

2017-02-07 Thread Tobias Droste
Reviewed-by: Tobias Droste <tdro...@gmx.de> Am Dienstag, 7. Februar 2017, 22:44:44 CET schrieb Emil Velikov: > From: Emil Velikov <emil.veli...@collabora.com> > > With next commits we'll require --enable-gallium-llvm (en route to a > greater good later on) for RADV

Re: [Mesa-dev] [PATCH 01/17] configure.ac: remove unused AC_SUBST([MESA_LLVM])

2017-02-07 Thread Tobias Droste
Reviewed-by: Tobias Droste <tdro...@gmx.de> Am Dienstag, 7. Februar 2017, 22:44:43 CET schrieb Emil Velikov: > From: Emil Velikov <emil.veli...@collabora.com> > > Signed-off-by: Emil Velikov <emil.veli...@collabora.com> > --- > configure.ac | 1 - > 1 file ch

Re: [Mesa-dev] [PATCH 0/4] configure.ac: LLVM again!

2017-01-29 Thread Tobias Droste
Am Sonntag, 29. Januar 2017, 22:31:55 CET schrieb Marek Olšák: > On Sat, Jan 28, 2017 at 9:29 PM, Tobias Droste <tdro...@gmx.de> wrote: > > Am Samstag, 28. Januar 2017, 16:09:29 CET schrieb Marek Olšák: > >> On Sat, Jan 28, 2017 at 3:31 PM, Ilia Mirkin <imir...@alum.mit.

Re: [Mesa-dev] [PATCH 0/4] configure.ac: LLVM again!

2017-01-28 Thread Tobias Droste
s, but I'm not seeing it. > > > > On Jan 28, 2017 8:57 AM, "Tobias Droste" <tdro...@gmx.de> wrote: > > > > This is a reworked series of the previous LLVM related changes to > > configure.ac that were reverted due to breaking scons. > > > > This

Re: [Mesa-dev] [PATCH 0/4] configure.ac: LLVM again!

2017-01-28 Thread Tobias Droste
. Januar 2017, 09:31:28 CET schrieb Ilia Mirkin: > Can you explain why it's a desirable goal to be able to build radv without > --enable-gallium-llvm? Perhaps it's obvious, but I'm not seeing it. > > On Jan 28, 2017 8:57 AM, "Tobias Droste" <tdro...@gmx.de> wrote: &g

[Mesa-dev] [PATCH 3/4 v2] configure.ac: Separate HAVE_LLVM defines for gallium and radv

2017-01-28 Thread Tobias Droste
Only define HAVE_LLVM if --enable-gallium-llvm is provided. If radv is built add HAVE_LLVM_RADV define with the same value as HAVE_LLVM. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99010 Signed-off-by: Tobias Droste <tdro...@gmx.de> --- configure.ac | 3 ++

Re: [Mesa-dev] [PATCH 3/4] configure.ac: Separate HAVE_LLVM defines for gallium and radv

2017-01-28 Thread Tobias Droste
Ignore that, wrong version... Am Samstag, 28. Januar 2017, 14:56:59 CET schrieb Tobias Droste: > Only define HAVE_LLVM if --enable-gallium-llvm is provided. > If radv is built add HAVE_LLVM_RADV define with the same value > as HAVE_LLVM. > > Bugzilla: https://bugs.freedesktop.org/

[Mesa-dev] [PATCH 3/4] configure.ac: Separate HAVE_LLVM defines for gallium and radv

2017-01-28 Thread Tobias Droste
Only define HAVE_LLVM if --enable-gallium-llvm is provided. If radv is built add HAVE_LLVM_RADV define with the same value as HAVE_LLVM. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99010 Signed-off-by: Tobias Droste <tdro...@gmx.de> --- configure.ac | 3 ++

[Mesa-dev] [PATCH 4/4] configure.ac: Don't check LLVM version in gallium_require_llvm

2017-01-28 Thread Tobias Droste
DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT -DMESA_LLVM_VERSION_PATCH=$LLVM_VERSION_PATCH" else USE_LLVM_GALLIUM=no fi Signed-off-by: Tobias Droste <tdro...@gmx.de> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> --- configure.ac | 4 +--- 1 file change

[Mesa-dev] [PATCH 2/4] configure.ac: Only set LLVM_LIBS if LLVM is used

2017-01-28 Thread Tobias Droste
Signed-off-by: Tobias Droste <tdro...@gmx.de> --- configure.ac | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 8366672f19..f956df5120 100644 --- a/configure.ac +++ b/configure.ac @@ -1003,13 +1

[Mesa-dev] [PATCH 0/4] configure.ac: LLVM again!

2017-01-28 Thread Tobias Droste
llium-llvm". Patch 1, 2 and 3 are the same as in the previous series, just rebased. The new stuff is in patch 3. Tobias Droste (4): configure.ac: Rename MESA_LLVM to FOUND_LLVM configure.ac: Only set LLVM_LIBS if LLVM is used configure.ac: Separate HAVE_LLVM defines for galliu

[Mesa-dev] [PATCH 1/4] configure.ac: Rename MESA_LLVM to FOUND_LLVM

2017-01-28 Thread Tobias Droste
Signed-off-by: Tobias Droste <tdro...@gmx.de> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> --- configure.ac | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 92339b4a3f..8366672f19 100644 ---

Re: [Mesa-dev] Build failure of Gallium OSMesa without LLVM

2017-01-26 Thread Tobias Droste
Hey Matt, yeah sorry about this, it is a known problem: https://bugs.freedesktop.org/show_bug.cgi?id=99010 A fix was commited but broke scons and Jose reverted it and doesn't accept the way it was fixed in general. See discussion here:

Re: [Mesa-dev] [PATCH 4/6] configure.ac: Set and use HAVE_GALLIUM_LLVM define

2017-01-23 Thread Tobias Droste
Am Montag, 23. Januar 2017, 11:53:18 CET schrieb Jose Fonseca: > On 20/01/17 02:48, Emil Velikov wrote: > > On 19 January 2017 at 19:26, Tobias Droste <tdro...@gmx.de> wrote: > >> Am Mittwoch, 18. Januar 2017, 18:45:04 CET schrieb Emil Velikov: > >>> On 18

Re: [Mesa-dev] [PATCH 4/6] configure.ac: Set and use HAVE_GALLIUM_LLVM define

2017-01-19 Thread Tobias Droste
Am Mittwoch, 18. Januar 2017, 18:45:04 CET schrieb Emil Velikov: > On 18 January 2017 at 18:12, Jose Fonseca wrote: > >>> In order to untangle things we want to have a distinction between the > >>> gallium (gallivm afaict) and other users - RADV presently. > >>> So how about

Re: [Mesa-dev] [PATCH 4/6] configure.ac: Set and use HAVE_GALLIUM_LLVM define

2017-01-18 Thread Tobias Droste
Mit freundlichen Grüßen Tobias Droste Am Mittwoch, 18. Januar 2017, 18:12:37 CET schrieb Jose Fonseca: > On 18/01/17 17:51, Tobias Droste wrote: > > Am Mittwoch, 18. Januar 2017, 15:40:22 CET schrieb Emil Velikov: > >> On 18 January 2017 at 15:11, Jose Fonseca <jfons

Re: [Mesa-dev] [PATCH 8/8] configure.ac: correctly manage llvm auto-detection

2017-01-18 Thread Tobias Droste
Reviewed-by: Tobias Droste <tdro...@gmx.de> Am Mittwoch, 18. Januar 2017, 13:54:04 CET schrieb Emil Velikov: > From: Emil Velikov <emil.veli...@collabora.com> > > Earlier refactoring commits changed from one, dare I say it, broken > behaviour to another. Namely: >

Re: [Mesa-dev] [PATCH 6/8] configure.ac: set LLVM_{C, CXX, LD}FLAGS only as needed

2017-01-18 Thread Tobias Droste
LAGS" > -CFLAGS="$CFLAGS $LLVM_CFLAGS" > +CFLAGS="$CFLAGS $LLVM_CPPFLAGS" if we say we need LLVM_CPPFLAGS shouldn't we also save/set/restore CPPFLAGS instead of CFLAGS? Not sure how this is implemented and it's probably always usi

Re: [Mesa-dev] [PATCH 4/8] configure.ac: don't use == with test

2017-01-18 Thread Tobias Droste
Reviewed-by: Tobias Droste <tdro...@gmx.de> Old habits... sorry :-) Am Mittwoch, 18. Januar 2017, 13:54:00 CET schrieb Emil Velikov: > From: Emil Velikov <emil.veli...@collabora.com> > > Although it works, it's not the correct thing to do. > > Cc: Tobias Droste &l

Re: [Mesa-dev] [PATCH 5/8] Revert "configure.ac: Create correct LLVM_VERSION_INT with minor >= 10"

2017-01-18 Thread Tobias Droste
Reviewed-by: Tobias Droste <tdro...@gmx.de> Am Mittwoch, 18. Januar 2017, 13:54:01 CET schrieb Emil Velikov: > As stated in [1] by the LLVM devs, the new versioning scheme will not > deploy any minor version (i.e. it will always be zero). As such the > patch shoul

Re: [Mesa-dev] [PATCH 3/8] configure.ac: remove unused LLVM variables

2017-01-18 Thread Tobias Droste
Reviewed-by: Tobias Droste <tdro...@gmx.de> Am Mittwoch, 18. Januar 2017, 13:53:59 CET schrieb Emil Velikov: > From: Emil Velikov <emil.veli...@collabora.com> > > LLVM_BINDIR is completely unused while others such as LLVM_LIBDIR are > used only internally. In the lat

Re: [Mesa-dev] [PATCH 2/8] configure.ac: directly print the contents of USE_LLVM

2017-01-18 Thread Tobias Droste
Reviewed-by: Tobias Droste <tdro...@gmx.de> Am Mittwoch, 18. Januar 2017, 13:53:58 CET schrieb Emil Velikov: > From: Emil Velikov <emil.veli...@collabora.com> > > There's no point in the extra conditional. > > Cc: Tobias Droste <tdro...@gmx.de> > Si

Re: [Mesa-dev] [PATCH 1/8] configure.ac: directly print the contents of HAVE_GALLIUM_LLVM

2017-01-18 Thread Tobias Droste
You may want to hold this one until we have a solution for Joses problem. In case the .c file changes stay: Reviewed-by: Tobias Droste <tdro...@gmx.de> Am Mittwoch, 18. Januar 2017, 13:53:57 CET schrieb Emil Velikov: > From: Emil Velikov <emil.veli...@collabora.com> &

Re: [Mesa-dev] [PATCH 4/6] configure.ac: Set and use HAVE_GALLIUM_LLVM define

2017-01-18 Thread Tobias Droste
Am Mittwoch, 18. Januar 2017, 15:40:22 CET schrieb Emil Velikov: > On 18 January 2017 at 15:11, Jose Fonseca wrote: > > I've reverted this and took a closer look. > > > > I'm fine with autoconf glue doing whatever: HAVE_LLVM -> HAVE_GALLIUM_LLVM > > and what not. > > > >

Re: [Mesa-dev] [PATCH] configure.ac: Respect LLVM_CFLAGS in LLVM version detection

2016-12-16 Thread Tobias Droste
Hi Tomasz, does this actually fix anything? Because right now llvm-config.h does not include anything and I doubt it will in the future, as it's just a collection of defines. The path to the header file itself is given by llvm-config ($LLVM_INCLUDEDIR). Did you just happen to see this or do

Re: [Mesa-dev] [PATCH 4/6] configure.ac: Set and use HAVE_GALLIUM_LLVM define

2016-12-16 Thread Tobias Droste
with its optional dependency is a special case in mesa and that's why it is handled in special way (patch 4). All other users have a hard requirement. Tobias Am Donnerstag, 8. Dezember 2016, 23:02:36 CET schrieb Tobias Droste: > Am Donnerstag, 8. Dezember 2016, 17:14:12 CET schrieb Emil Veli

Re: [Mesa-dev] [PATCH 1/6] configure.ac: Rename MESA_LLVM to FOUND_LLVM

2016-12-08 Thread Tobias Droste
Am Donnerstag, 8. Dezember 2016, 16:59:27 CET schrieb Emil Velikov: > On 8 December 2016 at 02:03, Tobias Droste <tdro...@gmx.de> wrote: > > this renames MESA_LLVM to FOUND_LLVM and updates the config.log report > > to say if LLVM is found or not, to make clear th

Re: [Mesa-dev] [PATCH 6/6] configure.ac: Don't check LLVM version in gallium_require_llvm

2016-12-08 Thread Tobias Droste
Am Donnerstag, 8. Dezember 2016, 17:24:14 CET schrieb Emil Velikov: > On 8 December 2016 at 02:03, Tobias Droste <tdro...@gmx.de> wrote: > > This is actually not needed because the version is checked later. > > > > Line 2609: > > if test

Re: [Mesa-dev] [PATCH 4/6] configure.ac: Set and use HAVE_GALLIUM_LLVM define

2016-12-08 Thread Tobias Droste
Am Donnerstag, 8. Dezember 2016, 17:14:12 CET schrieb Emil Velikov: > On 8 December 2016 at 02:03, Tobias Droste <tdro...@gmx.de> wrote: > > Gallium code used HAVE_LLVM to check if it needs to compile code for > > LLVM in header and source files. > > > > With the

Re: [Mesa-dev] [PATCH 2/6] configure.ac: Only set LLVM_LIBS if LLVM is used

2016-12-08 Thread Tobias Droste
Am Donnerstag, 8. Dezember 2016, 17:06:16 CET schrieb Emil Velikov: > On 8 December 2016 at 02:03, Tobias Droste <tdro...@gmx.de> wrote: > > This renames llvm_check_version_for to llvm_require_version and let it > > set a variable to mark that LLVM will be used. > > >

[Mesa-dev] [PATCH 2/6] configure.ac: Only set LLVM_LIBS if LLVM is used

2016-12-07 Thread Tobias Droste
Signed-off-by: Tobias Droste <tdro...@gmx.de> --- configure.ac | 33 - 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 1499380c45..a209d87e62 100644 --- a/configure.ac +++ b/configure.ac @@ -998,13 +

[Mesa-dev] [PATCH 3/6] configure.ac: Only define HAVE_LLVM if LLVM is used

2016-12-07 Thread Tobias Droste
Make sure that HAVE_LLVM compiler define is only set if LLVM is actually used. Signed-off-by: Tobias Droste <tdro...@gmx.de> --- configure.ac | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index a209d87e62..7362ecdfaf

[Mesa-dev] [PATCH 5/6] configure.ac: Make setting LLVM_LIBS a function

2016-12-07 Thread Tobias Droste
Make setting LLVM_LIBS a function, put it to the other LLVM related functions and call it if LLVM is used. Signed-off-by: Tobias Droste <tdro...@gmx.de> --- configure.ac | 109 +-- 1 file changed, 54 insertions(+), 55 deletions(-)

[Mesa-dev] [PATCH 4/6] configure.ac: Set and use HAVE_GALLIUM_LLVM define

2016-12-07 Thread Tobias Droste
Gallium code used HAVE_LLVM to check if it needs to compile code for LLVM in header and source files. With the new logic HAVE_LLVM is always set. Use extra define to figure out if LLVM is used. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99010 Signed-off-by: Tobias Droste <t

[Mesa-dev] [PATCH 6/6] configure.ac: Don't check LLVM version in gallium_require_llvm

2016-12-07 Thread Tobias Droste
DEFINES="${DEFINES} -DHAVE_GALLIUM_LLVM" fi Signed-off-by: Tobias Droste <tdro...@gmx.de> --- configure.ac | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 6e12ac8912..8457b388a8 100644 --- a/configure.ac +++ b/configure.ac

[Mesa-dev] [PATCH 1/6] configure.ac: Rename MESA_LLVM to FOUND_LLVM

2016-12-07 Thread Tobias Droste
this renames MESA_LLVM to FOUND_LLVM and updates the config.log report to say if LLVM is found or not, to make clear that this does not mean that it is used. Signed-off-by: Tobias Droste <tdro...@gmx.de> --- configure.ac | 21 ++--- 1 file changed, 10 insertions(+), 11 del

[Mesa-dev] [PATCH 0/6] configure.ac: Bug fixes and related optimizations

2016-12-07 Thread Tobias Droste
Patches 1 to 4 (hopefully) fix https://bugs.freedesktop.org/show_bug.cgi?id=99010. Patch 5 and 6 are cosmetic changes. I build and run tested this with radeonsi, radv and llvmpipe and build tested with softpipe. @Emil: Please test and push if everything is ok. Tobias Droste (6

Re: [Mesa-dev] [PATCH] configure.ac: Strip patch version from LLVM version.

2016-12-03 Thread Tobias Droste
Hi Vinson, ah sorry, CMAKE_INSTALL_PREFIX=~/code/llvm/build/result. and you have to run make install. Tobias Am Samstag, 3. Dezember 2016, 23:54:37 CET schrieb Tobias Droste: > Hi Vinson, > > are you sure you are using the correct one? > > I'm building llvm

Re: [Mesa-dev] [PATCH] configure.ac: Strip patch version from LLVM version.

2016-12-03 Thread Tobias Droste
ude. I am > not setting the "--with-llvm-prefix" configure option. > > Cheers, > Vinson > > On Sat, Dec 3, 2016 at 1:46 PM, Tobias Droste <tdro...@gmx.de> wrote: > > Hi Vinson, > > > > > > > > why is LLVM_INCLUDEDIR not /incl

Re: [Mesa-dev] [PATCH] configure.ac: Strip patch version from LLVM version.

2016-12-03 Thread Tobias Droste
the header > files are not found. LLVM_INCLUDEDIR is /include and the > header files are in /include. > > Cheers, > Vinson > > On Sat, Dec 3, 2016 at 4:55 AM, Tobias Droste <tdro...@gmx.de> wrote: > > Hi Vinson, > > > > this should not be needed an

Re: [Mesa-dev] [PATCH] configure.ac: Strip patch version from LLVM version.

2016-12-03 Thread Tobias Droste
Hi Vinson, this should not be needed and is obsolete as soon as this gets merged (Emil?): https://lists.freedesktop.org/archives/mesa-dev/2016-November/135840.html Did you actually need this or were you just seeing that the code is wrong? Because LLVM >=3.1 has the header files and this code

[Mesa-dev] [PATCH v5 02/20] configure.ac: Add helper function for targets/components

2016-11-18 Thread Tobias Droste
Add functions to add and check targets/components. Not used in this patch. Signed-off-by: Tobias Droste <tdro...@gmx.de> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> --- configure.ac | 36 1 file changed, 36 insertions(+) diff --git a/

[Mesa-dev] [PATCH v5 17/20] configure.ac: Only add default LLVM components if needed

2016-11-18 Thread Tobias Droste
LLVM components are only added when LLVM is needed. This means gallium adds this as soon as "--enable-gallium-llvm" is "yes" and radv + opencl add it explicitly. v5: Removed hunk that disabled LLVM for gallium if it was not found. Signed-off-by: Tobias Droste <tdro...@gm

[Mesa-dev] [PATCH v5 13/20] configure.ac: Move oCL LLVM checks to the oCL section

2016-11-18 Thread Tobias Droste
The LLVM checks can be anywhere below line 1161 now. Move the openCL LLVM checks to the section with the other openCL checks. No functional change. Signed-off-by: Tobias Droste <tdro...@gmx.de> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> --- confi

[Mesa-dev] [PATCH v5 12/20] configure.ac: Move llvm_set_environment_variables higher.

2016-11-18 Thread Tobias Droste
or gallium. Rename it to HAVE_GALLIUM_LLVM. In order to only link LLVM when it is needed, HAVE_GALLIUM_LLVM is only set if "$enable-gallium-llvm" is yes. Signed-off-by: Tobias Droste <tdro...@gmx.de> --- configure.ac| 11 --- src/gal

[Mesa-dev] [PATCH v5 16/20] configure.ac: Reorder arguments in radeon_llvm_check

2016-11-18 Thread Tobias Droste
Use the same order as llvm_check_version_for. Signed-off-by: Tobias Droste <tdro...@gmx.de> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> --- configure.ac | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac i

[Mesa-dev] [PATCH v5 11/20] configure.ac: Remove swr_llvm_check()

2016-11-18 Thread Tobias Droste
is checked by gallium_require_llvm(). Signed-off-by: Tobias Droste <tdro...@gmx.de> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> --- configure.ac | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index da107b7..d07ac96 100644 --

[Mesa-dev] [PATCH v5 14/20] configure.ac: Move LLVM ac_subst closer to usage

2016-11-18 Thread Tobias Droste
This moves llvm_set_environment_variables to its final destination and moves all the LLVM AC_SUBST() below the function call. No functional change. Signed-off-by: Tobias Droste <tdro...@gmx.de> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> --- confi

[Mesa-dev] [PATCH v5 00/20] configure.ac and llvm the 5th

2016-11-18 Thread Tobias Droste
required but missing target/component --> fail to configure e) "enable-gallium-llvm" needed but "disable-gallium-llvm" used --> fail to configure I also made sure that i965 ("classic" dri driver) and softpipe build regardless of the LLVM version

[Mesa-dev] [PATCH v5 08/20] configure.ac: Remove useless oCL LLVM check

2016-11-18 Thread Tobias Droste
This is handled by "llvm_check_version_for" for openCL. Signed-off-by: Tobias Droste <tdro...@gmx.de> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> --- configure.ac | 4 1 file changed, 4 deletions(-) diff --git a/configure.ac b/configure.ac index 6

[Mesa-dev] [PATCH v5 15/20] configure.ac: Move radv check to the Vulkan section

2016-11-18 Thread Tobias Droste
This moves the LLVM check for radv to the corresponding driver section. No functional change. Signed-off-by: Tobias Droste <tdro...@gmx.de> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> --- configure.ac | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/

[Mesa-dev] [PATCH v5 19/20] configure.ac: Get complete LLVM version from header

2016-11-18 Thread Tobias Droste
drivers need the patch version and they depend on LLVM >= 3.6.0, so this is safe too. Signed-off-by: Tobias Droste <tdro...@gmx.de> --- configure.ac | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index c92aa82..5fc2c

[Mesa-dev] [PATCH v5 05/20] configure.ac: Move LLVM version check to the top

2016-11-18 Thread Tobias Droste
A function with the LLVM version checked is moved to the top. The function is called where the old code was. No functional change. Signed-off-by: Tobias Droste <tdro...@gmx.de> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> --- config

[Mesa-dev] [PATCH v5 01/20] configure.ac: Don't search llvm-config if it's known

2016-11-18 Thread Tobias Droste
This way LLVM_CONFIG can bet set from an env variable if it's outside the $llvm_prefix. This is not a must, but it helps testing. Signed-off-by: Tobias Droste <tdro...@gmx.de> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> --- configure.ac | 10 ++ 1 file changed,

[Mesa-dev] [PATCH v5 10/20] configure.ac: Check gallium LLVM version in gallium_require_llvm

2016-11-18 Thread Tobias Droste
led. Now it only gets called by llvmpipe if gallium LLVM is actually enabled (i.e. only on x86). Both reasons mentioned above remove the need to check host cpu in the gallium_require_llvm function. Signed-off-by: Tobias Droste <tdro...@gmx.de> Reviewed-by: Emil Velikov <e

[Mesa-dev] [PATCH v5 20/20] configure.ac: Create correct LLVM_VERSION_INT with minor >= 10

2016-11-18 Thread Tobias Droste
This makes sure that we handle LLVM minor version >= 10 correctly. Signed-off-by: Tobias Droste <tdro...@gmx.de> --- configure.ac | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 5fc2c87..4cdd0cc 100644 --- a/configure

[Mesa-dev] [PATCH v5 06/20] configure.ac: Move LLVM functions to the top

2016-11-18 Thread Tobias Droste
This just moves code around so that all LLVM related stuff is at the top of the file in the correct order. No functional change. Signed-off-by: Tobias Droste <tdro...@gmx.de> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> --- config

[Mesa-dev] [PATCH v5 18/20] configure.ac: Add required LLVM versions to the top

2016-11-18 Thread Tobias Droste
Consolidate the required LLVM versions at the top where the other versions for dependencies are listed. v5: Splitted out separate changes (see patch 19 and 20) Signed-off-by: Tobias Droste <tdro...@gmx.de> --- configure.ac | 68 +++--

[Mesa-dev] [PATCH v5 09/20] configure.ac: Use short names for r600 und r300

2016-11-18 Thread Tobias Droste
There are no non gallium r300 and r600 drivers anymore. No need to explicilty mention gallium here. Just cosmetics, no functional change. Signed-off-by: Tobias Droste <tdro...@gmx.de> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> --- configure.ac | 8 1 fil

[Mesa-dev] [PATCH v5 03/20] configure.ac: Use new llvm_add_default_components

2016-11-18 Thread Tobias Droste
Signed-off-by: Tobias Droste <tdro...@gmx.de> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> --- configure.ac | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 0c955bf..4f98c19 100644 --- a/configure.ac +++ b/

[Mesa-dev] [PATCH v5 04/20] configure.ac: Use new helper function for LLVM

2016-11-18 Thread Tobias Droste
Use the new helper function to add LLVM targets and components. The components are added one by one to later find out which component is missing in case there is one. Signed-off-by: Tobias Droste <tdro...@gmx.de> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> --- confi

Re: [Mesa-dev] [PATCH 11/12] docs: rework/update install.html

2016-11-16 Thread Tobias Droste
Am Mittwoch, 16. November 2016, 22:56:10 CET schrieb Eric Engestrom: > On Wednesday, 2016-11-16 18:46:23 +, Emil Velikov wrote: > > From: Emil Velikov > > > > Still far from perfect, but a few small steps in the right direction. > > > > - Split build systems,

Re: [Mesa-dev] [PATCH v4 17/18] configure.ac: Only add default LLVM components if needed

2016-10-20 Thread Tobias Droste
Am Donnerstag, 20. Oktober 2016, 18:30:42 CEST schrieb Emil Velikov: > On 19 October 2016 at 18:55, Tobias Droste <tdro...@gmx.de> wrote: > > Am Mittwoch, 19. Oktober 2016, 14:17:53 CEST schrieb Emil Velikov: > >> On 16 October 2016 at 01:20, Tobias Droste <tdro...

Re: [Mesa-dev] [PATCH v4 00/18] configure.ac: Hopefully the last!

2016-10-19 Thread Tobias Droste
Am Mittwoch, 19. Oktober 2016, 14:33:19 CEST schrieb Emil Velikov: > Hi Tobias, > > Thanks for sticking around and re-spinning the lot. I hope you'll > agree that things look a lot better now. True :-) > > On 16 October 2016 at 01:20, Tobias Droste <tdro...@gmx.de>

Re: [Mesa-dev] [PATCH v4 17/18] configure.ac: Only add default LLVM components if needed

2016-10-19 Thread Tobias Droste
Am Mittwoch, 19. Oktober 2016, 14:17:53 CEST schrieb Emil Velikov: > On 16 October 2016 at 01:20, Tobias Droste <tdro...@gmx.de> wrote: > > LLVM components are only added when LLVM is needed. > > This means gallium adds this as soon as "--enable-gallium-llvm" >

Re: [Mesa-dev] [PATCH v4 11/18] configure.ac: Remove swr_llvm_check()

2016-10-19 Thread Tobias Droste
Am Mittwoch, 19. Oktober 2016, 13:55:16 CEST schrieb Emil Velikov: > On 16 October 2016 at 01:20, Tobias Droste <tdro...@gmx.de> wrote: > > No need for an additional function here. > > Use the same style for LLVM checks as the other drivers > > (e.g. r300, llvmpipe) that

[Mesa-dev] [PATCH v4 17/18] configure.ac: Only add default LLVM components if needed

2016-10-15 Thread Tobias Droste
it is set to "no". If later drivers need this they get the error message that "--enable-gallium-llvm" is needed. This way if someone is only building softpipe he doesn't need to specify "--disable-gallium-llvm" and doesn't have to have LLVM installed.

[Mesa-dev] [PATCH v4 14/18] configure.ac: Move LLVM ac_subst closer to usage

2016-10-15 Thread Tobias Droste
This moves llvm_set_environment_variables to its final destination and moves all the LLVM AC_SUBST() below the function call. No functional change. Signed-off-by: Tobias Droste <tdro...@gmx.de> --- configure.ac | 29 ++--- 1 file changed, 14 insertions(+), 15 del

[Mesa-dev] [PATCH v4 12/18] configure.ac: Move llvm_set_environment_variables higher.

2016-10-15 Thread Tobias Droste
h. Signed-off-by: Tobias Droste <tdro...@gmx.de> --- configure.ac | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 35034d3..62825b7 100644 --- a/configure.ac +++ b/configure.ac @@ -1180,6 +1180,8 @@ AC_ARG_ENABL

[Mesa-dev] [PATCH v4 05/18] configure.ac: Move LLVM version check to the top

2016-10-15 Thread Tobias Droste
A function with the LLVM version checked is moved to the top. The function is called where the old code was. No functional change. Signed-off-by: Tobias Droste <tdro...@gmx.de> --- configure.ac | 144 ++- 1 file changed, 74 inse

[Mesa-dev] [PATCH v4 08/18] configure.ac: Remove useless oCL LLVM check

2016-10-15 Thread Tobias Droste
This is handled by "llvm_check_version_for" for openCL. Signed-off-by: Tobias Droste <tdro...@gmx.de> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> --- configure.ac | 4 1 file changed, 4 deletions(-) diff --git a/configure.ac b/configure.ac index c

[Mesa-dev] [PATCH v4 07/18] configure.ac: Move llvm-config searching outside the function

2016-10-15 Thread Tobias Droste
There's no harm in always searching llvm-config. This way it's available as soon as possible for all functions. Signed-off-by: Tobias Droste <tdro...@gmx.de> --- configure.ac | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac

[Mesa-dev] [PATCH v4 10/18] configure.ac: Check gallium LLVM version in gallium_require_llvm

2016-10-15 Thread Tobias Droste
led. Now it only gets called by llvmpipe if gallium LLVM is actually enabled (i.e. only on x86). Both reasons mentioned above remove the need to check host cpu in the gallium_require_llvm function. Signed-off-by: Tobias Droste <tdro...@gmx.de> --- configure.ac | 17 +

[Mesa-dev] [PATCH v4 16/18] configure.ac: Reorder arguments in radeon_llvm_check

2016-10-15 Thread Tobias Droste
Use the same order as llvm_check_version_for. Signed-off-by: Tobias Droste <tdro...@gmx.de> --- configure.ac | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 3aa8214..bbc1cb5 100644 --- a/configure.ac +++ b/config

[Mesa-dev] [PATCH v4 06/18] configure.ac: Move LLVM functions to the top

2016-10-15 Thread Tobias Droste
This just moves code around so that all LLVM related stuff is at the top of the file in the correct order. No functional change. Signed-off-by: Tobias Droste <tdro...@gmx.de> --- configure.ac | 151 +-- 1 file changed, 74 insertions(

[Mesa-dev] [PATCH v4 15/18] configure.ac: Move radv check to the Vulkan section

2016-10-15 Thread Tobias Droste
This moves the LLVM check for radv to the corresponding driver section. No functional change. Signed-off-by: Tobias Droste <tdro...@gmx.de> --- configure.ac | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 2f5ed50..3aa8214

[Mesa-dev] [PATCH v4 04/18] configure.ac: Use new helper function for LLVM

2016-10-15 Thread Tobias Droste
Use the new helper function to add LLVM targets and components. The components are added one by one to later find out which component is missing in case there is one. Signed-off-by: Tobias Droste <tdro...@gmx.de> --- configure.ac | 25 ++--- 1 file changed, 18 inse

[Mesa-dev] [PATCH v4 13/18] configure.ac: Move oCL LLVM checks to the oCL section

2016-10-15 Thread Tobias Droste
The LLVM checks can be anywhere below line 1161 now. Move the openCL LLVM checks to the section with the other openCL checks. No functional change. Signed-off-by: Tobias Droste <tdro...@gmx.de> --- configure.ac | 41 +++-- 1 file changed, 19 insertions(

  1   2   >