[Mesa-dev] [PATCH] clover: Fix build against clang SVN >= r265359

2016-04-04 Thread Michel Dänzer
From: Michel Dänzer Signed-off-by: Michel Dänzer --- src/gallium/state_trackers/clover/llvm/invocation.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp index 4d11c24..3fb3596

Re: [Mesa-dev] [PATCH] glsl: use has_shader_storage_buffer_objects helper

2016-04-04 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga On Mon, 2016-04-04 at 11:55 -0400, Ilia Mirkin wrote: > Replaces open-coded logic with existing helper. > > Signed-off-by: Ilia Mirkin > --- > src/compiler/glsl/lower_ubo_reference.cpp | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/s

Re: [Mesa-dev] [PATCH 2/4] i965/fs: Make the repclear shader support either a uniform or a flat input

2016-04-04 Thread Jordan Justen
On 2016-04-04 23:04:01, Jordan Justen wrote: > On 2016-04-04 15:51:13, Jason Ekstrand wrote: > > In the Vulkan driver we use a single flat input instead of a uniform > > because setting up push constants is more disruptive to the pipeline than > > setting up another vertex input. This uses the num

Re: [Mesa-dev] [PATCH 2/4] i965/fs: Make the repclear shader support either a uniform or a flat input

2016-04-04 Thread Jordan Justen
On 2016-04-04 15:51:13, Jason Ekstrand wrote: > In the Vulkan driver we use a single flat input instead of a uniform > because setting up push constants is more disruptive to the pipeline than > setting up another vertex input. This uses the number of uniforms as a key > to keep it working for the

Re: [Mesa-dev] [PATCH] gallium/radeon: allow multiple exports of the same texture with different usage

2016-04-04 Thread Michel Dänzer
On 01.04.2016 23:42, Marek Olšák wrote: > The updated patch is attached. Reviewed-by: Michel Dänzer -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _

Re: [Mesa-dev] [PATCH] doxygen: update glsl link

2016-04-04 Thread Rhys Kidd
On 4 April 2016 at 17:44, Emil Velikov wrote: > On 4 April 2016 at 21:38, Elie TOURNIER wrote: > > --- > > doxygen/glsl.doxy | 7 +++ > > 1 file changed, 3 insertions(+), 4 deletions(-) > > > > diff --git a/doxygen/glsl.doxy b/doxygen/glsl.doxy > > index 9915ba2..0f4c822 100644 > > --- a/do

[Mesa-dev] [PATCH 2/2] i965/tiled_memcpy: Protect against wrong alignments

2016-04-04 Thread Jason Ekstrand
It's possible, when doing an x-tiled copy, to end up with a case where the bytes parameter is equal to 16 but the pointer is not actually aligned. This causes asserts in debug mode and segfaults in release builds due to doing an aligned operation on an unaligned pointer. Bugzilla: https://bugs.fre

[Mesa-dev] [PATCH 1/2] i965/tiled_memcpy: Add alignment assumption decorations

2016-04-04 Thread Jason Ekstrand
This should help GCC when inlining memcpy to be able to better choose an aligned version. It should also fix potential performance issues in the next commit. --- src/mesa/drivers/dri/i965/intel_tiled_memcpy.c | 30 +++--- 1 file changed, 22 insertions(+), 8 deletions(-) diff

[Mesa-dev] [PATCH v3] egl: add EGL_KHR_reusable_sync to egl_dri

2016-04-04 Thread Dongwon Kim
This patch enables an EGL extension, EGL_KHR_reusable_sync. This new extension basically provides a way for multiple APIs or threads to be excuted synchronously via a "reusable sync" primitive shared by those threads/API calls. This was implemented based on the specification at https://www.khrono

Re: [Mesa-dev] [PATCH 17/20] radeonsi: do not do two full flushes on every compute dispatch

2016-04-04 Thread Marek Olšák
On Tue, Apr 5, 2016 at 1:30 AM, Bas Nieuwenhuizen wrote: > On Tue, Apr 5, 2016 at 1:18 AM, Marek Olšák wrote: >> On Sat, Apr 2, 2016 at 3:11 PM, Bas Nieuwenhuizen >> wrote: >>> Signed-off-by: Bas Nieuwenhuizen >>> --- >>> src/gallium/drivers/radeonsi/si_compute.c | 17 ++--- >>> sr

Re: [Mesa-dev] [PATCH] glsl: use has_shader_storage_buffer_objects helper

2016-04-04 Thread Timothy Arceri
On Mon, 2016-04-04 at 11:55 -0400, Ilia Mirkin wrote: > Replaces open-coded logic with existing helper. > > Signed-off-by: Ilia Mirkin Reviewed-by: Timothy Arceri > --- >  src/compiler/glsl/lower_ubo_reference.cpp | 3 +-- >  1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/src/

[Mesa-dev] [PATCH] dri/i965: fix incorrect rgbFormat in intelCreateBuffer().

2016-04-04 Thread Haixia Shi
It is incorrect to assume that pixel format is always in BGR byte order. We need to check bitmask parameters (such as |redMask|) to determine whether the RGB or BGR byte order is requested. Furthermore when parameter |sRGBCapable| is set to false, we should be using UNORM format by default. Signe

Re: [Mesa-dev] [PATCH 07/12] glsl: Add arb_cull_distance support

2016-04-04 Thread Timothy Arceri
On Mon, 2016-04-04 at 15:07 +0200, Tobias Klausmann wrote: > > On 04.04.2016 04:48, Timothy Arceri wrote: > > > > On Mon, 2016-04-04 at 12:15 +1000, Dave Airlie wrote: > > > > > > From: Tobias Klausmann > > > > > > Signed-off-by: Tobias Klausmann > > m.de > > > --- > > >   src/compiler/glsl/a

