Re: [Mesa-dev] [PATCH] nir: Avoid an extra NIR op in integer divide lowering.

2016-11-13 Thread Kenneth Graunke
On Monday, November 7, 2016 12:28:34 PM PST Eric Anholt wrote: > NIR bools are ~0 for true, so ((unsigned)a >> 31) != 0 -> ((int)a >> 31). > --- > src/compiler/nir/nir_lower_idiv.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/src/compiler/nir/nir_lower_idiv.c >

[Mesa-dev] [PATCH] util: Fix Clang trivial destructor check.

2016-11-13 Thread Vinson Lee
Check for Clang before GCC. Clang defines __GNUC__ == 4 and __GNUC_MINOR__ == 2 and matches the GCC check but not the GCC version for trivial destructor. Fixes: 98ab905af0e0 ("mesa: Define introspection macro to determine whether a type is trivially destructible.") Bugzilla:

Re: [Mesa-dev] [PATCH] i965/vec4: skip registers already marked as no_spill

2016-11-13 Thread Kenneth Graunke
On Friday, November 11, 2016 9:41:11 AM PST Juan A. Suarez Romero wrote: > Do not evaluate spill costs for registers that were already marked as > no_spill. > --- > src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git

Re: [Mesa-dev] [PATCH 06/20] anv/pipeline: Unify 3DSTATE_VS emission

2016-11-13 Thread Kenneth Graunke
On Sunday, November 13, 2016 9:29:44 AM PST Timothy Arceri wrote: > On Sat, 2016-11-12 at 13:34 -0800, Jason Ekstrand wrote: > > --- > > src/intel/vulkan/gen7_pipeline.c | 29 +--- > > src/intel/vulkan/gen8_pipeline.c | 57 ++- > >

Re: [Mesa-dev] [PATCH] meta/GetTexSubImage: Account for GL_PACK_SKIP_IMAGES on compressed textures

2016-11-13 Thread Kenneth Graunke
On Sunday, November 13, 2016 10:21:11 AM PST Eduardo Lima Mitev wrote: > This option is currently ignored when packing compressed textures. > > Fixes CTS test (on gen8+): > * GL45-CTS.gtf32.GL3Tests.packed_pixels.packed_pixels_pixelstore > --- > src/mesa/drivers/common/meta.c | 13 ++---

[Mesa-dev] [Clover] Compilations error with latest LLVM version 4.0.0svn in llvm/codegen/bitcode.cpp

2016-11-13 Thread Dieter Nützel
Hello Francisco, next little change needed. Thanks, Dieter make[4]: Entering directory '/opt/mesa/src/gallium/state_trackers/clover' CXX llvm/codegen/libclllvm_la-bitcode.lo llvm/codegen/bitcode.cpp: In function 'std::unique_ptr clover::llvm::parse_module_library(const

[Mesa-dev] [Bug 98714] Weird whitish spots and green stuff mostly on black.

2016-11-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=98714 Bug ID: 98714 Summary: Weird whitish spots and green stuff mostly on black. Product: Mesa Version: git Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW

Re: [Mesa-dev] [PATCH] hurd: Fix build

2016-11-13 Thread Samuel Thibault
Hello, These two mails are two proposals to fix https://bugs.freedesktop.org/show_bug.cgi?id=98632 Either properly fix the code, or just define PATH_MAX and be "done" with it. Samuel ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org

Re: [Mesa-dev] [PATCH] glsl: try again to fix PRIx64 / MinGW build problem

2016-11-13 Thread Ian Romanick
Does using stdint.h help? On 11/11/2016 07:48 AM, Brian Paul wrote: > inttypes.h doesn't always define the PRIx64 macro when compiling C++ > code with MinGW. For that case, simply define PRIx64 to be "lx". > This generates a format/argument type mismatch warning. And using > "llx" generates

[Mesa-dev] [PATCH] hurd: Fix build

