[Mesa-dev] [RFC PATCH 3/4] ff_fragment_shader: mark impossible switch values with unreachable

2017-04-22 Thread Giuseppe Bilotta
Signed-off-by: Giuseppe Bilotta --- src/mesa/main/ff_fragment_shader.cpp | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp index aac9de78ca..4f2d6b07a2 100644 --- a/src/mesa/main/ff_

[Mesa-dev] [RFC PATCH 4/4] mesa get: unreachable

2017-04-22 Thread Giuseppe Bilotta
Signed-off-by: Giuseppe Bilotta --- src/mesa/main/get.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index cf3ee6385e..3293c00f96 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -1405,8 +1405,7 @@ find_value(const ch

[Mesa-dev] [RFC PATCH 0/4] proposed scan-build cleanups

2017-04-22 Thread Giuseppe Bilotta
Just for kicks, I tried building mesa with Clang 4.0 scan-build, to see if there were any ‘easy picks’ up for fixing. The build produces lots of warnings, so going through each of them will require time and care, but at least some of them seem relatively obvious. I'm not sure what the recommended

[Mesa-dev] [RFC PATCH 1/4] mesa/pack: check malloc return value

2017-04-22 Thread Giuseppe Bilotta
Signed-off-by: Giuseppe Bilotta --- src/mesa/main/pack.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index 760c46afe7..16bc95311b 100644 --- a/src/mesa/main/pack.c +++ b/src/mesa/main/pack.c @@ -1621,6 +1621,11 @@ _mesa_unpack_color_index_t

[Mesa-dev] [RFC PATCH 2/4] glsl: early bailout if local size too large

2017-04-22 Thread Giuseppe Bilotta
When checking the compute shader local size against the maximum per-dimension and overall work-group size, return rather than breaking out of the loop over all dimensions. Oversized local sizes are an error anyway, and the early bail out eliminates the warning about qual_local_size potentially bei

Re: [Mesa-dev] [RFC PATCH 3/4] ff_fragment_shader: mark impossible switch values with unreachable

2017-04-22 Thread Nicolai Hähnle
On 22.04.2017 09:52, Giuseppe Bilotta wrote: Signed-off-by: Giuseppe Bilotta --- src/mesa/main/ff_fragment_shader.cpp | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp index aac9de

Re: [Mesa-dev] [RFC PATCH 0/4] proposed scan-build cleanups

2017-04-22 Thread Nicolai Hähnle
On 22.04.2017 09:52, Giuseppe Bilotta wrote: Just for kicks, I tried building mesa with Clang 4.0 scan-build, to see if there were any ‘easy picks’ up for fixing. The build produces lots of warnings, so going through each of them will require time and care, but at least some of them seem relative

[Mesa-dev] [PATCH] android: radv/ac: Fix nir.h include

2017-04-22 Thread Mauro Rossi
Fixes following building errors due to missing include paths: external/mesa/src/amd/common/ac_shader_info.c:23:10: fatal error: 'nir/nir.h' file not found #include "nir/nir.h" ^ external/mesa/src/compiler/nir/nir.h:48:10: fatal error: 'nir_opcodes.h' file not found #include "nir_opcode

Re: [Mesa-dev] [RFC PATCH 3/4] ff_fragment_shader: mark impossible switch values with unreachable

2017-04-22 Thread Gustaw Smolarczyk
2017-04-22 11:45 GMT+02:00 Nicolai Hähnle : > On 22.04.2017 09:52, Giuseppe Bilotta wrote: >> >> Signed-off-by: Giuseppe Bilotta >> --- >> src/mesa/main/ff_fragment_shader.cpp | 18 +++--- >> 1 file changed, 7 insertions(+), 11 deletions(-) >> >> diff --git a/src/mesa/main/ff_fragment

[Mesa-dev] [Bug 100613] Regression in Mesa 17 on s390x (zSystems)

2017-04-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=100613 --- Comment #6 from Ray Strode --- (In reply to Roland Scheidegger from comment #5) > So maybe instead of chan_desc.shift / type.width > on big endian it needs to be (format_desc.block.bits - chan_desc.shift ) / > type.width. I guess that shoul

[Mesa-dev] [Bug 100613] Regression in Mesa 17 on s390x (zSystems)

2017-04-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=100613 --- Comment #7 from Ray Strode --- Created attachment 130980 --> https://bugs.freedesktop.org/attachment.cgi?id=130980&action=edit the patch i'm running through piglit now -- You are receiving this mail because: You are the assignee for the

Re: [Mesa-dev] [PATCH 3/3] egl/android: Dequeue buffers inside EGL calls (v2)

2017-04-22 Thread Mauro Rossi
Hi Tomasz, last minute doubt 2017-04-19 9:00 GMT+02:00 Tomasz Figa : > Android buffer queues can be abandoned, which results in failing to > dequeue next buffer. Currently this would fail somewhere deep within > the DRI stack calling loader's getBuffers*(), without any error > reporting to the c

Re: [Mesa-dev] [PATCH 3/3] egl/android: Dequeue buffers inside EGL calls (v2)

2017-04-22 Thread Tomasz Figa
On Sat, Apr 22, 2017 at 11:53 PM, Mauro Rossi wrote: > Hi Tomasz, > > last minute doubt > > 2017-04-19 9:00 GMT+02:00 Tomasz Figa : >> >> Android buffer queues can be abandoned, which results in failing to >> dequeue next buffer. Currently this would fail somewhere deep within >> the DRI stack cal

Re: [Mesa-dev] [PATCH] etnaviv: etnaviv_fence: Simplify the return code logic

2017-04-22 Thread Christian Gmeiner
2017-04-18 0:36 GMT+02:00 Fabio Estevam : > The return code can be simplified by using the logical not operator. > > Signed-off-by: Fabio Estevam Reviewed-by: Christian Gmeiner Btw. the same change could be made to freedreno. greets -- Christian Gmeiner, MSc https://www.youtube.com/user/Alory

Re: [Mesa-dev] [PATCH] etnaviv: Supertiled texture support on gc3000

2017-04-22 Thread Christian Gmeiner
2017-04-18 13:34 GMT+02:00 Wladimir J. van der Laan : > Support supertiled textures on hardware that has the appropriate > feature flag SUPERTILED_TEXTURE. > > Most of the scaffolding was already in place in etna_layout_multiple: > >case ETNA_LAYOUT_SUPER_TILED: > *paddingX = 64; >

[Mesa-dev] [PATCH] freedreno: freedreno_fence: Simplify the return code logic

2017-04-22 Thread Fabio Estevam
The return code can be simplified by using the logical not operator. Signed-off-by: Fabio Estevam --- src/gallium/drivers/freedreno/freedreno_fence.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/freedreno/freedreno_fence.c b/src/gallium/drivers/f

Re: [Mesa-dev] [PATCH] etnaviv: etnaviv_fence: Simplify the return code logic

2017-04-22 Thread Fabio Estevam
On Sat, Apr 22, 2017 at 12:44 PM, Christian Gmeiner wrote: > 2017-04-18 0:36 GMT+02:00 Fabio Estevam : >> The return code can be simplified by using the logical not operator. >> >> Signed-off-by: Fabio Estevam > > Reviewed-by: Christian Gmeiner > > Btw. the same change could be made to freedreno

[Mesa-dev] [PATCH] radv: Use the correct pipeline for dispatches.

2017-04-22 Thread Bas Nieuwenhuizen
Signed-off-by: Bas Nieuwenhuizen --- src/amd/vulkan/radv_cmd_buffer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 958ae6e361e..ffa7e430b2b 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/sr

Re: [Mesa-dev] [PATCH] i965/vec4: Avoid reswizzling MACH instructions in opt_register_coalesce().

2017-04-22 Thread Francisco Jerez
Kenneth Graunke writes: > opt_register_coalesce() was optimizing sequences such as: > >mul(8) acc0:D, attr18.xyyy:D, attr19.xyyy:D >mach(8) vgrf5.xy:D, attr18.xyyy:D, attr19.xyyy:D >mov(8) m4.zw:F, vgrf5.xxxy:F > > into: > >mul(8) acc0:D, attr18.xyyy:D, attr19.xyyy:D >mach(8)

Re: [Mesa-dev] [PATCH] radv: Use the correct pipeline for dispatches.

2017-04-22 Thread Grazvydas Ignotas
Fixes: ec15e0d30 "radv: optimise compute shader grid size emission." Tested-by: Grazvydas Ignotas On Sat, Apr 22, 2017 at 7:42 PM, Bas Nieuwenhuizen wrote: > Signed-off-by: Bas Nieuwenhuizen > --- > src/amd/vulkan/radv_cmd_buffer.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-)