Re: [Mesa-dev] [PATCH 17/20] radeonsi: do not do two full flushes on every compute dispatch

2016-04-04 Thread Bas Nieuwenhuizen
On Tue, Apr 5, 2016 at 1:18 AM, Marek Olšák wrote: > On Sat, Apr 2, 2016 at 3:11 PM, Bas Nieuwenhuizen > wrote: >> Signed-off-by: Bas Nieuwenhuizen >> --- >> src/gallium/drivers/radeonsi/si_compute.c | 17 ++--- >> src/gallium/drivers/radeonsi/si_state.c | 6 -- >> 2 files ch

Re: [Mesa-dev] [PATCH 17/20] radeonsi: do not do two full flushes on every compute dispatch

2016-04-04 Thread Marek Olšák
On Sat, Apr 2, 2016 at 3:11 PM, Bas Nieuwenhuizen wrote: > Signed-off-by: Bas Nieuwenhuizen > --- > src/gallium/drivers/radeonsi/si_compute.c | 17 ++--- > src/gallium/drivers/radeonsi/si_state.c | 6 -- > 2 files changed, 6 insertions(+), 17 deletions(-) > > diff --git a/src/

Re: [Mesa-dev] [PATCH 3/4] i965/fs_surface_builder: Mask signed integers after conversion

2016-04-04 Thread Francisco Jerez
Jason Ekstrand writes: > --- > src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp | 18 ++ > 1 file changed, 18 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp > b/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp > index 75734d2..4adffdd

[Mesa-dev] [PATCH 4/4] brw/device_info: Add a helper for getting a device name

2016-04-04 Thread Jason Ekstrand
This is needed by the Vulkan driver --- src/mesa/drivers/dri/i965/brw_device_info.c | 12 src/mesa/drivers/dri/i965/brw_device_info.h | 1 + 2 files changed, 13 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_device_info.c b/src/mesa/drivers/dri/i965/brw_device_info.c inde

[Mesa-dev] [PATCH 1/4] i965: Move get_hw_prim_for_gl_prim to brw_util.c

2016-04-04 Thread Jason Ekstrand
It's used by brw_compile_gs in brw_vec4_gs_visitor.cpp so it needs to be in a file that's linked into libi965_compiler.la. --- src/mesa/drivers/dri/i965/brw_draw.c | 29 - src/mesa/drivers/dri/i965/brw_util.c | 28 2 files changed, 28 insert

[Mesa-dev] [PATCH 3/4] i965/fs_surface_builder: Mask signed integers after conversion

2016-04-04 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp b/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp index 75734d2..4adffdd 100644 --- a/src/mesa/drivers/dri/i96

[Mesa-dev] [PATCH 1/4] i965: Move get_hw_prim_for_gl_prim to brw_util.c

2016-04-04 Thread Jason Ekstrand
It's used by brw_compile_gs in brw_vec4_gs_visitor.cpp so it needs to be in a file that's linked into libi965_compiler.la. --- src/mesa/drivers/dri/i965/brw_draw.c | 29 - src/mesa/drivers/dri/i965/brw_util.c | 28 2 files changed, 28 insert

[Mesa-dev] [PATCH 2/4] i965/fs: Make the repclear shader support either a uniform or a flat input

2016-04-04 Thread Jason Ekstrand
In the Vulkan driver we use a single flat input instead of a uniform because setting up push constants is more disruptive to the pipeline than setting up another vertex input. This uses the number of uniforms as a key to keep it working for the GL driver. --- src/mesa/drivers/dri/i965/brw_fs.cpp

Re: [Mesa-dev] [PATCH 07/12] glsl: Add arb_cull_distance support