2016-11-13 Thread Samuel Thibault
GNU/Hurd does not define PATH_MAX since it doesn't have such arbitrary limitation. This drops the use of PATH_MAX by just allocating the proper buffer size, and disables the path length check in _mesa_get_shader_capture_path. Signed-off-by: Samuel Thibault Bugzilla:

Re: [Mesa-dev] Mesa 13.0.1 release candidate

2016-11-13 Thread Darren Salt
Could you also add commit 9b121512ac0f78d0996613664b456005d88370d2? It's a correctness fix for radv (ported from anv) which fixes segfaults which I'd observed in Talos Principle. -- | _ | Darren Salt, using Debian GNU/Linux (and Android) | ( ) | | X | ASCII Ribbon campaign against HTML

[Mesa-dev] [PATCH] hurd: Fix build

2016-11-13 Thread Samuel Thibault
GNU/Hurd does not define PATH_MAX since it doesn't have such arbitrary limitation. This works around it in arbprogram.c and shaderapi.c by defining PATH_MAX to an arbitrary value (4096, as on Linux). Signed-off-by: Samuel Thibault Bugzilla:

Re: [Mesa-dev] [PATCH 0/2][RFC] Rework how glsl runs optimization passes

2016-11-13 Thread Matt Turner
On Sat, Nov 12, 2016 at 5:29 PM, Thomas Helland wrote: > After looking into how optimization passes are run, it became apparent > that most glsl optimization passes only show benefit of one run. > My idea was that some optimization passes will snowball on each other, >

Re: [Mesa-dev] [PATCH 2/2] glsl: Only call do_common_optimization once

2016-11-13 Thread Thomas Helland
On Nov 13, 2016 14:32, "Marek Olšák" wrote: > > Interesting idea. Also added this: > Oh, nice! Gotta catch them all :-) > diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp > index cc28b26..295d10b 100644 > --- a/src/compiler/glsl/linker.cpp > +++

Re: [Mesa-dev] [PATCH 2/2] glsl: Only call do_common_optimization once

2016-11-13 Thread Thomas Helland
Forwarding to the mailing list because I'm an idiot and am apparently not able to email. > 2016-11-13 10:39 GMT+01:00 Timothy Arceri : > > On Sun, 2016-11-13 at 02:29 +0100, Thomas Helland wrote: > >> It turns out that only 8% of shaders benefit from more than one

[Mesa-dev] [PATCH 3/5] draw: unify linear and elts draw jit functions

2016-11-13 Thread sroland
From: Roland Scheidegger The code for elts and linear paths was nearly 100% identical by now - with the elts path simply having some additional gather for the elements in the main loop (with some additional small differences before the main loop). Hence nuke the separate

[Mesa-dev] [PATCH 4/5] draw: simplify fetch some more

2016-11-13 Thread sroland
From: Roland Scheidegger Don't keep the ofbit. This is just a minor simplification, just adjust the buffer size so that there will always be an overflow if buffers aren't valid to fetch from. Also, get rid of control flow from the instanced path too. Not worried about

[Mesa-dev] [PATCH 5/5] draw: drop some overflow computations

