Re: [Mesa-dev] [android-x86-devel] [RFC 0/7] android: enable llvmpipe for software rendering

2016-04-28 Thread Jose Fonseca
On 28/04/16 20:53, Rob Herring wrote: On Thu, Apr 28, 2016 at 1:57 PM, Jose Fonseca <jfons...@vmware.com> wrote: On 28/04/16 19:50, Rob Herring wrote: On Thu, Apr 28, 2016 at 12:35 PM, Roland Scheidegger <srol...@vmware.com> wrote: Am 28.04.2016 um 17:52 schrieb Chih-Wei Huang:

Re: [Mesa-dev] [android-x86-devel] [RFC 0/7] android: enable llvmpipe for software rendering

2016-04-28 Thread Jose Fonseca
On 28/04/16 19:50, Rob Herring wrote: On Thu, Apr 28, 2016 at 12:35 PM, Roland Scheidegger wrote: Am 28.04.2016 um 17:52 schrieb Chih-Wei Huang: I clearly understand this point. Actually I've spent several days to try to make it work on the master branch. That's why it was

Re: [Mesa-dev] [PATCH 1/4] nir: Avoid C99 field initializers.

2016-04-28 Thread Jose Fonseca
On 28/04/16 18:43, Jason Ekstrand wrote: On Thu, Apr 28, 2016 at 8:49 AM, Jose Fonseca <jfons...@vmware.com <mailto:jfons...@vmware.com>> wrote: On 28/04/16 15:37, Connor Abbott wrote: For the series: Reviewed-by: Connor Abbott <cwabbo...@gmail.com

Re: [Mesa-dev] [RFC 3/7] gallium/swrast: fix dri_sw_dt->data free func not matching alloc func