2016-04-04 Thread Tobias Klausmann
On 05.04.2016 00:06, Dave Airlie wrote: On 4 April 2016 at 23:07, Tobias Klausmann wrote: On 04.04.2016 04:48, Timothy Arceri wrote: On Mon, 2016-04-04 at 12:15 +1000, Dave Airlie wrote: From: Tobias Klausmann Signed-off-by: Tobias Klausmann Const.MaxClipPlanes); + } else if (strcmp("g

Re: [Mesa-dev] [PATCH 07/12] glsl: Add arb_cull_distance support

2016-04-04 Thread Dave Airlie
On 4 April 2016 at 23:07, Tobias Klausmann wrote: > > > On 04.04.2016 04:48, Timothy Arceri wrote: >> >> On Mon, 2016-04-04 at 12:15 +1000, Dave Airlie wrote: >>> >>> From: Tobias Klausmann >>> >>> Signed-off-by: Tobias Klausmann >> --- >>> src/compiler/glsl/ast_to_hir.cpp | 14 +++

Re: [Mesa-dev] [PATCH] doxygen: update glsl link

2016-04-04 Thread Emil Velikov
On 4 April 2016 at 21:38, Elie TOURNIER wrote: > --- > doxygen/glsl.doxy | 7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/doxygen/glsl.doxy b/doxygen/glsl.doxy > index 9915ba2..0f4c822 100644 > --- a/doxygen/glsl.doxy > +++ b/doxygen/glsl.doxy > @@ -9,11 +9,10 @@ PR

Re: [Mesa-dev] [PATCH] doxygen: update glsl link

2016-04-04 Thread Matt Turner
On Mon, Apr 4, 2016 at 1:38 PM, Elie TOURNIER wrote: > --- > doxygen/glsl.doxy | 7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/doxygen/glsl.doxy b/doxygen/glsl.doxy > index 9915ba2..0f4c822 100644 > --- a/doxygen/glsl.doxy > +++ b/doxygen/glsl.doxy > @@ -9,11 +9,10

Re: [Mesa-dev] [PATCH 3/4] expose ARB_robust_buffer_access_behavior

2016-04-04 Thread Nicolai Hähnle
Capitalize the commit title. It might be nice to split this patch up into mesa/main and Gallium parts. Also... On 04.04.2016 06:41, Bas Nieuwenhuizen wrote: Signed-off-by: Bas Nieuwenhuizen --- src/gallium/docs/source/screen.rst | 4 +++- src/gallium/drivers/freedreno/freedre

Re: [Mesa-dev] [PATCH 2/4] radeonsi: use bounded indexing for samplers

2016-04-04 Thread Nicolai Hähnle
Patches 1 & 2 are Reviewed-by: Nicolai Hähnle On 04.04.2016 06:41, Bas Nieuwenhuizen wrote: Signed-off-by: Bas Nieuwenhuizen --- src/gallium/drivers/radeonsi/si_shader.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/

Re: [Mesa-dev] [Mesa-stable] [PATCH v2] glsl: Lower variable indexing of system value arrays unconditionally.

2016-04-04 Thread Ian Romanick
It might be worth having an assertion in case we either add another such variable in the future or the tess lowering pass somehow fails. Either way is Reviewed-by: Ian Romanick On April 4, 2016 11:09:44 AM Kenneth Graunke wrote: lower_variable_index_to_cond_assign() did not handle system v

[Mesa-dev] [PATCH] doxygen: update glsl link

2016-04-04 Thread Elie TOURNIER
--- doxygen/glsl.doxy | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doxygen/glsl.doxy b/doxygen/glsl.doxy index 9915ba2..0f4c822 100644 --- a/doxygen/glsl.doxy +++ b/doxygen/glsl.doxy @@ -9,11 +9,10 @@ PROJECT_NAME = "Mesa GLSL module" #-

[Mesa-dev] Build completed: mesa 803

2016-04-04 Thread AppVeyor
Build mesa 803 completed Commit 65fbc43d54 by Kenneth Graunke on 1/27/2016 8:21 PM: i965: Add an INTEL_PRECISE_TRIG=1 option to fix SIN/COS output range.\n\nThe SIN and COS instructions on Intel hardware can produce values\nslightly outside of the [-1.0, 1.0] r

Re: [Mesa-dev] [PATCH 16/26] i965: Implement the new imod and irem opcodes

2016-04-04 Thread Jason Ekstrand
On Fri, Apr 1, 2016 at 9:56 PM, Jason Ekstrand wrote: > > > On Tue, Mar 29, 2016 at 8:49 PM, Matt Turner wrote: > >> On Fri, Mar 25, 2016 at 4:12 PM, Jason Ekstrand >> wrote: >> > --- >> > src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 32 >> ++ >> > src/mesa/drivers/

Re: [Mesa-dev] [PATCH] mesa: expose EXT_base_instance in ES3 contexts

2016-04-04 Thread Matt Turner
Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] mesa: expose EXT_polygon_offset_clamp in ES contexts

2016-04-04 Thread Matt Turner
On Sat, Apr 2, 2016 at 11:29 PM, Ilia Mirkin wrote: > The extension spec was extended to also support ES. This functionality > is provided all the way back to ES 1.0. I was going to ask if we have ES tests, and I see that you've already sent one! Reviewed-by: Matt Turner ___

Re: [Mesa-dev] [PATCH] glsl: make *sampler2DMSArray available in ESSL 3.20

2016-04-04 Thread Matt Turner
Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] Build failed: mesa 802

2016-04-04 Thread AppVeyor
Build mesa 802 failed Commit 8c8157bf6f by Jason Ekstrand on 4/4/2016 6:24 PM: Remove more spirv2nir remnants Configure your notification preferences ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org

Re: [Mesa-dev] [PATCH] i965: Add an INTEL_PRECISE_TRIG=1 option to fix SIN/COS output range.

2016-04-04 Thread Jason Ekstrand
On Sun, Apr 3, 2016 at 5:34 PM, Kenneth Graunke wrote: > The SIN and COS instructions on Intel hardware can produce values > slightly outside of the [-1.0, 1.0] range for a small set of values. > Obviously, this can break everyone's expectations about trig functions. > > According to an internal

Re: [Mesa-dev] [PATCH] glsl: allow conservative depth qualifiers in GLSL 420

2016-04-04 Thread Matt Turner
On Sat, Apr 2, 2016 at 6:12 PM, Ilia Mirkin wrote: > Signed-off-by: Ilia Mirkin > --- > > Noticed by inspection. > > src/compiler/glsl/ast_to_hir.cpp | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/compiler/glsl/ast_to_hir.cpp > b/src/compiler/glsl/ast_to_hir.cpp

Re: [Mesa-dev] [PATCH] i965: Add an INTEL_PRECISE_TRIG=1 option to fix SIN/COS output range.

2016-04-04 Thread Matt Turner
Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 1/2] i965: Make bblock_t::next and friends return NULL at sentinels.

2016-04-04 Thread Matt Turner
On Sun, Apr 3, 2016 at 10:56 PM, Kenneth Graunke wrote: > The bblock_t::prev/prev_const/next/next_const API returns bblock_t > pointers, rather than exec_nodes. So it's a bit surprising. > > Signed-off-by: Kenneth Graunke > --- Both are Reviewed-by: Matt Turner ___

Re: [Mesa-dev] [PATCH v2] glsl: Lower variable indexing of system value arrays unconditionally.

2016-04-04 Thread Ilia Mirkin
On Mon, Apr 4, 2016 at 2:09 PM, Kenneth Graunke wrote: > lower_variable_index_to_cond_assign() did not handle system values. > gl_SampleMaskIn[] is a system value, and also an array. Accessing it > with a variable index would trigger an unreachable() assert. > > Rather than adding a new EmitNoInd

[Mesa-dev] [PATCH v2] glsl: Lower variable indexing of system value arrays unconditionally.