2016-11-13 Thread sroland
From: Roland Scheidegger It turns out that noone actually cares if the address computations overflow, be it the stride mul or the offset adds. Wrap around seems to be explicitly permitted even by some other API (which is a _very_ surprising result, as these overflow

[Mesa-dev] [PATCH 1/5] draw: drop unnecessary index overflow handling from vsplit code

2016-11-13 Thread sroland
From: Roland Scheidegger This was kind of strange, since it replaced indices which were only overflowing due to bias with MAX_UINT. This would cause an overflow later in the shader, except if stride was 0, however the vertex id would be essentially random then (-1 + eltBias).

[Mesa-dev] draw: simplify overflow handling, unify elts and linear jit code

2016-11-13 Thread sroland
Overflow handling is simplified quite a bit both in jit code and vsplit paths (basically just let things wrap around everywhere). This seems to be good enough for all apis. Also, elts and linear jit code is unified since the differences are minimal (even more so at the end of the series). The cost

[Mesa-dev] [PATCH 2/5] draw: use same argument order for jit draw linear / elts functions

2016-11-13 Thread sroland
From: Roland Scheidegger This is a bit simpler. Mostly to make it easier to unify the paths later... --- src/gallium/auxiliary/draw/draw_llvm.c | 48 ++ src/gallium/auxiliary/draw/draw_llvm.h | 8 ++--

[Mesa-dev] [PATCH 2/3] gallivm: add lp_create_builder with an unsafe_fpmath option

2016-11-13 Thread Marek Olšák
From: Marek Olšák --- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 14 ++ src/gallium/auxiliary/gallivm/lp_bld_misc.h | 3 +++ 2 files changed, 17 insertions(+) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp

[Mesa-dev] [PATCH 1/3] radeonsi: fold some shader context initialization to si_llvm_context_init

2016-11-13 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_shader.c | 25 +- src/gallium/drivers/radeonsi/si_shader_internal.h | 4 ++- .../drivers/radeonsi/si_shader_tgsi_setup.c| 30 +++--- 3 files changed, 30 insertions(+),

[Mesa-dev] [PATCH 3/3] radeonsi: set unsafe fpmath on FP instructions when allowed by R600_DEBUG

2016-11-13 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c index

[Mesa-dev] [PATCH 1/2] util: import cache.c/h from glsl

2016-11-13 Thread Marek Olšák
From: Marek Olšák --- src/compiler/Makefile.glsl.am| 4 src/compiler/Makefile.sources| 4 src/compiler/glsl/tests/cache_test.c | 2 +- src/util/Makefile.sources| 2 ++

[Mesa-dev] [PATCH 2/2] util/disk_cache: use unambiguous naming

2016-11-13 Thread Marek Olšák
From: Marek Olšák --- src/compiler/glsl/tests/cache_test.c | 140 +-- src/util/disk_cache.c| 30 src/util/disk_cache.h| 56 +++--- 3 files changed, 114 insertions(+), 112 deletions(-) diff

Re: [Mesa-dev] [PATCH 2/2] glsl: Only call do_common_optimization once

2016-11-13 Thread Marek Olšák
> I've tested my private shader-db (26011 shaders, many games). I see > only 2 regressions on radeonsi, both are changes in the code size: > WORST REGRESSIONS - Code Size > Before After Delta Percentage > shaders/private/alien_isolation/788.shader_test [0] > 8784 9080 296

Re: [Mesa-dev] [PATCH 2/2] glsl: Only call do_common_optimization once

2016-11-13 Thread Marek Olšák
Interesting idea. Also added this: diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index cc28b26..295d10b 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -4985,10 +4985,9 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program

[Mesa-dev] [Bug 98699] "float[a+++++4 ? 1:1] f; " crashes glsl_compiler

2016-11-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=98699 Karol Herbst changed: What|Removed |Added Attachment #127941|0 |1 is

[Mesa-dev] [Bug 98699] "float[a+++4 ? 1:1] f; " crashes glsl_compiler

2016-11-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=98699 Karol Herbst changed: What|Removed |Added Summary|"float[a+4 ? 1:1] f;" |"float[a+++4 ?

Re: [Mesa-dev] [PATCH 2/2] glsl: Only call do_common_optimization once

2016-11-13 Thread Timothy Arceri
On Sun, 2016-11-13 at 02:29 +0100, Thomas Helland wrote: > It turns out that only 8% of shaders benefit from more than one run > of the do_common_optimization function, now that it has the loop. > Doing only one run makes no difference to instruction count with NIR. > > 8324 shaders were run

[Mesa-dev] [PATCH] meta/GetTexSubImage: Account for GL_PACK_SKIP_IMAGES on compressed textures

2016-11-13 Thread Eduardo Lima Mitev
This option is currently ignored when packing compressed textures. Fixes CTS test (on gen8+): * GL45-CTS.gtf32.GL3Tests.packed_pixels.packed_pixels_pixelstore --- src/mesa/drivers/common/meta.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git