2016-04-28 Thread Jose Fonseca
insys/sw/dri/dri_sw_winsys.c @@ -125,7 +125,7 @@ dri_sw_displaytarget_destroy(struct sw_winsys *ws, { struct dri_sw_displaytarget *dri_sw_dt = dri_sw_displaytarget(dt); - FREE(dri_sw_dt->data); + align_free(dri_sw_dt->data); FREE(dri_sw_dt); } Reviewed-by: Jose Fonseca &l

Re: [Mesa-dev] [PATCH 1/4] nir: Avoid C99 field initializers.

2016-04-28 Thread Jose Fonseca
utting that specific warning off. I feared so. Thanks for looking into it though. Jose On Thu, Apr 28, 2016 at 7:27 AM, Jose Fonseca <jfons...@vmware.com> wrote: As they are not standard C++ and are not supported by MSVC C++ compiler. Just have nir_imm_double match nir_imm_float abov

[Mesa-dev] [PATCH 2/4] nir: Remove spurious ; after namespace.

2016-04-28 Thread Jose Fonseca
Makes -pedantic happy. --- src/compiler/nir/glsl_to_nir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/glsl_to_nir.cpp b/src/compiler/nir/glsl_to_nir.cpp index fafa8bb..e3fa623 100644 --- a/src/compiler/nir/glsl_to_nir.cpp +++

[Mesa-dev] [PATCH 3/4] nir: Remove spurious ; after nir_builder functions.

2016-04-28 Thread Jose Fonseca
--- src/compiler/nir/nir_builder_opcodes_h.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_builder_opcodes_h.py b/src/compiler/nir/nir_builder_opcodes_h.py index e27206e..038e2b4 100644 --- a/src/compiler/nir/nir_builder_opcodes_h.py +++

[Mesa-dev] [PATCH 4/4] nir: Try to warn when C99 extensions are used in nir headers.

2016-04-28 Thread Jose Fonseca
Ideally we'd have nir.h being included with -Wpedantic too. src/compiler/nir/nir.h:754:20: warning: ISO C++ forbids zero-size array ‘src’ [-Wpedantic] nir_alu_src src[]; ^ In file included from src/compiler/nir/glsl_to_nir.cpp:42:0: src/compiler/nir/nir.h:919:16: warning:

[Mesa-dev] [PATCH 1/4] nir: Avoid C99 field initializers.

2016-04-28 Thread Jose Fonseca
As they are not standard C++ and are not supported by MSVC C++ compiler. Just have nir_imm_double match nir_imm_float above. --- src/compiler/nir/nir_builder.h | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/compiler/nir/nir_builder.h

Re: [Mesa-dev] [AppVeyor] mesa master #1090 failed

2016-04-28 Thread Jose Fonseca
On 28/04/16 11:44, Jose Fonseca wrote: On 28/04/16 11:07, AppVeyor wrote: Build mesa 1090 failed <https://ci.appveyor.com/project/jrfonseca-fdo/mesa/build/1090> Commit db07b46f2c by Samuel Iglesias Gonsálvez <mailto:sigles...@igalia.com> on 4/26/2016 7:35 AM: nir: Add

Re: [Mesa-dev] [AppVeyor] mesa master #1090 failed

2016-04-28 Thread Jose Fonseca
On 28/04/16 11:07, AppVeyor wrote: Build mesa 1090 failed Commit db07b46f2c by Samuel Iglesias Gonsálvez on 4/26/2016 7:35 AM: nir: Add lrp lowering for doubles in opt_algebraic\n\nSome hardware

Re: [Mesa-dev] [PATCH 7/7] softpipe: add support for compute shaders.

2016-04-27 Thread Jose Fonseca
On 27/04/16 18:48, Roland Scheidegger wrote: Am 27.04.2016 um 18:13 schrieb Jose Fonseca: On 27/04/16 02:46, Roland Scheidegger wrote: Am 27.04.2016 um 03:05 schrieb Dave Airlie: On 27 April 2016 at 11:00, Dave Airlie <airl...@gmail.com> wrote: So far I've set the execmask to 1

Re: [Mesa-dev] [PATCH 7/7] softpipe: add support for compute shaders.

2016-04-27 Thread Jose Fonseca
On 27/04/16 02:46, Roland Scheidegger wrote: Am 27.04.2016 um 03:05 schrieb Dave Airlie: On 27 April 2016 at 11:00, Dave Airlie wrote: So far I've set the execmask to 1 active channel, I'm contemplating changing that though and using less machines. Ah yes, I think that

Re: [Mesa-dev] [PATCH 7/7] llvmpipe: s/Elements/ARRAY_SIZE/

2016-04-27 Thread Jose Fonseca
= LLVMBuildGEP(builder, context_ptr, indices, Elements(indices), ""); + ptr = LLVMBuildGEP(builder, context_ptr, indices, ARRAY_SIZE(indices), ""); if (emit_load) res = LLVMBuildLoad(builder, ptr, ""); diff --git a/src

[Mesa-dev] Bugzilla URLs (Was: [PATCH] glx: Don't enclose includes inside `extern "C" { }`.)

2016-04-27 Thread Jose Fonseca
On 27/04/16 09:11, Ian Romanick wrote: On 04/26/2016 08:55 PM, Jose Fonseca wrote: Ran `make check` inside src/glx to verify everything compiles and links correctly. https://bugs.freedesktop.org/show_bug.cgi?id=95158 In the future, please use Bugzilla: https://bugs.freedesktop.org

[Mesa-dev] [PATCH] glx: Don't enclose includes inside `extern "C" { }`.

2016-04-26 Thread Jose Fonseca
Ran `make check` inside src/glx to verify everything compiles and links correctly. https://bugs.freedesktop.org/show_bug.cgi?id=95158 --- src/glx/dri2_priv.h | 8 src/glx/glx_error.h | 8

Re: [Mesa-dev] [PATCH] gallivm: make sampling more robust against bogus coordinates

2016-04-25 Thread Jose Fonseca
Looks good AFAICT. Can there be an impact in performance? Reviewed-by: Jose Fonseca <jfons...@vmware.com> I also think we should have piglit testcases for these things. Would it be easy to modify one of the existing textrwap to use Nans? We need to use BGRA8 and something els

Re: [Mesa-dev] [PATCH 1/4] scons: Move fallback HAVE_* definitions to headers.

2016-04-22 Thread Jose Fonseca
On 22/04/16 15:03, Roland Scheidegger wrote: Am 22.04.2016 um 10:35 schrieb Jose Fonseca: These were being defined in SCons, but it's not practical: - we actually need to include Gallium headers from external source trees, with completely disjoint build infrastructure, and it's unsustainable

[Mesa-dev] [PATCH 3/4] gallium: Include intrin.h instead of defining ourselves.

2016-04-22 Thread Jose Fonseca
More portable, particularly when building with Clang, which implements all MSVC intrisincs in its own intrin.h, but doesn't actually support `#pragma instrinsic`. --- src/gallium/auxiliary/util/u_math.h| 6 -- src/gallium/drivers/llvmpipe/lp_test.h | 3 +--

[Mesa-dev] [PATCH 2/4] scons: Whenever possible decide what to do based on platform and not compiler.

2016-04-22 Thread Jose Fonseca
Because compilers like GCC and Clang are effectively available everywhere so their presence/absence is seldom conclusive. Furthermore, all compilers we use now have stdint.h. --- src/gallium/drivers/svga/SConscript| 7 +++ src/gallium/winsys/svga/drm/SConscript | 10 --

[Mesa-dev] [PATCH 4/4] scons: Support Clang on Windows.

2016-04-22 Thread Jose Fonseca
- Introduce 'gcc_compat' env flag, for all compilers that define __GNUC__, (which includes Clang when it's not emulating MSVC.) - Clang doesn't support whole program optimization - Disable enumerator value warnings (not sure why Clang warns about them, as my understanding is that MSVC

[Mesa-dev] [PATCH 1/4] scons: Move fallback HAVE_* definitions to headers.

2016-04-22 Thread Jose Fonseca
These were being defined in SCons, but it's not practical: - we actually need to include Gallium headers from external source trees, with completely disjoint build infrastructure, and it's unsustainable to replicate the HAVE_xxx checks or even hard-coded defines across everywhere. - checking

Re: [Mesa-dev] [PATCH] gallivm: fix bogus argument order to lp_build_sample_mipmap function

2016-04-21 Thread Jose Fonseca
s committed we should start using these enums. Reviewed-by: Jose Fonseca <jfons...@vmware.com> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] configure.ac: fix the --disable-llvm-shared-libs build

2016-04-21 Thread Jose Fonseca
On 21/04/16 08:37, Michel Dänzer wrote: On 20.04.2016 22:10, Jose Fonseca wrote: On 19/04/16 19:39, Emil Velikov wrote: On 19 April 2016 at 15:47, Chuck Atkins <chuck.atk...@kitware.com> wrote: This still doesn't quite give what you want. One can also have an llvm with component share

Re: [Mesa-dev] [PATCH] configure.ac: fix the --disable-llvm-shared-libs build

2016-04-20 Thread Jose Fonseca
On 19/04/16 19:39, Emil Velikov wrote: Hi Chuck, Thanks for chipping in. On 19 April 2016 at 15:47, Chuck Atkins wrote: This still doesn't quite give what you want. One can also have an llvm with component shared libs. So there's three different options for llvm

Re: [Mesa-dev] [PATCH 8/9] llvmpipe: Test more vector lengths.

2016-04-19 Thread Jose Fonseca
On 18/04/16 16:30, Tom Stellard wrote: On Mon, Apr 18, 2016 at 10:14:35AM +0100, Jose Fonseca wrote: All power of two of up native vector length. There is actually a bug in lp_build_round for v2, whereby it doesn't round to nearest. Fixing is left to the future, but the test is now able

Re: [Mesa-dev] [PATCH 2/9] gallivm: Use LLVMSetTarget.

2016-04-18 Thread Jose Fonseca
On 18/04/16 13:27, Emil Velikov wrote: Hi Jose, On 18 April 2016 at 10:14, Jose Fonseca <jfons...@vmware.com> wrote: Instead of LLVM C++ interfaces. --- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/g

Re: [Mesa-dev] [PATCH 6/9] gallivm: Remove lp_get_module_id.

2016-04-18 Thread Jose Fonseca
On 18/04/16 13:30, Emil Velikov wrote: On 18 April 2016 at 10:14, Jose Fonseca <jfons...@vmware.com> wrote: @@ -306,6 +309,15 @@ init_gallivm_state(struct gallivm_state *gallivm, const char *name, if (!gallivm->context) goto fail; + gallivm->module_name = NULL;

Re: [Mesa-dev] [PATCH 7/9] gallivm: Avoid llvm::sys::getProcessTriple().

2016-04-18 Thread Jose Fonseca
On 18/04/16 10:14, Jose Fonseca wrote: Just use LLVM_HOST_TRIPLE, which is available at least from LLVM 3.3 onwards, and is pretty much what llvm::sys::getProcessTriple() does anyway, --- src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

Re: [Mesa-dev] [PATCH v3] math: Import isinf and others to global namespace

2016-04-18 Thread Jose Fonseca
the C variants as macros, the C variants in global namespace are not accessible any longer. v2: Move the fix outside of Nouveau, as suggested by Jose Fonseca, since anyone might need it when GCC switches to C++14 by default with GCC 6.0. v3: * Put the code directly inside c99_math.h rather

[Mesa-dev] [PATCH 4/9] gallivm: Make MCJIT a runtime option.

2016-04-18 Thread Jose Fonseca
On the LLVM versions that support it, so we can easily switch between MCJIT/old-jit for testing. The new option is GALLIVM_MCJIT. Unfortunately setting GALLIVM_MCJIT=1 for LLVM 3.3 or 3.4 causes segfault, both on Linux and Windows. I'm almost certain this used to work, so there probably is a

[Mesa-dev] [PATCH 8/9] llvmpipe: Test more vector lengths.

2016-04-18 Thread Jose Fonseca
All power of two of up native vector length. There is actually a bug in lp_build_round for v2, whereby it doesn't round to nearest. Fixing is left to the future, but the test is now able to expect it to fail. --- src/gallium/drivers/llvmpipe/lp_test_arit.c | 43 - 1

[Mesa-dev] [PATCH 9/9] llvmpipe: Skip false exp2 failure in lp_test_arit due to buggy MSVCRT.

2016-04-18 Thread Jose Fonseca
64bits MSVCRT's exp2f(-inf) returns -inf instead of 0. Tested with MSVC 2013's CRT. (I haven't tried 2015 yet.) Also this does not happen with MinGW. --- src/gallium/drivers/llvmpipe/lp_test_arit.c | 38 ++--- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git

[Mesa-dev] [PATCH 5/9] gallivm: Fix MCJIT with LLVM 3.3.

2016-04-18 Thread Jose Fonseca
One needs to call setJITMemoryManager for LLVM 3.3, instead of setMCJITMemoryManager. This regressed in commits 065256df/75ad4fe7 when trying to make the code to build with LLVM 3.6. Testing MCJIT with LLVM 3.3 to 3.6. --- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 6 +++--- 1 file

[Mesa-dev] [PATCH 7/9] gallivm: Avoid llvm::sys::getProcessTriple().

2016-04-18 Thread Jose Fonseca
Just use LLVM_HOST_TRIPLE, which is available at least from LLVM 3.3 onwards, and is pretty much what llvm::sys::getProcessTriple() does anyway, --- src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[Mesa-dev] [PATCH 6/9] gallivm: Remove lp_get_module_id.

2016-04-18 Thread Jose Fonseca
Just keep a copy of the module_name in gallivm. --- src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 7 --- src/gallium/auxiliary/gallivm/lp_bld_debug.h | 4 src/gallium/auxiliary/gallivm/lp_bld_init.c| 15 ++- src/gallium/auxiliary/gallivm/lp_bld_init.h| 1 + 4

[Mesa-dev] [PATCH 3/9] scons: Show the unit test full path.

2016-04-18 Thread Jose Fonseca
--- scons/gallium.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scons/gallium.py b/scons/gallium.py index 94321b2..dd29c75 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -99,7 +99,7 @@ def unit_test(env, test_name, program_target, args=None): cmd = '

[Mesa-dev] [PATCH 2/9] gallivm: Use LLVMSetTarget.

2016-04-18 Thread Jose Fonseca
Instead of LLVM C++ interfaces. --- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index c1e262b..37e2f08 100644 ---

[Mesa-dev] [PATCH 1/9] gallivm: Use LLVMPrintValueToString where available.

2016-04-18 Thread Jose Fonseca
And llvm::raw_string_ostream where not (LLVM 3.3). Thereby eliminating yet another dependency on unstable LLVM interfaces. As a bonus this also gets LLVM IR on OutputDebugMessageA on MSVC (which was disabled, probably due to C++ issues.) Tested `lp_test_arit -v -v` on LLVM 3.3, 3.4 and 3.8. ---

Re: [Mesa-dev] [PATCH 4/6] gallium: use PIPE_SHADER_* everywhere, remove TGSI_PROCESSOR_*

2016-04-17 Thread Jose Fonseca
On 17/04/16 20:21, Marek Olšák wrote: On Sun, Apr 17, 2016 at 8:23 PM, Jose Fonseca <jfons...@vmware.com> wrote: On 17/04/16 13:57, Marek Olšák wrote: On Sun, Apr 17, 2016 at 11:12 AM, Jose Fonseca <jfons...@vmware.com> wrote: On 16/04/16 23:27, Roland Scheidegger wrote: Am 1

Re: [Mesa-dev] [PATCH 4/6] gallium: use PIPE_SHADER_* everywhere, remove TGSI_PROCESSOR_*

2016-04-17 Thread Jose Fonseca
On 17/04/16 13:57, Marek Olšák wrote: On Sun, Apr 17, 2016 at 11:12 AM, Jose Fonseca <jfons...@vmware.com> wrote: On 16/04/16 23:27, Roland Scheidegger wrote: Am 16.04.2016 um 14:50 schrieb Marek Olšák: From: Marek Olšák <marek.ol...@amd.com> we should use MESA_SHADER_

Re: [Mesa-dev] [PATCH 1/6] gallium: use enums in p_defines.h

2016-04-17 Thread Jose Fonseca
On 16/04/16 22:51, Rob Clark wrote: On Sat, Apr 16, 2016 at 5:49 PM, Rob Clark wrote: On Sat, Apr 16, 2016 at 5:04 PM, Marek Olšák wrote: On Sat, Apr 16, 2016 at 9:40 PM, Rob Clark wrote: On Sat, Apr 16, 2016 at 8:50 AM, Marek

Re: [Mesa-dev] [PATCH 4/6] gallium: use PIPE_SHADER_* everywhere, remove TGSI_PROCESSOR_*

2016-04-17 Thread Jose Fonseca
On 16/04/16 23:27, Roland Scheidegger wrote: Am 16.04.2016 um 14:50 schrieb Marek Olšák: From: Marek Olšák we should use MESA_SHADER_* everywhere, but we're not ready for that yet --- I think the idea initially was that tgsi is essentially self-contained: you can parse

Re: [Mesa-dev] [PATCH] gallivm: don't use vector selects with llvm 3.7

2016-04-17 Thread Jose Fonseca
On 16/04/16 22:30, srol...@vmware.com wrote: From: Roland Scheidegger <srol...@vmware.com> llvm 3.7 sometimes simply miscompiles vector selects. Reviewed-by: Jose Fonseca <jfons...@vmware.com> See https://bugs.freedesktop.org/show_bug.cgi?id=94972 Great detective work. I thin

Re: [Mesa-dev] [PATCH] gallium/swr: confine c++11 flag to swr driver

2016-04-15 Thread Jose Fonseca
ic_assert(is_same<int&, decltype(g(x))>::value, ""); - return x; -} - - } - -} // namespace cxx14It also includes other options you want, - -#endif // __cplusplus >= 201402L - -]]) diff --git a/src/gallium/drivers/swr/Makefile.am b/src/gallium/drivers/swr/Makefile.am in

[Mesa-dev] [PATCH 4/4] appveyor: Run unit tests.

2016-04-13 Thread Jose Fonseca
--- appveyor.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index bf7ac75..2e9b9d6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -65,6 +65,9 @@ install: build_script: - scons -j%NUMBER_OF_PROCESSORS% MSVC_VERSION=12.0 llvm=1 +after_build: +- scons

[Mesa-dev] [PATCH 3/4] scons: Add a "check" target to run all unit tests.

2016-04-13 Thread Jose Fonseca
Except: - u_cache_test -- too long - translate_test -- unreliable (it's probably testing corner cases that translate module doesn't care about.) --- SConstruct | 5 + scons/gallium.py| 27 ++-

[Mesa-dev] [PATCH 1/4] test/unit: Make pipe_barrier_test actually check correct bahavior.

2016-04-13 Thread Jose Fonseca
So it can run unattended. Also make it silent by default. --- src/gallium/tests/unit/pipe_barrier_test.c | 57 ++ 1 file changed, 50 insertions(+), 7 deletions(-) diff --git a/src/gallium/tests/unit/pipe_barrier_test.c b/src/gallium/tests/unit/pipe_barrier_test.c

[Mesa-dev] [PATCH 2/4] test/unit: Make translate_test invoke translate_create by default.

2016-04-13 Thread Jose Fonseca
--- src/gallium/tests/unit/translate_test.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gallium/tests/unit/translate_test.c b/src/gallium/tests/unit/translate_test.c index fc49862..7ca6067 100644 --- a/src/gallium/tests/unit/translate_test.c +++

Re: [Mesa-dev] [PATCH 3/5] nir: Avoid structure initalization expressions.

2016-04-13 Thread Jose Fonseca
On 13/04/16 19:35, Jason Ekstrand wrote: On Wed, Apr 13, 2016 at 10:19 AM, Emil Velikov <emil.l.veli...@gmail.com <mailto:emil.l.veli...@gmail.com>> wrote: From: Jose Fonseca <jfons...@vmware.com <mailto:jfons...@vmware.com>> Not supported by MSVC, an

Re: [Mesa-dev] [PATCH 5/5] scons: Build NIR.

2016-04-13 Thread Jose Fonseca
On 13/04/16 18:19, Emil Velikov wrote: From: Jose Fonseca <jfons...@vmware.com> Emil Velikov: - Attribute the src/{glsl,compiler}/nir move - Flesh out to separate SConscript Signed-off-by: Emil Velikov <emil.veli...@collabora.com> --- src/compiler/SConscript | 1 +

[Mesa-dev] [PATCH] gallivm: Workaround LLVM PR 27332.

2016-04-13 Thread Jose Fonseca
The credit for finding and isolating this bug goes to Vinson and Roland. The buggy LLVM versions were found by doing opt -instcombine llvm-pr27332.ll > /dev/null where llvm-pr27332.ll is the IR from https://llvm.org/bugs/show_bug.cgi?id=27332#c3 ---

Re: [Mesa-dev] swr forces c++11 for whole compilation

2016-04-13 Thread Jose Fonseca
On 13/04/16 15:26, Ilia Mirkin wrote: On Wed, Apr 13, 2016 at 10:11 AM, Jose Fonseca <jfons...@vmware.com> wrote: On 13/04/16 14:21, Ilia Mirkin wrote: On Wed, Apr 13, 2016 at 8:48 AM, Jose Fonseca <jfons...@vmware.com> wrote: On 13/04/16 11:43, Ilia Mirkin wrote: Hi Tim, I

Re: [Mesa-dev] [PATCH v2] math: Import isinf and others to global namespace

2016-04-13 Thread Jose Fonseca
I just noticed you initial patch said "(and glibc >= 2.23)". I don't have it. So maybe that's all we need is check __GLIBC__ / _GLIBC_MINOR__ and only do it then. Jose On 13/04/16 15:21, Jose Fonseca wrote: > This was with GLIBC 2.21 in ubuntu 15.10: > > $ ldd --versi

Re: [Mesa-dev] [PATCH v2] math: Import isinf and others to global namespace

2016-04-13 Thread Jose Fonseca
12:16, Pierre Moreau wrote: > :-( I'll have another look this evening. Which version of glibc did it failed > with? > > (I saw your reply to the other patch, I'll dig deeper this evening.) > > Thanks! > Pierre > >> On 13 Apr 2016, at 08:22, Jose Fonseca <jfons..

Re: [Mesa-dev] swr forces c++11 for whole compilation

2016-04-13 Thread Jose Fonseca
On 13/04/16 14:21, Ilia Mirkin wrote: On Wed, Apr 13, 2016 at 8:48 AM, Jose Fonseca <jfons...@vmware.com> wrote: On 13/04/16 11:43, Ilia Mirkin wrote: Hi Tim, It seems like building swr forces c++11 mode for the whole build, even other drivers being built that aren't necessarily

Re: [Mesa-dev] [PATCH 1/2] scons: Allow building with Address Sanitizer.

2016-04-13 Thread Jose Fonseca
On 13/04/16 14:41, Emil Velikov wrote: Hi Jose, On 12 April 2016 at 17:03, Jose Fonseca <jfons...@vmware.com> wrote: libasan is never linked to shared objects (which doesn't go well with -z,defs). It must either be linked to the main executable, or (more practically for OpenGL drivers)

Re: [Mesa-dev] swr forces c++11 for whole compilation

2016-04-13 Thread Jose Fonseca
On 13/04/16 13:48, Jose Fonseca wrote: On 13/04/16 11:43, Ilia Mirkin wrote: Hi Tim, It seems like building swr forces c++11 mode for the whole build, even other drivers being built that aren't necessarily ready for it. Unfortunately c++11 isn't backwards compatible with c++03, so the switch

Re: [Mesa-dev] swr forces c++11 for whole compilation

2016-04-13 Thread Jose Fonseca
On 13/04/16 11:43, Ilia Mirkin wrote: Hi Tim, It seems like building swr forces c++11 mode for the whole build, even other drivers being built that aren't necessarily ready for it. Unfortunately c++11 isn't backwards compatible with c++03, so the switch can't be made unilaterally. Could you

Re: [Mesa-dev] [PATCH] nv50/ra: `isinf()` is in namespace `std` since C++11

2016-04-13 Thread Jose Fonseca
this generally, what was wrong with that one? Please read my reply this morning, on the thread "Re: [Mesa-dev] [PATCH v2] math: Import isinf and others to global namespace" Jose On Apr 13, 2016 3:07 AM, "Jose Fonseca" <jfons...@vmware.com <mailto:jfons...@vmware.com>&g

Re: [Mesa-dev] [PATCH] gallivm: use llvm.nearbyint instead of llvm.round

2016-04-13 Thread Jose Fonseca
On 13/04/16 06:51, Jose Fonseca wrote: On 13/04/16 04:00, srol...@vmware.com wrote: From: Roland Scheidegger <srol...@vmware.com> We used to use sse roundps intrinsic directly, but switched to use the llvm intrinsics for rounding with e4f01da15d8c6ce3e8c77ff3ff3d2ce2574a3f7b. However

Re: [Mesa-dev] [PATCH] nv50/ra: `isinf()` is in namespace `std` since C++11

2016-04-13 Thread Jose Fonseca
Pierre, I'm going to commit this one for now, as it seems the safest thing to do. I still think we should try to fix the generic case, but it seems much harder to get this right. I still don't understand how come isinf sometimes appears in the global namespace some times, but not others.

Re: [Mesa-dev] [PATCH v2] math: Import isinf and others to global namespace

2016-04-13 Thread Jose Fonseca
On 01/04/16 13:18, Pierre Moreau wrote: On 01:11 PM - Apr 01 2016, Jose Fonseca wrote: On 31/03/16 23:08, Pierre Moreau wrote: Starting from C++11, several math functions, like isinf, moved into the std namespace. Since cmath undefines those functions before redefining them inside

Re: [Mesa-dev] [PATCH] gallivm: use llvm.nearbyint instead of llvm.round

2016-04-12 Thread Jose Fonseca
On 13/04/16 04:00, srol...@vmware.com wrote: From: Roland Scheidegger We used to use sse roundps intrinsic directly, but switched to use the llvm intrinsics for rounding with e4f01da15d8c6ce3e8c77ff3ff3d2ce2574a3f7b. However, llvm semantics follows standard math lib round

Re: [Mesa-dev] [PATCH] st/mesa: fix memleak in glDrawPixels cache code

2016-04-12 Thread Jose Fonseca
pler_view_reference([1], NULL); -#if !USE_DRAWPIXELS_CACHE + /* free the texture (but may persist in the cache) */ pipe_resource_reference(, NULL); -#endif } Looks good AFAICT. Reviewed-by: Jose Fonseca <jfons...@vmware.com> ___ m

[Mesa-dev] [PATCH 2/2] softpipe: Free tgsi.image elements on context destruction.

2016-04-12 Thread Jose Fonseca
Courtesy of address sanitizer. --- src/gallium/drivers/softpipe/sp_context.c | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c index f66fea2..1d62177 100644 --- a/src/gallium/drivers/softpipe/sp_context.c

[Mesa-dev] [PATCH 1/2] scons: Allow building with Address Sanitizer.

2016-04-12 Thread Jose Fonseca
libasan is never linked to shared objects (which doesn't go well with -z,defs). It must either be linked to the main executable, or (more practically for OpenGL drivers) be pre-loaded via LD_PRELOAD. Otherwise works. I didn't find anything with llvmpipe. I suspect the fact that the JIT

[Mesa-dev] [PATCH 4/4] gallium: Use STATIC_ASSERT whenever possible.

2016-04-12 Thread Jose Fonseca
--- src/gallium/auxiliary/rtasm/rtasm_x86sse.c | 2 +- src/gallium/auxiliary/tgsi/tgsi_lowering.c | 2 +- src/gallium/auxiliary/tgsi/tgsi_parse.c| 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/auxiliary/rtasm/rtasm_x86sse.c

[Mesa-dev] [PATCH 3/4] softpipe: Use STATIC_ASSERT whenever possible.

2016-04-12 Thread Jose Fonseca
--- src/gallium/drivers/softpipe/sp_tile_cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c index 9cc8ac1..c623326 100644 --- a/src/gallium/drivers/softpipe/sp_tile_cache.c

[Mesa-dev] [PATCH 2/4] svga: Use STATIC_ASSERT whenever possible.

2016-04-12 Thread Jose Fonseca
--- src/gallium/drivers/svga/svga_pipe_depthstencil.c | 6 +++--- src/gallium/drivers/svga/svga_state_rss.c | 4 ++-- src/gallium/drivers/svga/svga_state_tss.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git

[Mesa-dev] [PATCH 1/4] mesa: Use STATIC_ASSERT whenever possible.

2016-04-12 Thread Jose Fonseca
--- src/mesa/main/imports.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index 14cd588..fe54109 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -262,7 +262,7 @@ ffsll(long long int val) { int bit;

Re: [Mesa-dev] [PATCH] st/mesa: replace _mesa_sysval_to_semantic table with function

2016-04-12 Thread Jose Fonseca
<< i)) { -unsigned semName = _mesa_sysval_to_semantic[i]; +unsigned semName = _mesa_sysval_to_semantic(i); t->systemValues[i] = ureg_DECL_system_value(ureg, semName, 0); Looks great. Thanks Brian. Reviewed-by: Jose Fonseca <jfons...@vmware.com> ___

Re: [Mesa-dev] [PATCH 12/26] glsl/shader_enums: Add the other two compute builtins

2016-04-11 Thread Jose Fonseca
On 25/03/16 23:12, Jason Ekstrand wrote: These weren't added before because they are actually calculated values that are computed from other inputs. However, in order to handle them in nir_lower_system_values, it's nice for them to have a cannonical locaiton. --- src/compiler/shader_enums.c |

Re: [Mesa-dev] [PATCH] nir: remove duplicate Makefile.sources

2016-04-08 Thread Jose Fonseca
On 02/04/16 19:35, Rob Clark wrote: From: Rob Clark Allegedly this was needed still by scons build.. but in practice it doesn't seem to be needed. Removing it and running 'scons' results in no build errors. Signed-off-by: Rob Clark --- So,

Re: [Mesa-dev] [PATCH] st/mesa: fix glReadBuffer() assertion failure

2016-04-08 Thread Jose Fonseca
fb->Attachment[fb->_ColorReadBufferIndex].Type == GL_NONE) { /* add the buffer */ st_manager_add_color_renderbuffer(st, fb, fb->_ColorReadBufferIndex); + _mesa_update_state(ctx); st_validate_state(st, ST_PIPELINE_RENDER); } } Reviewed-by: Jose Fonseca <jfons...@vmware.c

Re: [Mesa-dev] [PATCH] nir: Use PRIi64 and PRIu64 instead of %ld and %lu.

2016-04-04 Thread Jose Fonseca
On 04/04/16 06:37, Jason Ekstrand wrote: On Apr 3, 2016 7:51 PM, "Kenneth Graunke" > wrote: > > %ld and %lu aren't the right format specifiers for int64_t and uint64_t > on 32-bit (x86) systems. They're %zu on Linux and %Iu on Windows. >

[Mesa-dev] [PATCH] gallivm: Introduce lp_format_intrinsic.

2016-04-03 Thread Jose Fonseca
For adding .v4f32 like suffixes to intrinsics, taking special care for scalar case, which was being often neglected. This fixes invalid IR when doing mipmap filtering on SSE2 (the only case where we'd use intrinsics with scalars.) --- src/gallium/auxiliary/gallivm/lp_bld_arit.c | 19

Re: [Mesa-dev] [PATCH 2/3] gallivm: Prefer backend agnostic intrinsic for rounding.

2016-04-03 Thread Jose Fonseca
On 03/04/16 16:20, Roland Scheidegger wrote: Am 03.04.2016 um 12:24 schrieb Jose Fonseca: We could unconditionally use these instrinsics, but performance with SSE2 would suck, as LLVM falls back to calling libm. Would that really work now? Last time I checked, calls out to libm from the jitted

[Mesa-dev] [PATCH 1/3] gallivm: Add debug option to force SSE2.

2016-04-03 Thread Jose Fonseca
For simulating less capable machines. --- src/gallium/auxiliary/gallivm/lp_bld_init.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c index ab55be4..6e08ac4

[Mesa-dev] [PATCH 3/3] gallivm: Use llvm.fabs.

2016-04-03 Thread Jose Fonseca
Exactly the same code. --- src/gallium/auxiliary/gallivm/lp_bld_arit.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c index 1277743..587c83a 100644 ---

[Mesa-dev] [PATCH 2/3] gallivm: Prefer backend agnostic intrinsic for rounding.

2016-04-03 Thread Jose Fonseca
We could unconditionally use these instrinsics, but performance with SSE2 would suck, as LLVM falls back to calling libm. lp_test_arit. --- src/gallium/auxiliary/gallivm/lp_bld_arit.c | 46 - 1 file changed, 39 insertions(+), 7 deletions(-) diff --git

Re: [Mesa-dev] [PATCH 1/2] gallivm: Use standard LLVMSetAlignment from LLVM 3.4 onwards.

2016-04-02 Thread Jose Fonseca
On 02/04/16 15:19, Brian Paul wrote: On 04/02/2016 08:13 AM, Jose Fonseca wrote: Only provide a fallback for LLVM 3.3. One less dependency on LLVM C++ interface. --- src/gallium/auxiliary/draw/draw_llvm.c | 4 ++-- src/gallium/auxiliary/gallivm/lp_bld.h | 14

[Mesa-dev] [PATCH] gallivm: Fix performance regressions due to vector selects.

2016-04-02 Thread Jose Fonseca
LLVM often can't determine the mask elements are all ones/zeros, and there doesn't seem to be a good way to hint that. Thanks to Roland Scheidegger for spotting and analyzing the issue. --- src/gallium/auxiliary/gallivm/lp_bld_logic.c | 33 ++-- 1 file changed, 17

[Mesa-dev] [PATCH 2/2] gallivm: Remove lp_build_load_volatile.

2016-04-02 Thread Jose Fonseca
No longer needed. --- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 8 src/gallium/auxiliary/gallivm/lp_bld_misc.h | 4 2 files changed, 12 deletions(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index

[Mesa-dev] [PATCH 1/2] gallivm: Use standard LLVMSetAlignment from LLVM 3.4 onwards.

2016-04-02 Thread Jose Fonseca
Only provide a fallback for LLVM 3.3. One less dependency on LLVM C++ interface. --- src/gallium/auxiliary/draw/draw_llvm.c | 4 ++-- src/gallium/auxiliary/gallivm/lp_bld.h | 14 .../auxiliary/gallivm/lp_bld_format_aos_array.c| 2 +-

Re: [Mesa-dev] [PATCH 3/3] svga: remove unused svga_compile_key::texture_msaa field

2016-04-01 Thread Jose Fonseca
1; - unsigned texture_msaa:1;/**< A multisample texture? */ unsigned sprite_texgen:1; unsigned swizzle_r:3; unsigned swizzle_g:3; Series is Reviewed-by: Jose Fonseca <jfons...@vmware.com> ___ mesa-dev mailing

Re: [Mesa-dev] [PATCH] docs: minor updates to license.html file

2016-04-01 Thread Jose Fonseca
/glext.h Khronos include/GL/glxext.h +GLX client code src/glx/ SGI Free Software License B + C11 threadinclude/c11/threads*.h Boost (permissive) emulation Reviewed-by: Jose Fonseca <jfons...@vmware.

Re: [Mesa-dev] [PATCH v2] math: Import isinf and others to global namespace

2016-04-01 Thread Jose Fonseca
are not accessible any longer. v2: Move the fix outside of Nouveau, as suggested by Jose Fonseca, since anyone might need it when GCC switches to C++14 by default with GCC 6.0. Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> --- include/cpp11_math.h

Re: [Mesa-dev] [PATCH] gallivm: Use vector selects on LLVM 3.4+.

2016-03-31 Thread Jose Fonseca
On 01/04/16 00:04, Roland Scheidegger wrote: Am 01.04.2016 um 00:42 schrieb Jose Fonseca: This is an old patch I had around. Vector selects seem to work well from LLVM 3.4. Using them might improve code quality, as it might make constant propagation pass more effective. Tested lp_test_

[Mesa-dev] [PATCH] gallivm: Use vector selects on LLVM 3.4+.

2016-03-31 Thread Jose Fonseca
This is an old patch I had around. Vector selects seem to work well from LLVM 3.4. Using them might improve code quality, as it might make constant propagation pass more effective. Tested lp_test_* --- src/gallium/auxiliary/gallivm/lp_bld_logic.c | 8 +--- 1 file changed, 5 insertions(+),

Re: [Mesa-dev] [PATCH] docs: remove docs/COPYING which contains GPL license

2016-03-30 Thread Jose Fonseca
Thanks! Reviewed-by: Jose Fonseca <jfons...@vmware.com> I was about to do the same, but you beat me to it. What caused me pause was some recent talk I read somewhere of bringing back src/mesa/drivers/windows/gdi driver. I can no longer remember where. But I really rather not d

Re: [Mesa-dev] [RFCv3 01/11] gallium: refactor pipe_shader_state to support multiple IR's

2016-03-30 Thread Jose Fonseca
On 30/03/16 14:59, Rob Clark wrote: On Wed, Mar 30, 2016 at 9:49 AM, Jose Fonseca <jfons...@vmware.com> wrote: On 30/03/16 14:43, Rob Clark wrote: On Wed, Mar 30, 2016 at 9:32 AM, Jose Fonseca <jfons...@vmware.com> wrote: On 31/01/16 20:16, Rob Clark wrote: The goal is to al

Re: [Mesa-dev] [RFCv3 01/11] gallium: refactor pipe_shader_state to support multiple IR's

2016-03-30 Thread Jose Fonseca
On 30/03/16 14:43, Rob Clark wrote: On Wed, Mar 30, 2016 at 9:32 AM, Jose Fonseca <jfons...@vmware.com> wrote: On 31/01/16 20:16, Rob Clark wrote: The goal is to allow the pipe driver to request something other than TGSI, but detect whether what is getting is TGSI vs what it req

Re: [Mesa-dev] [RFCv3 01/11] gallium: refactor pipe_shader_state to support multiple IR's

2016-03-30 Thread Jose Fonseca
On 31/01/16 20:16, Rob Clark wrote: The goal is to allow the pipe driver to request something other than TGSI, but detect whether what is getting is TGSI vs what it requested. The pipe drivers will always have to support TGSI (and convert that into whatever it is that they prefer), but in some

Re: [Mesa-dev] [PATCH] xlib: add support for GLX_ARB_create_context

2016-03-29 Thread Jose Fonseca
On 29/03/16 21:44, Brian Paul wrote: On 03/29/2016 02:27 PM, Emil Velikov wrote: On 26 March 2016 at 17:45, Brian Paul wrote: This adds the glXCreateContextAttribsARB() function for the xlib/swrast driver. This allows more piglit tests to run with this driver. For

Re: [Mesa-dev] [PATCH 2/2] mesa: make _mesa_prepare_mipmap_level() static

2016-03-29 Thread Jose Fonseca
der, GLenum intFormat, mesa_format format); - void _mesa_prepare_mipmap_levels(struct gl_context *ctx, struct gl_texture_object *texObj, Series looks good to me. Reviewed-by: Roland Scheidegger <srol...@vmware.com> Same here. Reviewed-by: Jose Fonse

Re: [Mesa-dev] [PATCH 1/2] tgsi: collect texture sampler target info in tgsi_scan_shader()

2016-03-29 Thread Jose Fonseca
On 29/03/16 21:22, Roland Scheidegger wrote: I actually think "is_tex" is a bit confusing (because there's lots of other parts in the code where we don't really distinguish between "texture" and "sample" class of instructions and refer to them by the same name), but it certainly should work here

Re: [Mesa-dev] [PATCH 2/2] st/mesa: simplify st_generate_mipmap()

2016-03-29 Thread Jose Fonseca
nsure it did indeed make the right decision. Either way, series is: Reviewed-by: Jose Fonseca <jfons...@vmware.com> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] nv50/ra: `isinf()` is in namespace `std` since C++11

2016-03-24 Thread Jose Fonseca
On 24/03/16 22:07, Ilia Mirkin wrote: On Sat, Mar 19, 2016 at 6:30 PM, Jose Fonseca <jfons...@vmware.com> wrote: On 19/03/16 22:25, Ilia Mirkin wrote: On Sat, Mar 19, 2016 at 6:23 PM, Jose Fonseca <jfons...@vmware.com> wrote: On 18/03/16 04:00, Ilia Mirkin wrote: On Mar 17,

Re: [Mesa-dev] Building Mesa and LLVM cross compiling Linux to Windows issue

2016-03-20 Thread Jose Fonseca
On 17/03/16 18:42, Roland Scheidegger wrote: I suspect you simply ran into an issue with old mesa and new llvm. Unfortunately some usage of the c++ abi of llvm is unavoidable, and the abi is unstable, thus breaking quite often. And we do not generally backport such fixes to older mesa releases

<    1   2   3   4   5   6   7   8   9   10   >