2016-04-04 Thread Kenneth Graunke
lower_variable_index_to_cond_assign() did not handle system values. gl_SampleMaskIn[] is a system value, and also an array. Accessing it with a variable index would trigger an unreachable() assert. Rather than adding a new EmitNoIndirectSystemValues flag, we simply lower unconditionally. There i

Re: [Mesa-dev] [PATCH 13/20] radeonsi: only emit compute shader state when switching shaders

2016-04-04 Thread Bas Nieuwenhuizen
On Mon, Apr 4, 2016 at 7:53 PM, Bas Nieuwenhuizen wrote: > On Mon, Apr 4, 2016 at 7:29 PM, Marek Olšák wrote: >> On Sat, Apr 2, 2016 at 3:10 PM, Bas Nieuwenhuizen >> wrote: >>> Signed-off-by: Bas Nieuwenhuizen >>> --- >>> src/gallium/drivers/radeonsi/si_compute.c | 142 >>> +--

Re: [Mesa-dev] [PATCH v2 2/2] i965: Fix invalid pointer read in dead_control_flow_eliminate().

2016-04-04 Thread Jason Ekstrand
On Mon, Apr 4, 2016 at 10:23 AM, Kenneth Graunke wrote: > On Monday, April 4, 2016 12:19:57 AM PDT Jason Ekstrand wrote: > > On Sun, Apr 3, 2016 at 10:56 PM, Kenneth Graunke > > wrote: > > > > > There may not be a previous block. In this case, there's no real work > > > to do, so just continue

Re: [Mesa-dev] [PATCH 13/20] radeonsi: only emit compute shader state when switching shaders

2016-04-04 Thread Bas Nieuwenhuizen
On Mon, Apr 4, 2016 at 7:29 PM, Marek Olšák wrote: > On Sat, Apr 2, 2016 at 3:10 PM, Bas Nieuwenhuizen > wrote: >> Signed-off-by: Bas Nieuwenhuizen >> --- >> src/gallium/drivers/radeonsi/si_compute.c | 142 >> +- >> src/gallium/drivers/radeonsi/si_pipe.h| 2 +

Re: [Mesa-dev] [PATCH 14/20] radeonsi: implement TGSI compute dispatch

2016-04-04 Thread Marek Olšák
This should use radeon_set_sh_reg... like other patches. Marek On Sat, Apr 2, 2016 at 3:10 PM, Bas Nieuwenhuizen wrote: > Signed-off-by: Bas Nieuwenhuizen > --- > src/gallium/drivers/radeonsi/si_compute.c | 104 > ++ > 1 file changed, 77 insertions(+), 27 deletions

Re: [Mesa-dev] [PATCH v2] egl: add EGL_KHR_reusable_sync to egl_dri

2016-04-04 Thread dw kim
On Mon, Apr 04, 2016 at 01:19:13PM +0200, Marek Olšák wrote: > This looks good in general. Just some small nitpicks below. > > On Sat, Apr 2, 2016 at 1:46 AM, Dongwon Kim wrote: > > This patch enables an EGL extension, EGL_KHR_reusable_sync. > > This new extension basically provides a way for mul

Re: [Mesa-dev] [PATCH] glsl: Lower variable indexing of system value arrays; treat like inputs.