Re: [Mesa-dev] [PATCH] android: radv/ac: Fix nir.h include

2017-04-22 Thread Dave Airlie
On 22 April 2017 at 20:13, Mauro Rossi wrote: > Fixes following building errors due to missing include paths: > > external/mesa/src/amd/common/ac_shader_info.c:23:10: fatal error: 'nir/nir.h' > file not found > #include "nir/nir.h" > ^ > > external/mesa/src/compiler/nir/nir.h:48:10: fata

[Mesa-dev] [PATCH] radv: Translate x/y to x*(1.0/y).

2017-04-22 Thread Bas Nieuwenhuizen
Moves from accurate divides to rcp and rsq. No new CTS failures. Signed-off-by: Bas Nieuwenhuizen --- src/amd/common/ac_nir_to_llvm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 514c9e9ca35..081a2c

Re: [Mesa-dev] [PATCH] radv: Translate x/y to x*(1.0/y).

2017-04-22 Thread Connor Abbott
You can also set lower_fdiv in nir_shader_compiler_options, and then NIR will do this for you, plus NIR's algebraic optimizations will have the chance to work on the lowered form. Your choice though. On Sat, Apr 22, 2017 at 3:55 PM, Bas Nieuwenhuizen wrote: > Moves from accurate divides to rcp an