2016-04-04 Thread Ilia Mirkin
On Mon, Apr 4, 2016 at 1:22 PM, Kenneth Graunke wrote: > On Monday, April 4, 2016 12:05:20 PM PDT Ilia Mirkin wrote: >> For those (few, I'm sure) of us who are exceedingly lazy, what [glsl >> ir] code ends up getting generated as a result of this? >> >> int temp; >> if (zero == 0) temp = gl_Sample

Re: [Mesa-dev] [PATCH 13/20] radeonsi: only emit compute shader state when switching shaders

2016-04-04 Thread Marek Olšák
On Sat, Apr 2, 2016 at 3:10 PM, Bas Nieuwenhuizen wrote: > Signed-off-by: Bas Nieuwenhuizen > --- > src/gallium/drivers/radeonsi/si_compute.c | 142 > +- > src/gallium/drivers/radeonsi/si_pipe.h| 2 + > 2 files changed, 85 insertions(+), 59 deletions(-) > > dif

Re: [Mesa-dev] [PATCH v2 2/2] i965: Fix invalid pointer read in dead_control_flow_eliminate().

2016-04-04 Thread Kenneth Graunke
On Monday, April 4, 2016 12:19:57 AM PDT Jason Ekstrand wrote: > On Sun, Apr 3, 2016 at 10:56 PM, Kenneth Graunke > wrote: > > > There may not be a previous block. In this case, there's no real work > > to do, so just continue on to the next one. > > > > v2: Update for bblock->prev() API change.

Re: [Mesa-dev] [PATCH] glsl: Lower variable indexing of system value arrays; treat like inputs.

2016-04-04 Thread Kenneth Graunke
On Monday, April 4, 2016 12:05:20 PM PDT Ilia Mirkin wrote: > For those (few, I'm sure) of us who are exceedingly lazy, what [glsl > ir] code ends up getting generated as a result of this? > > int temp; > if (zero == 0) temp = gl_SampleMaskIn[0] > else leave temp undefined? Running my new samplem

Re: [Mesa-dev] [PATCH 1/3] r600: Change default behaviour for undefined COLOR0

2016-04-04 Thread Axel Davy
On 04/04/2016 18:48, Roland Scheidegger wrote: Am 04.04.2016 um 17:27 schrieb Axel Davy: So is that ok to you for now to update the radeon behaviour ? As I said, you can do what you want there as far as I'm concerned. Just saying it's going to be a constant battle to fix other drivers... Al

Re: [Mesa-dev] About the usage of the "flat" interpolation qualifier with input (unsigned) integers and doubles in fragment shaders

2016-04-04 Thread Andres Gomez
Hi, Thanks, Jason and Ian, for the feedback. See the patch sent at: https://lists.freedesktop.org/archives/mesa-dev/2016-April/111842.html Br. On Wed, 2016-03-23 at 14:51 -0700, Ian Romanick wrote: > On 03/18/2016 09:52 PM, Jason Ekstrand wrote: > > > > > > > > On Fri, Mar 4, 2016 at 5:43 AM,

Re: [Mesa-dev] [PATCH 12/20] radeonsi: rework compute scratch buffer

2016-04-04 Thread Marek Olšák
On Sat, Apr 2, 2016 at 3:10 PM, Bas Nieuwenhuizen wrote: > Instead of having a scratch buffer per program, have one per > context. > > Also removed the per kernel wave count calculations, but > that only helped if the total number of waves in the dispatch > was smaller than sctx->scratch_waves. >

[Mesa-dev] [PATCH] glsl: Checks for interpolation into its own function.

2016-04-04 Thread Andres Gomez
This generalizes the validation also to be done for variables inside interface blocks, which, for some cases, was missing. For a discussion about the additional validation cases included see https://lists.freedesktop.org/archives/mesa-dev/2016-March/109117.html and Khronos bug #15671. Signed-off-

Re: [Mesa-dev] [PATCH 1/3] r600: Change default behaviour for undefined COLOR0

2016-04-04 Thread Roland Scheidegger
Am 04.04.2016 um 17:27 schrieb Axel Davy: > Le 04/04/2016 15:27, Roland Scheidegger a écrit : >> Am 04.04.2016 um 14:04 schrieb Axel Davy: >>> On 03/04/2016 20:41, Roland Scheidegger wrote : Am 03.04.2016 um 10:11 schrieb Axel Davy: > d3d 9 needs COLOR0 to be 1.0 on all channels when >

Re: [Mesa-dev] [PATCH 09/20] radeonsi: split input upload off from si_launch_grid

2016-04-04 Thread Marek Olšák
Patches 1-9: Reviewed-by: Marek Olšák Marek On Sat, Apr 2, 2016 at 3:10 PM, Bas Nieuwenhuizen wrote: > Signed-off-by: Bas Nieuwenhuizen > --- > src/gallium/drivers/radeonsi/si_compute.c | 94 > +-- > 1 file changed, 53 insertions(+), 41 deletions(-) > > diff --gi

Re: [Mesa-dev] [PATCH 11/20] radeonsi: do per cs setup for compute shaders once per cs

2016-04-04 Thread Marek Olšák
On Sat, Apr 2, 2016 at 3:10 PM, Bas Nieuwenhuizen wrote: > Also removes PKT3_CONTEXT_CONTROL as that is already being done > by si_begin_new_cs, when emitting init_config. > > Signed-off-by: Bas Nieuwenhuizen > --- > src/gallium/drivers/radeonsi/si_compute.c| 69 > +++---

Re: [Mesa-dev] [PATCH 01/20] radeonsi: set shader calling conventions

2016-04-04 Thread Tom Stellard
On Sat, Apr 02, 2016 at 03:10:44PM +0200, Bas Nieuwenhuizen wrote: > Note that old mesa + new LLVM or new mesa + old LLVM breaks > with this change and the corresponding LLVM change (D18559). > > For LLVM version <= 3.8 we use the old method, but we can't detect > people using a post 3.8 svn versi

Re: [Mesa-dev] [PATCH] i965: Allow 8x MSAA on >= 64bpp formats on Gen8+.

2016-04-04 Thread Ben Widawsky
On Mon, Apr 04, 2016 at 02:04:13AM -0700, Kenneth Graunke wrote: > See commit 3b0279a69 - this restriction is documented in the "Surface > Format" field of RENDER_SURFACE_STATE. > > Looking at newer documentation, this restriction appears to exist on > Haswell, but no longer applies on Gen8+. > >

Re: [Mesa-dev] [PATCH] glsl: Lower variable indexing of system value arrays; treat like inputs.

2016-04-04 Thread Ilia Mirkin
For those (few, I'm sure) of us who are exceedingly lazy, what [glsl ir] code ends up getting generated as a result of this? int temp; if (zero == 0) temp = gl_SampleMaskIn[0] else leave temp undefined? On Mon, Apr 4, 2016 at 5:08 AM, Kenneth Graunke wrote: > Some system values, such as gl_Sampl

[Mesa-dev] [PATCH] glsl: use has_shader_storage_buffer_objects helper

2016-04-04 Thread Ilia Mirkin
Replaces open-coded logic with existing helper. Signed-off-by: Ilia Mirkin --- src/compiler/glsl/lower_ubo_reference.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compiler/glsl/lower_ubo_reference.cpp b/src/compiler/glsl/lower_ubo_reference.cpp index 3155ab6..1a0

[Mesa-dev] [Bug 94805] Compile Mesa , specific compilation , error: LLVM is required to build Gallium

2016-04-04 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=94805 --- Comment #2 from tele --- I build LLVM like this: # mkdir build cd build export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig export CC="gcc -m32" export CXX="g++ -m32" cmake .. \ -DLLVM_BUILD_32_BITS:BOOLEAN

Re: [Mesa-dev] [PATCH 09/20] radeonsi: split input upload off from si_launch_grid

2016-04-04 Thread Marek Olšák
The commit message should say that this changes the allocation to u_upload_alloc. Marek On Sat, Apr 2, 2016 at 3:10 PM, Bas Nieuwenhuizen wrote: > Signed-off-by: Bas Nieuwenhuizen > --- > src/gallium/drivers/radeonsi/si_compute.c | 94 > +-- > 1 file changed, 53 in

Re: [Mesa-dev] [PATCH 1/3] r600: Change default behaviour for undefined COLOR0

2016-04-04 Thread Axel Davy
Le 04/04/2016 15:27, Roland Scheidegger a écrit : Am 04.04.2016 um 14:04 schrieb Axel Davy: On 03/04/2016 20:41, Roland Scheidegger wrote : Am 03.04.2016 um 10:11 schrieb Axel Davy: d3d 9 needs COLOR0 to be 1.0 on all channels when undefined. 0.0 for the others is fine. GL behaviour is undefin

Re: [Mesa-dev] [PATCH] glsl/list: make nodes safe for double removal, etc.

2016-04-04 Thread Rob Clark
On Mon, Apr 4, 2016 at 10:34 AM, Iago Toral wrote: > On Sat, 2016-04-02 at 17:09 -0400, Rob Clark wrote: >> From: Rob Clark >> >> It's no extra overhead to do a _self_link() and it eliminates a class of >> potential problems. > > it can also hide actual programming mistakes that would otherwise b

Re: [Mesa-dev] [PATCH] glsl/list: make nodes safe for double removal, etc.

2016-04-04 Thread Iago Toral
On Sat, 2016-04-02 at 17:09 -0400, Rob Clark wrote: > From: Rob Clark > > It's no extra overhead to do a _self_link() and it eliminates a class of > potential problems. it can also hide actual programming mistakes that would otherwise be immediately visible... does this actually help something s

Re: [Mesa-dev] [PATCH] glsl: make ssbo predicate return true when in a GLSL 430 or ESSL 310 shader

2016-04-04 Thread Iago Toral
Instead of doing this, I think we should just call state->has_shader_storage_buffer_objects(), which does exactly the same. With that change: Reviewed-by: Iago Toral Quiroga On Sat, 2016-04-02 at 21:51 -0400, Ilia Mirkin wrote: > I can't tell whether this actually matters, but we're creating fu

Re: [Mesa-dev] [PATCH] mesa/get: fix MAX_GEOMETRY_SHADER_STORAGE_BLOCKS

2016-04-04 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga On Mon, 2016-04-04 at 07:55 +0100, Dave Airlie wrote: > From: Dave Airlie > > this was returning the fragment shader value. > > Signed-off-by: Dave Airlie > --- > src/mesa/main/get_hash_params.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > dif

Re: [Mesa-dev] [PATCH 4/6] gallium: add way for drivers to create fences without flushing

2016-04-04 Thread Rob Clark
Hmm, so we could actually use EGL_SYNC_FLUSH_COMMANDS_BIT_KHR (which is ignored when there is not a ctx bound).. from looking closer at KHR_fence_sync this appears to be how things are expected to work. ofc that means that you end up needing to keep both ctx->fence_finish() and screen->fence_finis

Re: [Mesa-dev] [PATCH 4/6] gallium: add way for drivers to create fences without flushing

2016-04-04 Thread Rob Clark
well, https://groups.google.com/a/chromium.org/forum/#!topic/chromium-os-reviews/IFiv8rZfAq0 does imply that it could be called without a ctx bound.. hmm.. BR, -R On Mon, Apr 4, 2016 at 8:43 AM, Rob Clark wrote: > Hmm, what are the requirements of eglClientWaitSyncKHR() about having > current

[Mesa-dev] Mesa 11.2.0

2016-04-04 Thread Emil Velikov
Hello all, Mesa 11.2.0 is now available. Huge shout out goes to everyone involved. Thank you for your amazing and ongoing work ! Here are some of the highlights: - CI - Add Travis-CI configuration file. - Documented more environment variables, squashed a ton of typos. - Core mesa - Fix loc

Re: [Mesa-dev] [PATCH 03/20] radeonsi: add shared memory

2016-04-04 Thread Marek Olšák
On Sat, Apr 2, 2016 at 3:10 PM, Bas Nieuwenhuizen wrote: > Declares the shared memory as a global variable so that > LLVM is aware of it and it does not conflict with passes > like AMDGPUPromoteAlloca. > > Signed-off-by: Bas Nieuwenhuizen > --- > src/gallium/drivers/radeon/radeon_llvm.h

Re: [Mesa-dev] [PATCH 1/3] r600: Change default behaviour for undefined COLOR0

2016-04-04 Thread Roland Scheidegger
Am 04.04.2016 um 14:04 schrieb Axel Davy: > On 03/04/2016 20:41, Roland Scheidegger wrote : >> Am 03.04.2016 um 10:11 schrieb Axel Davy: >>> d3d 9 needs COLOR0 to be 1.0 on all channels when >>> undefined. 0.0 for the others is fine. >>> GL behaviour is undefined. >>> >> Not that I care what driver

Re: [Mesa-dev] [PATCH 11/12] nvc0: Implement cull_distance as a special form of clip distance

2016-04-04 Thread Tobias Klausmann
On 04.04.2016 04:32, Ilia Mirkin wrote: On Sun, Apr 3, 2016 at 10:15 PM, Dave Airlie wrote: From: Tobias Klausmann This enables ARB_cull_distance. This isn't enough - something needs to lower the CULLDIST into CLIPDIST (or some combined thing). Ideally they'd both just come in as CLIPDIST

Re: [Mesa-dev] [PATCH 07/12] glsl: Add arb_cull_distance support

2016-04-04 Thread Tobias Klausmann
On 04.04.2016 04:48, Timothy Arceri wrote: On Mon, 2016-04-04 at 12:15 +1000, Dave Airlie wrote: From: Tobias Klausmann Signed-off-by: Tobias Klausmann Const.MaxClipPlanes); + } else if (strcmp("gl_CullDistance", name) == 0 + && size > state->Const.MaxClipPlanes) { + /* F

Re: [Mesa-dev] [PATCH 0/4] ARB_robust_buffer_access_behavior for radeonsi

2016-04-04 Thread eocallaghan
I had a hacked up version of this last week which was very similar. This is much cleaner, hence this series is, Reviewed-by: Edward O'Callaghan On 2016-04-04 21:41, Bas Nieuwenhuizen wrote: This series implements ARb_robust_buffer_access_behavior for the radeonsi driver. There are some tests

Re: [Mesa-dev] [PATCH 4/6] gallium: add way for drivers to create fences without flushing

2016-04-04 Thread Rob Clark
Hmm, what are the requirements of eglClientWaitSyncKHR() about having current context bound? Not being thread-safe (ie. being associated w/ current ctx) is pretty important to allow apps that create fences at in-opportune times to not force a mid-frame flush for tilers.. :-( BR, -R On Mon, Apr

Re: [Mesa-dev] [PATCH 2/6] dri: extend fence extension to support native fd fences

2016-04-04 Thread Rob Clark
On Mon, Apr 4, 2016 at 7:49 AM, Marek Olšák wrote: > On Fri, Apr 1, 2016 at 10:29 PM, Rob Clark wrote: >> From: Rob Clark >> >> Required to implement EGL_ANDROID_native_fence_sync. >> >> Signed-off-by: Rob Clark >> --- >> include/GL/internal/dri_interface.h | 44 >> +++

Re: [Mesa-dev] [PATCH 5/6] gallium: wire up server_wait_sync

2016-04-04 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Fri, Apr 1, 2016 at 10:29 PM, Rob Clark wrote: > From: Rob Clark > > This will be needed for explicit synchronization with devices outside > the gpu, ie. EGL_ANDROID_native_fence_sync. > > Signed-off-by: Rob Clark > --- > src/gallium/include/pipe/p_context.h

Re: [Mesa-dev] [PATCH 4/6] gallium: add way for drivers to create fences without flushing

2016-04-04 Thread Marek Olšák
There is one problem with this: It doesn't allow calling pipe_context::fence_finish from another thread in a thread-safe manner, and it implies that fence_finish is generally NOT thread-safe. This thread safety is something I'd like to preserve. I would say that a flush flag telling the driver not

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" mailto:kenn...@whitecape.org>> 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. > > Use the standard C99

Re: [Mesa-dev] [PATCH 1/3] r600: Change default behaviour for undefined COLOR0

2016-04-04 Thread Axel Davy
On 03/04/2016 20:41, Roland Scheidegger wrote : Am 03.04.2016 um 10:11 schrieb Axel Davy: d3d 9 needs COLOR0 to be 1.0 on all channels when undefined. 0.0 for the others is fine. GL behaviour is undefined. Not that I care what drivers use by default for undefined values, but it probably would

Re: [Mesa-dev] [PATCH 2/6] dri: extend fence extension to support native fd fences

2016-04-04 Thread Marek Olšák
On Fri, Apr 1, 2016 at 10:29 PM, Rob Clark wrote: > From: Rob Clark > > Required to implement EGL_ANDROID_native_fence_sync. > > Signed-off-by: Rob Clark > --- > include/GL/internal/dri_interface.h | 44 > - > 1 file changed, 43 insertions(+), 1 deletion(-)

[Mesa-dev] [PATCH 4/4] radeonsi: mark ARB_robust_buffer_access_behavior as supported

2016-04-04 Thread Bas Nieuwenhuizen
Signed-off-by: Bas Nieuwenhuizen --- docs/GL3.txt | 2 +- docs/relnotes/11.3.0.html | 1 + src/gallium/drivers/radeonsi/si_pipe.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index 6ea8d5c..d7e0a4b 100644

[Mesa-dev] [PATCH 2/4] radeonsi: use bounded indexing for samplers

2016-04-04 Thread Bas Nieuwenhuizen
Signed-off-by: Bas Nieuwenhuizen --- src/gallium/drivers/radeonsi/si_shader.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index dd04748..392f439 100644 --- a/src/gallium/drivers/radeon

[Mesa-dev] [PATCH 1/4] radeonsi: use bounded indexing for constant buffers

2016-04-04 Thread Bas Nieuwenhuizen
Signed-off-by: Bas Nieuwenhuizen --- src/gallium/drivers/radeonsi/si_shader.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 28c7923..dd04748 100644 --- a/src/gallium/drivers/radeo

[Mesa-dev] [PATCH 3/4] expose ARB_robust_buffer_access_behavior

2016-04-04 Thread Bas Nieuwenhuizen
Signed-off-by: Bas Nieuwenhuizen --- src/gallium/docs/source/screen.rst | 4 +++- src/gallium/drivers/freedreno/freedreno_screen.c | 1 + src/gallium/drivers/i915/i915_screen.c | 1 + src/gallium/drivers/ilo/ilo_screen.c | 1 + src/gallium/drivers/llvmpipe/lp_s

[Mesa-dev] [PATCH 0/4] ARB_robust_buffer_access_behavior for radeonsi

2016-04-04 Thread Bas Nieuwenhuizen
This series implements ARb_robust_buffer_access_behavior for the radeonsi driver. There are some tests at: https://github.com/BNieuwenhuizen/piglit These have not been send yet as they depend on robust access context support in waffle. Bas Nieuwenhuizen (4): radeonsi: use bounded indexing for

Re: [Mesa-dev] [PATCH v2] egl: add EGL_KHR_reusable_sync to egl_dri

2016-04-04 Thread Marek Olšák
This looks good in general. Just some small nitpicks below. On Sat, Apr 2, 2016 at 1:46 AM, Dongwon Kim wrote: > This patch enables an EGL extension, EGL_KHR_reusable_sync. > This new extension basically provides a way for multiple APIs or > threads to be excuted synchronously via a "reusable syn

Re: [Mesa-dev] [PATCH v2 22/23] nir: add a pass for lowering (un)pack_double_2x32

2016-04-04 Thread Samuel Iglesias Gonsálvez
On 01/04/16 21:30, Jason Ekstrand wrote: > On Thu, Mar 31, 2016 at 3:00 AM, Samuel Iglesias Gonsálvez < > sigles...@igalia.com> wrote: > >> From: Connor Abbott >> >> v2: Undo unintended change to the signature of >> nir_normalize_cubemap_coords (Iago). >> >> v3: Move to compiler/nir (Iago)

[Mesa-dev] [PATCH] glsl: Lower variable indexing of system value arrays; treat like inputs.

2016-04-04 Thread Kenneth Graunke
Some system values, such as gl_SampleMaskIn[], may be arrays. lower_variable_index_to_cond_assign() did not handle this case and would hit an unreachable() assert. For now, lower when EmitNoIndirectInput is set. We could potentially add another flag for system values, but I'm not sure how useful

[Mesa-dev] [PATCH] i965: Allow 8x MSAA on >= 64bpp formats on Gen8+.

2016-04-04 Thread Kenneth Graunke
See commit 3b0279a69 - this restriction is documented in the "Surface Format" field of RENDER_SURFACE_STATE. Looking at newer documentation, this restriction appears to exist on Haswell, but no longer applies on Gen8+. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_surface_for

Re: [Mesa-dev] [PATCH 2/6] glsl: remove unused buffer block splitting function

2016-04-04 Thread Timothy Arceri
On Sun, 2016-04-03 at 23:31 -0700, Kenneth Graunke wrote: > On Sunday, April 3, 2016 9:16:29 PM PDT Timothy Arceri wrote: > > > > --- > >  src/compiler/glsl/linker.cpp | 70  > > > > >  1 file changed, 70 deletions(-) > Hrm? > >    glsl: remove unused

Re: [Mesa-dev] [PATCH 1/6] glsl: make use of separate UBO and SSBO lists

2016-04-04 Thread Timothy Arceri
On Sun, 2016-04-03 at 23:27 -0700, Kenneth Graunke wrote: > On Sunday, April 3, 2016 9:16:28 PM PDT Timothy Arceri wrote: > [snip] > > > > @@ -3295,8 +3296,8 @@ should_add_buffer_variable(struct > > gl_shader_program  > *shProg, > > > > if (type != GL_BUFFER_VARIABLE) > >    return true;

Re: [Mesa-dev] [PATCH v2 00/23] NIR: more bit-size related patches

2016-04-04 Thread Samuel Iglesias Gonsálvez
On 01/04/16 22:48, Jason Ekstrand wrote: > On Thu, Mar 31, 2016 at 2:59 AM, Samuel Iglesias Gonsálvez < > sigles...@igalia.com> wrote: > >> Hello, >> >> This is the second version of this patch series [0]. >> >> In case you prefer a repository, it is available here [1]: >> >> $ git clone -b nir-

Re: [Mesa-dev] [PATCH v2 13/23] nir/glsl_to_nir: set the bit-size in the result of evaluate_rvalue

2016-04-04 Thread Samuel Iglesias Gonsálvez
On 01/04/16 22:45, Jason Ekstrand wrote: > On Thu, Mar 31, 2016 at 3:00 AM, Samuel Iglesias Gonsálvez < > sigles...@igalia.com> wrote: > >> From: Iago Toral Quiroga >> >> Found while testing UBO loads in scenarios like this: >> >> (assign (x) (var_ref vec_ctor) >> (expression float d2f >>

Re: [Mesa-dev] [PATCH v2 23/23] nir: verify destination bit size when checking algebraic optimizations

2016-04-04 Thread Samuel Iglesias Gonsálvez
On 01/04/16 21:35, Jason Ekstrand wrote: > Unless I'm missing something, this series doesn't contain anything that > uses this patch. Let's drop it for now and put it in with whatever adds > the actual nir_opt_algebraic changes. > Yeah, the user of this will be included in next patch series. I

Re: [Mesa-dev] [PATCH v2 03/23] nir: add bit_size info to nir_ssa_undef_instr_create()

2016-04-04 Thread Samuel Iglesias Gonsálvez
On 01/04/16 21:02, Jason Ekstrand wrote: > On Thu, Mar 31, 2016 at 2:59 AM, Samuel Iglesias Gonsálvez < > sigles...@igalia.com> wrote: > >> Signed-off-by: Samuel Iglesias Gonsálvez >> --- >> src/compiler/nir/glsl_to_nir.cpp | 2 +- >> src/compiler/nir/nir.c | 6 --

Re: [Mesa-dev] [PATCH v2 10/23] nir: handle doubles in nir_deref_get_const_initializer_load()

2016-04-04 Thread Samuel Iglesias Gonsálvez
On 01/04/16 21:11, Jason Ekstrand wrote: > On Thu, Mar 31, 2016 at 2:59 AM, Samuel Iglesias Gonsálvez < > sigles...@igalia.com> wrote: > >> From: Connor Abbott >> >> --- >> src/compiler/nir/nir.c | 5 + >> 1 file changed, 5 insertions(+) >> >> diff --git a/src/compiler/nir/nir.c b/src/comp

Re: [Mesa-dev] [PATCH v2 09/23] nir/print: add support for printing doubles and bitsize

2016-04-04 Thread Samuel Iglesias Gonsálvez
On 01/04/16 21:09, Jason Ekstrand wrote: > On Thu, Mar 31, 2016 at 2:59 AM, Samuel Iglesias Gonsálvez < > sigles...@igalia.com> wrote: > >> From: Connor Abbott >> >> v2: >> - Squash the printing doubles related patches into one patch (Sam). >> --- >> src/compiler/nir/nir_print.c | 17 +

  1   2   >