[Mesa-dev] [Bug 100613] Regression in Mesa 17 on s390x (zSystems)

2017-04-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=100613 --- Comment #8 from Ray Strode --- With attachment 130980, things are mostly working now. piglit found a couple regressions: https://people.freedesktop.org/~halfline/results-summary-shift-change/regressions.html -- You are receiving this mai

Re: [Mesa-dev] [RFC PATCH 0/4] proposed scan-build cleanups

2017-04-22 Thread Giuseppe Bilotta
Hello, On Sat, Apr 22, 2017 at 11:46 AM, Nicolai Hähnle wrote: > Definitely split the changes up along a combination of where they are in the > source and what types of errors they are. I'd say the split you've chosen > looks reasonable to me. Excellent, thanks. >> 1. the addition of a check to

Re: [Mesa-dev] [RFC PATCH 3/4] ff_fragment_shader: mark impossible switch values with unreachable

2017-04-22 Thread Giuseppe Bilotta
On Sat, Apr 22, 2017 at 11:45 AM, Nicolai Hähnle wrote: >> @@ -495,8 +492,8 @@ static GLboolean args_match( const struct state_key >> *key, GLuint unit ) >> return GL_FALSE; >> } >> break; >> - default: >> -return GL_FALSE; /* impossible */ >> +

[Mesa-dev] [PATCH v2 3/4] ff_fragment_shader: mark impossible switch values with unreachable

2017-04-22 Thread Giuseppe Bilotta
v2: simply add an assert(0) in args_match()'s allegedly impossible case, to be revisited for promotion to unreachable() after some time, as suggested by Nicolai Signed-off-by: Giuseppe Bilotta --- src/mesa/main/ff_fragment_shader.cpp | 19 --- 1 file changed, 8 insertions

[Mesa-dev] [Bug 100613] Regression in Mesa 17 on s390x (zSystems)

2017-04-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=100613 --- Comment #9 from Ray Strode --- hard coding vector_justify to TRUE fixes the draw-vertices: Short vertices - components: 3, stride: 6, Short vertices - components: 2, stride: 8, tests. -- You are receiving this mail because: You are the Q

[Mesa-dev] [PATCH] anv: Don't place scratch buffers above the 32-bit boundary

2017-04-22 Thread Jason Ekstrand
This fixes rendering corruptions in DOOM. Hopefully, it will also make Jenkins a bit more stable as we've been seeing some random failures and GPU hangs ever since turning on 48bit. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100620 Cc: "17.1" --- src/intel/vulkan/anv_allocator.c | 1

[Mesa-dev] [PATCH 4/5] draw: treat max_index = ~0 as invalid index range

2017-04-22 Thread Marek Olšák
From: Marek Olšák The next commit will simplify related code in st_draw_vbo. --- src/gallium/auxiliary/draw/draw_pt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c index 5a49acb..a1354bd 100644 ---

[Mesa-dev] [PATCH 3/5] ddebug: implement get_query_result_resource

2017-04-22 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/ddebug/dd_context.c | 16 1 file changed, 16 insertions(+) diff --git a/src/gallium/drivers/ddebug/dd_context.c b/src/gallium/drivers/ddebug/dd_context.c index f9d3de5..723e90e 100644 --- a/src/gallium/drivers/ddebug/dd_context.c +++ b

[Mesa-dev] [PATCH 1/5] gallium/util: add debugging helpers printing pipeline statistics

2017-04-22 Thread Marek Olšák
From: Marek Olšák typically useful for hw bring-up --- src/gallium/auxiliary/util/u_helpers.c | 51 ++ src/gallium/auxiliary/util/u_helpers.h | 8 ++ 2 files changed, 59 insertions(+) diff --git a/src/gallium/auxiliary/util/u_helpers.c b/src/gallium/auxilia

[Mesa-dev] [PATCH 5/5] st/mesa: clean up min/max_index handling in st_draw_vbo

2017-04-22 Thread Marek Olšák
From: Marek Olšák There is no reason to check for ~0. Also remove the incorrect comment. --- src/mesa/state_tracker/st_draw.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index d710284..e510d43 10

[Mesa-dev] [PATCH 2/5] trace: don't trace resource_destroy

2017-04-22 Thread Marek Olšák
From: Marek Olšák due to the lack of pipe_resource wrapping, we can get this call from inside of driver calls, which would try to lock an already-locked mutex. --- src/gallium/drivers/trace/tr_screen.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/src/gallium/drivers/trace/tr_screen.

[Mesa-dev] [PATCH] i965/vec4: Use reads_accumulator_implicitly(), not MACH checks.

2017-04-22 Thread Kenneth Graunke
Curro pointed out that I should not just check for MACH, but use the reads_accumulator_implicitly() helper, which would also prevent the same bug with MAC and SADA2 (if we ever decide to use them). Cc: Francisco Jerez Cc: mesa-sta...@lists.freedesktop.org --- src/intel/compiler/brw_vec4.cpp | 8

[Mesa-dev] [PATCH] radv: Enable lowering fdiv in nir.

2017-04-22 Thread Bas Nieuwenhuizen
Results in faster code than the lowering by LLVM. Signed-off-by: Bas Nieuwenhuizen --- src/amd/vulkan/radv_pipeline.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 8e71d59fae7..5046c9f6b36 100644 --- a/src/amd/vulkan/rad

[Mesa-dev] [Bug 100613] Regression in Mesa 17 on s390x (zSystems)

2017-04-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=100613 --- Comment #10 from Roland Scheidegger --- (In reply to Ray Strode from comment #8) > With attachment 130980 [details] [review], things are mostly working now. > piglit found a couple regressions: > > https://people.freedesktop.org/~halfline/

[Mesa-dev] [Bug 100613] Regression in Mesa 17 on s390x (zSystems)

2017-04-22 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=100613 --- Comment #11 from Roland Scheidegger --- (In reply to Ray Strode from comment #9) > hard coding vector_justify to TRUE fixes the draw-vertices: > > Short vertices - components: 3, stride: 6, > Short vertices - components: 2, stride: 8, > >

Re: [Mesa-dev] [PATCH] anv: Don't place scratch buffers above the 32-bit boundary

2017-04-22 Thread Grazvydas Ignotas
Fixes: 651ec926fc1 "anv: Add support for 48-bit addresses" Tested-by: Grazvydas Ignotas On Sun, Apr 23, 2017 at 1:55 AM, Jason Ekstrand wrote: > This fixes rendering corruptions in DOOM. Hopefully, it will also make > Jenkins a bit more stable as we've been seeing some random failures and > GP