Re: [Mesa-dev] [PATCH 1/2] mesa: fix clip plane enable breakage

2017-06-26 Thread Michel Dänzer
On 26/06/17 09:49 AM, Marek Olšák wrote: > From: Marek Olšák > > Broken by: > > commit 00173d91b70ae4dcea7c6324ee4858c498cae14b > Author: Marek Olšák > Date: Sat Jun 10 12:09:43 2017 +0200 > > mesa: don't flag _NEW_TRANSFORM for st/mesa if possible > > It also optimizes the case slightl

Re: [Mesa-dev] [PATCH v2 3/3] ac/nir: assert printfs will fit

2017-06-26 Thread Nicolai Hähnle
Patches 2 & 3: Reviewed-by: Nicolai Hähnle On 23.06.2017 12:18, James Legg wrote: --- src/amd/common/ac_nir_to_llvm.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 3a26668..b32a9

Re: [Mesa-dev] [PATCH] mesa: fix unused variable warning in release builds

2017-06-26 Thread Nicolai Hähnle
On 26.06.2017 01:25, Timothy Arceri wrote: --- src/mesa/main/uniforms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c index 91c3bf6..1c3d89b 100644 --- a/src/mesa/main/uniforms.c +++ b/src/mesa/main/uniforms.c @@ -104,7

Re: [Mesa-dev] [PATCH 3/3] mesa: add KHR_no_error support for gl{Compressed}TexImage*D()

2017-06-26 Thread Nicolai Hähnle
For the series: Reviewed-by: Nicolai Hähnle On 26.06.2017 02:49, Timothy Arceri wrote: --- src/mapi/glapi/gen/gl_API.xml | 14 src/mesa/main/teximage.c | 82 +++ src/mesa/main/teximage.h | 34 ++ 3 files changed, 1

Re: [Mesa-dev] [PATCH 01/17] mesa: add PackedDriverUniformStorage const

2017-06-26 Thread Nicolai Hähnle
On 25.06.2017 03:31, Timothy Arceri wrote: Will be used to determine whether to take packing code paths or not. --- src/mesa/main/mtypes.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 0cb0024..49c8f63 100644 --- a/src/mesa/main/mt

Re: [Mesa-dev] [PATCH 03/17] mesa: rework ParameterList to allow packing

2017-06-26 Thread Nicolai Hähnle
On 25.06.2017 03:31, Timothy Arceri wrote: Currently everything is padded to 4 elements. Making the list more flexible will allow us to do uniform packing. This change requires us to remove the existing packing in _mesa_add_typed_unnamed_constant() in order to avoid regressions. This packing wil

Re: [Mesa-dev] [PATCH 1/3] mesa: create wrapper around teximage()

2017-06-26 Thread Samuel Pitoiset
For the series: Reviewed-by: Samuel Pitoiset On 06/26/2017 02:49 AM, Timothy Arceri wrote: This is used to inline KHR_no_error logic without inlining the function into all its callers. --- src/mesa/main/teximage.c | 40 ++-- 1 file changed, 26 insertions(

Re: [Mesa-dev] [PATCH] mesa: fix unused variable warning in release builds

2017-06-26 Thread Samuel Pitoiset
With Nicolai's suggestion, patch is: Reviewed-by: Samuel Pitoiset On 06/26/2017 01:25 AM, Timothy Arceri wrote: --- src/mesa/main/uniforms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c index 91c3bf6..1c3d89b 100644

Re: [Mesa-dev] [PATCH 1/4] mesa: tidy up copyteximage()

2017-06-26 Thread Samuel Pitoiset
Can you just keep the declarations of texObj and texFormat at the beginning of the function? Except this, patch is: Reviewed-by: Samuel Pitoiset On 06/26/2017 06:30 AM, Timothy Arceri wrote: --- src/mesa/main/teximage.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(

Re: [Mesa-dev] [PATCH 1/4] mesa: tidy up copyteximage()

2017-06-26 Thread Samuel Pitoiset
Except a little nitpick on patch 1, series is: Reviewed-by: Samuel Pitoiset On 06/26/2017 06:30 AM, Timothy Arceri wrote: --- src/mesa/main/teximage.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c in

Re: [Mesa-dev] [PATCH 12/17] mesa/st: make sure the const buffer is large enough for packed uniforms

2017-06-26 Thread Nicolai Hähnle
On 25.06.2017 03:31, Timothy Arceri wrote: --- src/mesa/state_tracker/st_atom_constbuf.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c index 7f17546..eb8f6b3 100644 --- a/src/mes

Re: [Mesa-dev] RFC uniform packing for gallium V2

2017-06-26 Thread Nicolai Hähnle
I had a chance to look at the patches in detail now. Thanks for working on this, it should be quite useful! With the remark on patch 1 addressed, patches 1, 2, and 4-9 are Reviewed-by: Nicolai Hähnle I've sent some more extensive comments on patch 3, and I already explained that I don't like

Re: [Mesa-dev] [PATCH] radeonsi: don't flush and wait for CB after depth-only rendering

2017-06-26 Thread Nicolai Hähnle
Looks good! Reviewed-by: Nicolai Hähnle On 26.06.2017 02:49, Marek Olšák wrote: From: Marek Olšák --- src/gallium/drivers/radeonsi/si_state.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si

[Mesa-dev] [PATCH 4/9] glsl: simplify add_uniform_to_shader::visit_field

2017-06-26 Thread Nicolai Hähnle
From: Nicolai Hähnle Each field gets a distinct name, so we should never hit the case where the name already exists in the parameter list. --- src/mesa/program/ir_to_mesa.cpp | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mes

[Mesa-dev] [PATCH 5/9] glsl: explicitly zero out padding to gl_shader_variable bitfield

2017-06-26 Thread Nicolai Hähnle
From: Nicolai Hähnle Otherwise, the padding bits remain undefined, which leads to valgrind errors when storing the gl_shader_variable in the disk cache. --- src/compiler/glsl/linker.cpp | 1 + src/mesa/main/mtypes.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/compiler/glsl/l

[Mesa-dev] [PATCH 3/9] glsl: look for multiple variables simultaneously with find_assignment_visitor

2017-06-26 Thread Nicolai Hähnle
From: Nicolai Hähnle Save some passes over the IR. --- src/compiler/glsl/linker.cpp | 88 +--- 1 file changed, 50 insertions(+), 38 deletions(-) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 5366200..cfda263 100644 --- a/s

[Mesa-dev] [PATCH 0/9] glsl&co: misc cleanups and improvements

2017-06-26 Thread Nicolai Hähnle
Hi all, This is a bit of a random collection of small patches. What ties them together is that they're all vaguely related to the glsl code, and that they accumulated while I was working on ARB_gl_spirv. They do make sense individually though. I see no regressions here with assertions enabled o

[Mesa-dev] [PATCH 1/9] glsl: always print non-zero var->data.location_frac

2017-06-26 Thread Nicolai Hähnle
From: Nicolai Hähnle This is helpful in debugging varying assignments. --- src/compiler/glsl/ir_print_visitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/glsl/ir_print_visitor.cpp b/src/compiler/glsl/ir_print_visitor.cpp index ba3c1e2..86ddea6 100644 ---

[Mesa-dev] [PATCH 8/9] mesa: remove unused parameter/member of add_uniform_to_shader

2017-06-26 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/mesa/program/ir_to_mesa.cpp | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 3ed5bed..ac12b59 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to

[Mesa-dev] [PATCH 2/9] glsl: simplify disable_varying_optimizations_for_sso

2017-06-26 Thread Nicolai Hähnle
From: Nicolai Hähnle We always have stage == first and stage == last when first == last, so drop the special case. Also rephrase the comment to make the logic clearer. --- src/compiler/glsl/linker.cpp | 29 +++-- 1 file changed, 11 insertions(+), 18 deletions(-) diff --g

[Mesa-dev] [PATCH 9/9] st/mesa: remove an obsolete comment

2017-06-26 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/mesa/state_tracker/st_program.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h index 57673e9..3f0cf49 100644 --- a/src/mesa/state_tracker/st_program.h +++ b/src/mesa/state_tracker/st_progr

[Mesa-dev] [PATCH 7/9] util/disk_cache: fix a comment

2017-06-26 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/util/disk_cache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/disk_cache.h b/src/util/disk_cache.h index 72f4463..9aade16 100644 --- a/src/util/disk_cache.h +++ b/src/util/disk_cache.h @@ -136,21 +136,21 @@ disk_cache_put(struct disk_

[Mesa-dev] [PATCH 6/9] glsl/blob: add valgrind checks that written data is defined

2017-06-26 Thread Nicolai Hähnle
From: Nicolai Hähnle Undefined data will eventually trigger a valgrind error while computing its CRC32 while writing it into the disk cache, but at that point, it is basically impossible to track down where the undefined data came from. With this change, finding the origin of undefined data beco

Re: [Mesa-dev] [PATCH 1/2] spirv: Fix reaching unreachable for compare exchange on images

2017-06-26 Thread James Legg
On Fri, 2017-06-23 at 11:29 -0700, Jason Ekstrand wrote: > OpAtomicCompareExchangeWeak is only available in OpenCL, not Vulkan.  > As such, we probably don't want to handle it yet as no one uses > spirv_to_nir for OpenCL.  The assert on AtomicCompareExchange is, > however, a bug we should fix now.

[Mesa-dev] [PATCH v3 1/3] spirv: Fix reaching unreachable for compare exchange on images

2017-06-26 Thread James Legg
We were hitting the unreachable("Invalid image opcode") near the end of vtn_handle_image when parsing the SpvOpAtomicCompareExchange opcode. v2: Add stable CC. v3: Ignore SpvOpAtomicCompareExchangeWeak. It requires the Kernel capability which is not exposed in Vulkan, and spirv_to_nir is n

Re: [Mesa-dev] [PATCH 2/2] mesa: optimize GL_PRIMITIVE_RESTART_NV more

2017-06-26 Thread Nicolai Hähnle
Both patches: Reviewed-by: Nicolai Hähnle On 26.06.2017 02:49, Marek Olšák wrote: From: Marek Olšák And other client state changes don't have to call update_derived_primitive_restart_state. --- src/mesa/main/enable.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions

Re: [Mesa-dev] [PATCH 1/5] mesa: make _mesa_copy_texture_sub_image() static

2017-06-26 Thread Samuel Pitoiset
For the series: Reviewed-by: Samuel Pitoiset On 06/26/2017 04:38 AM, Timothy Arceri wrote: --- src/mesa/main/teximage.c | 175 +++ src/mesa/main/teximage.h | 9 --- 2 files changed, 85 insertions(+), 99 deletions(-) diff --git a/src/mesa/main/

Re: [Mesa-dev] [PATCH 12/17] mesa/st: make sure the const buffer is large enough for packed uniforms

2017-06-26 Thread Timothy Arceri
On 26/06/17 19:27, Nicolai Hähnle wrote: On 25.06.2017 03:31, Timothy Arceri wrote: --- src/mesa/state_tracker/st_atom_constbuf.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c

[Mesa-dev] [Bug 91724] GL/gl_mangle.h misses symbols from GLES/gl.h

2017-06-26 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91724 --- Comment #9 from Frederic Devernay --- > - Using/setting GL_GLEXT_PROTOTYPES is a _very_ bad idea. Agreed. This patch *fixes* glext.h, but I do not use it anywhere. It is fixed just in case someone crazy enough wants to use it. More importan

Re: [Mesa-dev] [PATCH 12/17] mesa/st: make sure the const buffer is large enough for packed uniforms

2017-06-26 Thread Nicolai Hähnle
On 26.06.2017 11:56, Timothy Arceri wrote: On 26/06/17 19:27, Nicolai Hähnle wrote: On 25.06.2017 03:31, Timothy Arceri wrote: --- src/mesa/state_tracker/st_atom_constbuf.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_atom_constbuf.c

[Mesa-dev] [Bug 91724] GL/gl_mangle.h misses symbols from GLES/gl.h

2017-06-26 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91724 --- Comment #10 from Frederic Devernay --- Created attachment 132249 --> https://bugs.freedesktop.org/attachment.cgi?id=132249&action=edit patch file for glmangle.h Here's the patch for mesa 17.1.3. Note that in the #define section, some funct

Re: [Mesa-dev] [PATCH] i965: skip varyings without slot

2017-06-26 Thread Juan A. Suarez Romero
On Fri, 2017-06-16 at 10:12 +0200, Juan A. Suarez Romero wrote: > Commit 00620782c9 (i965: use nir_shader_gather_info() over > do_set_program_inouts()) changed how we compute the outputs written. > > In the previous version it was using the IR declared outputs, while in > the new one it uses NIR t

Re: [Mesa-dev] [PATCH 5/9] glsl: explicitly zero out padding to gl_shader_variable bitfield

2017-06-26 Thread Timothy Arceri
On 26/06/17 19:40, Nicolai Hähnle wrote: From: Nicolai Hähnle Otherwise, the padding bits remain undefined, which leads to valgrind errors when storing the gl_shader_variable in the disk cache. --- src/compiler/glsl/linker.cpp | 1 + src/mesa/main/mtypes.h | 2 ++ 2 files changed, 3

Re: [Mesa-dev] [PATCH v2 3/3] nir: implement GLSL.std.450 NMax, NMIn and NClamp operations

2017-06-26 Thread Juan A. Suarez Romero
On Tue, 2017-06-13 at 11:14 +0200, Juan A. Suarez Romero wrote: > v2: NIR fmax/fmin already handles NaN (Connor). > --- Implemented the functions using fmax/fmin. Could you review it? Thank you! J.A. > src/compiler/spirv/vtn_glsl450.c | 3 +++ > 1 file changed, 3 insertions(+) > > di

Re: [Mesa-dev] [PATCH 3/9] glsl: look for multiple variables simultaneously with find_assignment_visitor

2017-06-26 Thread Timothy Arceri
On 26/06/17 19:40, Nicolai Hähnle wrote: From: Nicolai Hähnle Save some passes over the IR. --- src/compiler/glsl/linker.cpp | 88 +--- 1 file changed, 50 insertions(+), 38 deletions(-) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/li

[Mesa-dev] [PATCH] etnaviv: only flush resource to self if no scanout buffer exists

2017-06-26 Thread Lucas Stach
Currently a resource flush may trigger a self resolve, even if a scanout buffer exists, but is up to date. If a scanout buffer exists we only ever want to flush the resource to the scanout buffer. This fixes a performance regression. Fixes: dda956340ce9 (etnaviv: resolve tile status when flushing

Re: [Mesa-dev] [PATCH 12/17] mesa/st: make sure the const buffer is large enough for packed uniforms

2017-06-26 Thread Timothy Arceri
On 26/06/17 20:06, Nicolai Hähnle wrote: On 26.06.2017 11:56, Timothy Arceri wrote: On 26/06/17 19:27, Nicolai Hähnle wrote: On 25.06.2017 03:31, Timothy Arceri wrote: --- src/mesa/state_tracker/st_atom_constbuf.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/

Re: [Mesa-dev] [PATCH 3/9] glsl: look for multiple variables simultaneously with find_assignment_visitor

2017-06-26 Thread Nicolai Hähnle
On 26.06.2017 12:18, Timothy Arceri wrote: On 26/06/17 19:40, Nicolai Hähnle wrote: From: Nicolai Hähnle Save some passes over the IR. --- src/compiler/glsl/linker.cpp | 88 +--- 1 file changed, 50 insertions(+), 38 deletions(-) diff --git a/src/c

Re: [Mesa-dev] [PATCH 03/11] renderonly/etnaviv: stop importing resource from renderonly

2017-06-26 Thread Philipp Zabel
On Fri, 2017-06-23 at 17:50 +0200, Lucas Stach wrote: > The current way of importing the resource from renderonly after allocation > is opaque and is taking away control from the driver, which it needs in > order to implement more advanced scenarios, than the simple linear > scanout with matching s

Re: [Mesa-dev] [PATCH 01/11] etnaviv: fill in layer_stride for imported resources

2017-06-26 Thread Philipp Zabel
On Fri, 2017-06-23 at 17:50 +0200, Lucas Stach wrote: > The layer stride information is used in various parts of the driver, > so it needs to be present regardless if the driver allocated the > buffer itself or merely imported it from an external source. > > Signed-off-by: Lucas Stach > --- > sr

Re: [Mesa-dev] [PATCH 02/11] etnaviv: fix memory leak when BO allocation fails

2017-06-26 Thread Philipp Zabel
On Fri, 2017-06-23 at 17:50 +0200, Lucas Stach wrote: > The resource struct is already allocated at this point and should be > free properly. > > Signed-off-by: Lucas Stach > --- > src/gallium/drivers/etnaviv/etnaviv_resource.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > di

Re: [Mesa-dev] [PATCH 04/11] etnaviv: pad scanout buffer size to RS alignment

2017-06-26 Thread Philipp Zabel
On Fri, 2017-06-23 at 17:50 +0200, Lucas Stach wrote: > This fixes failures to import the scanout buffer with screen resolutions > that don't satisfy teh RS alignment restrictions, like 1680x1050. ^^^ typo > Signed-off-by: Lucas Stach > --- > src/gallium/drivers/etnaviv/etnav

Re: [Mesa-dev] [PATCH 05/11] etnaviv: increment correct seqno for external resources

2017-06-26 Thread Philipp Zabel
On Fri, 2017-06-23 at 17:50 +0200, Lucas Stach wrote: > If we import a dma-buf with a sampler/pixel pipe incompatible modifier, > the imported buffer will end up in an external resource view. As > resource_changed signals the change of the imported resource, we need > to update the external view se

Re: [Mesa-dev] [PATCH] meta: Fix BlitFramebuffer temp texture setup

2017-06-26 Thread Ville Syrjälä
On Fri, Jun 23, 2017 at 06:43:37PM -0700, Ian Romanick wrote: > On 06/23/2017 04:58 AM, ville.syrj...@linux.intel.com wrote: > > From: Ville Syrjälä > > > > Pass the correct src coordinates to CopyTexSubImage() > > when creating the temporary texture, and also take care to adjust > > flipX/Y if t

Re: [Mesa-dev] [PATCH] etnaviv: only flush resource to self if no scanout buffer exists

2017-06-26 Thread Philipp Zabel
On Mon, 2017-06-26 at 12:25 +0200, Lucas Stach wrote: > Currently a resource flush may trigger a self resolve, even if a scanout > buffer > exists, but is up to date. If a scanout buffer exists we only ever want to > flush the resource to the scanout buffer. This fixes a performance regression. >

Re: [Mesa-dev] [PATCH 03/17] mesa: rework ParameterList to allow packing

2017-06-26 Thread Timothy Arceri
On 26/06/17 19:17, Nicolai Hähnle wrote: On 25.06.2017 03:31, Timothy Arceri wrote: Currently everything is padded to 4 elements. Making the list more flexible will allow us to do uniform packing. This change requires us to remove the existing packing in _mesa_add_typed_unnamed_constant() in o

Re: [Mesa-dev] [PATCH] etnaviv: only flush resource to self if no scanout buffer exists

2017-06-26 Thread Christian Gmeiner
2017-06-26 12:25 GMT+02:00 Lucas Stach : > Currently a resource flush may trigger a self resolve, even if a scanout > buffer > exists, but is up to date. If a scanout buffer exists we only ever want to > flush the resource to the scanout buffer. This fixes a performance regression. > > Fixes: dda9

Re: [Mesa-dev] [PATCH 02/11] etnaviv: fix memory leak when BO allocation fails

2017-06-26 Thread Christian Gmeiner
2017-06-23 17:50 GMT+02:00 Lucas Stach : > The resource struct is already allocated at this point and should be > free properly. > > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner > --- > src/gallium/drivers/etnaviv/etnaviv_resource.c | 6 +- > 1 file changed, 5 insertions(+), 1

Re: [Mesa-dev] [PATCH 01/11] etnaviv: fill in layer_stride for imported resources

2017-06-26 Thread Christian Gmeiner
2017-06-23 17:50 GMT+02:00 Lucas Stach : > The layer stride information is used in various parts of the driver, > so it needs to be present regardless if the driver allocated the > buffer itself or merely imported it from an external source. > > Signed-off-by: Lucas Stach Reviewed-by: Christian G

Re: [Mesa-dev] [PATCH 1/2] mesa: fix clip plane enable breakage

2017-06-26 Thread Roland Scheidegger
This also fixes a conform mustpass failure we're seeing. Reviewed-by: Roland Scheidegger Am 26.06.2017 um 02:49 schrieb Marek Olšák: > From: Marek Olšák > > Broken by: > > commit 00173d91b70ae4dcea7c6324ee4858c498cae14b > Author: Marek Olšák > Date: Sat Jun 10 12:09:43 2017 +0200 > >

Re: [Mesa-dev] [PATCH 04/11] etnaviv: pad scanout buffer size to RS alignment

2017-06-26 Thread Christian Gmeiner
2017-06-23 17:50 GMT+02:00 Lucas Stach : > This fixes failures to import the scanout buffer with screen resolutions > that don't satisfy teh RS alignment restrictions, like 1680x1050. > > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner > --- > src/gallium/drivers/etnaviv/etnaviv_reso

Re: [Mesa-dev] [PATCH] etnaviv: only flush resource to self if no scanout buffer exists

2017-06-26 Thread Lucas Stach
Am Montag, den 26.06.2017, 13:09 +0200 schrieb Christian Gmeiner: > 2017-06-26 12:25 GMT+02:00 Lucas Stach : > > Currently a resource flush may trigger a self resolve, even if a > > scanout buffer > > exists, but is up to date. If a scanout buffer exists we only ever > > want to > > flush the resou

[Mesa-dev] [PATCH] etnaviv: fix shader miscompilation with more than 16 labels

2017-06-26 Thread Lucas Stach
The labels array may change its virtual address on a reallocation, so it is invalid to cache pointers into the array. Rather than using the pointer directly, remember the array index. Fixes miscompilation of shaders in glmark2 ideas, leading to GPU hangs. Signed-off-by: Lucas Stach --- src/gall

Re: [Mesa-dev] [PATCH] etnaviv: fix shader miscompilation with more than 16 labels

2017-06-26 Thread Lucas Stach
Am Montag, den 26.06.2017, 13:40 +0200 schrieb Lucas Stach: > The labels array may change its virtual address on a reallocation, so > it is invalid to cache pointers into the array. Rather than using the > pointer directly, remember the array index. > > Fixes miscompilation of shaders in glmark2 i

Re: [Mesa-dev] [PATCH] egl_dri2: swrastGetDrawableInfo: set *x, *y [v2]

2017-06-26 Thread Emil Velikov
On 22 June 2017 at 20:14, Ben Crocker wrote: > In swrastGetDrawableInfo, set *x and *y, not just *w and *h; > this fixes a crash later in drisw_update_tex_buffer when the > (formerly) uninitialized x and y values are used to construct > an address in a call to llvmpipe_transfer_map. > > Fixes cras

Re: [Mesa-dev] [PATCH 1/2] egl: drop _eglInitImage() return type

2017-06-26 Thread Emil Velikov
On 20 June 2017 at 17:05, Eric Engestrom wrote: > On Tuesday, 2017-06-20 16:04:47 +0100, Emil Velikov wrote: >> From: Emil Velikov >> >> Function cannot fail and always returns true. >> >> Signed-off-by: Emil Velikov > > Both patches are: > Reviewed-by: Eric Engestrom > >> --- >> We could even

Re: [Mesa-dev] [PATCH] etnaviv: only flush resource to self if no scanout buffer exists

2017-06-26 Thread Christian Gmeiner
2017-06-26 13:30 GMT+02:00 Lucas Stach : > Am Montag, den 26.06.2017, 13:09 +0200 schrieb Christian Gmeiner: >> 2017-06-26 12:25 GMT+02:00 Lucas Stach : >> > Currently a resource flush may trigger a self resolve, even if a >> > scanout buffer >> > exists, but is up to date. If a scanout buffer exis

Re: [Mesa-dev] [PATCH v5 1/6] mesa/st: glsl_to_tgsi move some helper classes to extra files

2017-06-26 Thread Nicolai Hähnle
On 25.06.2017 09:22, Gert Wollny wrote: To prepare the implementation of a temp register lifetime tracker some of the classes are moved into seperate header/implementation files to make them accessible from other files. Specifically these are: class st_src_reg; class st_dst_reg;

Re: [Mesa-dev] [PATCH 08/11] etnaviv: fold etna_screen_bo_get_handle into etna_resource_get_handle

2017-06-26 Thread Christian Gmeiner
2017-06-23 17:50 GMT+02:00 Lucas Stach : > There is no point in keeping this indirection. Makes the code easier to > follow. > > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner > --- > src/gallium/drivers/etnaviv/etnaviv_resource.c | 14 -- > src/gallium/drivers/etnaviv/e

[Mesa-dev] [Bug 77449] Tracker bug for all bugs related to Steam titles

2017-06-26 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=77449 Bug 77449 depends on bug 98238, which changed state. Bug 98238 Summary: Witcher 2: objects are black when changing lod on Radeon Pitcairn https://bugs.freedesktop.org/show_bug.cgi?id=98238 What|Removed |Added -

Re: [Mesa-dev] [PATCH] etnaviv: fix shader miscompilation with more than 16 labels

2017-06-26 Thread Christian Gmeiner
2017-06-26 13:40 GMT+02:00 Lucas Stach : > The labels array may change its virtual address on a reallocation, so > it is invalid to cache pointers into the array. Rather than using the > pointer directly, remember the array index. > > Fixes miscompilation of shaders in glmark2 ideas, leading to GPU

Re: [Mesa-dev] [PATCH] etnaviv: fix shader miscompilation with more than 16 labels

2017-06-26 Thread Christian Gmeiner
2017-06-26 13:44 GMT+02:00 Lucas Stach : > Am Montag, den 26.06.2017, 13:40 +0200 schrieb Lucas Stach: >> The labels array may change its virtual address on a reallocation, so >> it is invalid to cache pointers into the array. Rather than using the >> pointer directly, remember the array index. >>

Re: [Mesa-dev] [PATCH 0/8] swr: update rasterizer

2017-06-26 Thread Emil Velikov
Hi Tim, On 22 June 2017 at 22:12, Tim Rowley wrote: > Highlights include splitting the heavily templated files into multiple > chunks to speed compile (2x for a large machine), and switching the > simd intrinsic usage from a macro-based header to a more c++ feeling > library. > Yay \o/. Out of cu

Re: [Mesa-dev] [PATCH v5 2/6] mesa/st: glsl_to_tgsi: implement new temporary register lifetime tracker

2017-06-26 Thread Nicolai Hähnle
Thanks for the update. First off, you're still not tracking individual components, but that's absolute necessary. Think: BGNLOOP MOV TEMP[1].x, ... UIF ... MOV TEMP[1].y, ... ENDIF use TEMP[1].y ENDLOOP Now for a scan through the patch: On 25.06.2017 09:22, Gert Wollny wrote: T

Re: [Mesa-dev] [PATCH 1/8] swr/rast: Split backend.cpp to improve compile time

2017-06-26 Thread Emil Velikov
Hi Tim, On 22 June 2017 at 22:13, Tim Rowley wrote: > Hardcode split to four files currently. Decreases swr build > time on a quad-core by ~10%. > --- > src/gallium/drivers/swr/Makefile.am| 26 +- > src/gallium/drivers/swr/Makefile.sources |4 + > src/gallium/dri

[Mesa-dev] [PATCH mesa 1/2] radv: use Mesa's u_atomic.h header

2017-06-26 Thread Eric Engestrom
Signed-off-by: Eric Engestrom --- src/amd/vulkan/radv_pipeline.c | 3 ++- src/amd/vulkan/radv_pipeline_cache.c | 7 --- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 0c262799f0..efe641dc0b 100644 ---

[Mesa-dev] [PATCH mesa 2/2] anv: use Mesa's u_atomic.h header

2017-06-26 Thread Eric Engestrom
Signed-off-by: Eric Engestrom --- src/intel/vulkan/anv_private.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index e5d88f2815..8079378ae6 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan

Re: [Mesa-dev] [PATCH 3/8] swr/rast: Split rasterizer.cpp to improve compile times

2017-06-26 Thread Emil Velikov
On 22 June 2017 at 22:13, Tim Rowley wrote: > Hardcode split to four files currently. Decreases swr build > time on KNL by over 50%. Out of curiosity what is KNL? Also, over 50% decrease - time to pop the champagne ;-) > --- > src/gallium/drivers/swr/Makefile.am| 36 +- > src

Re: [Mesa-dev] [PATCH 5/8] swr/rast: Switch intrinsic usage to SIMDLib

2017-06-26 Thread Emil Velikov
Hi Tim, On 22 June 2017 at 22:13, Tim Rowley wrote: > Switch from a macro-based simd intrinsics layer to a more C++ > implementation, which also adds AVX512 optimizations to 128-bit > and 256-bit SIMD. > + rasterizer/common/simdlib_128_avx.inl \ > + rasterizer/common/simdlib_128_avx2

Re: [Mesa-dev] [PATCH] mesa/marshal: add custom marshalling forglNamedBuffer(Sub)Data

2017-06-26 Thread Marc Dietrich
Hi, Am Montag, 26. Juni 2017, 01:17:23 CEST schrieb Timothy Arceri: > On 25/06/17 18:31, Grigori Goronzy wrote: > > On 2017-06-25 02:37, Timothy Arceri wrote: > >> Please try the series from Marek which reduces the batch size [1], the > >> reduced size helps reduce the impact of syncs. MARSHAL_MAX

Re: [Mesa-dev] [PATCH v5 3/6] mesa/st: glsl_to_tgsi: add tests for the new temporary lifetime tracker

2017-06-26 Thread Nicolai Hähnle
On 25.06.2017 09:22, Gert Wollny wrote: This patch adds a set of unit tests for the new lifetime tracker. --- configure.ac | 1 + src/mesa/Makefile.am | 2 +- src/mesa/state_tracker/tests/Makefile.am | 36 + .

Re: [Mesa-dev] [PATCH v5 0/6] mesa/st: glsl_to_tgsi: improved temp-reg lifetime estimation

2017-06-26 Thread Nicolai Hähnle
Thanks for the update. Do you have the series on an accessible git repository somewhere? E.g. on GitHub or Gitlab or wherever? That would be helpful. Also, please don't continue to chain this thread for subsequent versions. It's okay to do this for quick follow-up fixes to patches you sent, b

Re: [Mesa-dev] [RFC mesa] travis: add couple missing proto+lib

2017-06-26 Thread Emil Velikov
On 22 June 2017 at 19:13, Eric Engestrom wrote: > On Thursday, 2017-06-22 16:47:29 +0100, Emil Velikov wrote: >> On 22 June 2017 at 00:29, Eric Engestrom wrote: >> >> configure: error: Package requirements (x11 xext xdamage >= 1.1 xfixes >> >> x11-xcb xcb xcb-glx >= 1.8.1 xcb-dri2 >= 1.8) were no

Re: [Mesa-dev] [PATCH 3/9] glsl: look for multiple variables simultaneously with find_assignment_visitor

2017-06-26 Thread Timothy Arceri
On 26/06/17 20:28, Nicolai Hähnle wrote: On 26.06.2017 12:18, Timothy Arceri wrote: On 26/06/17 19:40, Nicolai Hähnle wrote: From: Nicolai Hähnle Save some passes over the IR. --- src/compiler/glsl/linker.cpp | 88 +--- 1 file changed, 50 inserti

Re: [Mesa-dev] [PATCH mesa v2] travis: add missing libs: xdamage + xfixes

2017-06-26 Thread Emil Velikov
On 22 June 2017 at 19:14, Eric Engestrom wrote: > From: Eric Engestrom > >> configure: error: Package requirements (x11 xext xdamage >= 1.1 xfixes >> x11-xcb xcb xcb-glx >= 1.8.1 xcb-dri2 >= 1.8) were not met: >> No package 'xdamage' found >> No package 'xfixes' found > > Signed-off-by: Eric Enge

Re: [Mesa-dev] [Mesa-stable] [PATCH 1/3] amd/common: fix off-by-one in sid_tables.py

2017-06-26 Thread Emil Velikov
On 23 June 2017 at 00:07, Andres Gomez wrote: > On Mon, 2017-06-19 at 12:36 +0100, Emil Velikov wrote: >> Hi Nicolai, >> >> On 12 June 2017 at 20:33, Nicolai Hähnle wrote: >> > From: Nicolai Hähnle >> > >> > The very last entry in the sid_strings_offsets table ended up missing, >> > leading to o

Re: [Mesa-dev] [PATCH v5 4/6] mesa/st: glsl_to_tgsi: add register renamame mapping evaluator

2017-06-26 Thread Nicolai Hähnle
On 25.06.2017 09:22, Gert Wollny wrote: The remapping evaluator first sorts the temporary registers ascending based on their first life time instruction, and then uses a binary search to find merge canidates. For the initial sorting it uses std::sort because qsort is quite slow in comparison. By

Re: [Mesa-dev] [PATCH v5 5/6] mesa/st: glsl_to_tgsi: Add test set for evaluation of rename mapping

2017-06-26 Thread Nicolai Hähnle
On 25.06.2017 09:22, Gert Wollny wrote: The patch adds tests for the register rename mapping evaluation. --- .../tests/test_glsl_to_tgsi_lifetime.cpp | 94 ++ 1 file changed, 94 insertions(+) diff --git a/src/mesa/state_tracker/tests/test_glsl_to_tgsi_lifetime.cp

Re: [Mesa-dev] [PATCH v5 6/6] mesa/st: glsl_to_tgsi: tie in new temporary register merge approach

2017-06-26 Thread Nicolai Hähnle
On 25.06.2017 09:22, Gert Wollny wrote: This patch ties in the new temporary register lifetime estiamtion and Tpyo: estimation rename mapping evaluation. In order to enable it, the evironment variable MESA_GLSL_TO_TGSI_NEW_MERGE must be set. This make sense during development, but I'd say

Re: [Mesa-dev] [PATCH 10/11] etnaviv: implement resource creation with modifier

2017-06-26 Thread Emil Velikov
Hi Lucas, On 23 June 2017 at 16:50, Lucas Stach wrote: > +const uint64_t priority_to_modifier[] = { I think you can make this static. [snip] > res->texture = > -etna_resource_alloc(pctx->screen, ETNA_LAYOUT_TILED, &templat); > +etna_resource_alloc(pctx->screen,

Re: [Mesa-dev] [Mesa-stable] [PATCH 1/3] amd/common: fix off-by-one in sid_tables.py

2017-06-26 Thread Nicolai Hähnle
On 26.06.2017 15:23, Emil Velikov wrote: On 23 June 2017 at 00:07, Andres Gomez wrote: On Mon, 2017-06-19 at 12:36 +0100, Emil Velikov wrote: Hi Nicolai, On 12 June 2017 at 20:33, Nicolai Hähnle wrote: From: Nicolai Hähnle The very last entry in the sid_strings_offsets table ended up miss

Re: [Mesa-dev] [PATCH] mesa/marshal: add custom marshalling forglNamedBuffer(Sub)Data

2017-06-26 Thread Grigori Goronzy
On 2017-06-26 15:11, Marc Dietrich wrote: unfortunately, this change broke vmware/vmplayer here (bisected). Windows guest on linux host. Sig 11 in SVGA driver. All good if mesa_glthread=false. Can you provide instructions how to reproduce this problem? A backtrace might help, too. I don

Re: [Mesa-dev] [PATCH] mesa/marshal: add custom marshallingforglNamedBuffer(Sub)Data

2017-06-26 Thread Marc Dietrich
Am Montag, 26. Juni 2017, 15:35:15 CEST schrieb Grigori Goronzy: > On 2017-06-26 15:11, Marc Dietrich wrote: > > unfortunately, this change broke vmware/vmplayer here (bisected). > > Windows > > guest on linux host. Sig 11 in SVGA driver. All good if > > mesa_glthread=false. > > Can you provide in

Re: [Mesa-dev] [PATCH 2/3 v2] r600g: take into account offset to system inputs at tgsi_interp_egcm()

2017-06-26 Thread Emil Velikov
Hi Constantine, Thanks for giving r600 some much needed love. While the patch has landed, just going to share some generic comments. Most of which are documented here https://www.mesa3d.org/submittingpatches.html. On 24 June 2017 at 15:06, Constantine Kharlamov wrote: > Fixes: https://bugs.free

[Mesa-dev] [PATCH] swr/rast: adjust std::string usage to fix build

2017-06-26 Thread Tim Rowley
Some combinations of c++ compilers and standard libraries had problems with the string::replace code we were using previously. This should fix the travis-ci system. --- .../drivers/swr/rasterizer/codegen/templates/gen_knobs.cpp | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-)

[Mesa-dev] [PATCH] radeon/vcn: enable h264 decode entension support

2017-06-26 Thread Leo Liu
It's enabled through message buffer for UVD Signed-off-by: Leo Liu --- src/gallium/drivers/radeon/radeon_vcn_dec.c | 1 + src/gallium/drivers/radeon/radeon_vcn_dec.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/gallium/drivers/radeon/radeon_vcn_dec.c b/src/gallium/drivers/radeon/r

Re: [Mesa-dev] [PATCH 06/11] etnaviv: also update textures from external resources

2017-06-26 Thread Philipp Zabel
On Fri, 2017-06-23 at 17:50 +0200, Lucas Stach wrote: > This reworks the logic in etna_update_sampler_source to select the > newest resource view for updating the texture view. This should make > the logic easier to follow and fixes texture updates from imported > dma-bufs. > > Signed-off-by: Luca

[Mesa-dev] [PATCH 06/92] nir/lower_system_values: add support for the FRAG_COORD system value

2017-06-26 Thread Nicolai Hähnle
From: Nicolai Hähnle Arguably this could convert to a load intrinsic, but other code paths already expect this as a fragment shader input. --- src/compiler/nir/nir_lower_system_values.c | 36 ++ 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/src/compil

[Mesa-dev] [PATCH 02/92] glsl_to_nir: zero-initialize var->data.descriptor_set

2017-06-26 Thread Nicolai Hähnle
From: Nicolai Hähnle This is convenient for backends that support both Vulkan and OpenGL while lowering samplers to derefs with nir_lower_samplers_as_deref. --- src/compiler/glsl/glsl_to_nir.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler

[Mesa-dev] [PATCH 01/92] glsl: add glsl_base_type_is_integer

2017-06-26 Thread Nicolai Hähnle
From: Nicolai Hähnle We will use this from radeonsi/nir, which we want to keep as pure C code. --- src/compiler/glsl_types.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/compiler/glsl_types.h b/src/compiler/glsl_types.h index 55faac2..2857dc9 100644 --- a/src/compiler/gls

[Mesa-dev] [PATCH 05/92] nir: fix nir_lower_wpos_ytransform when gl_FragCoord is a system value

2017-06-26 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/compiler/nir/nir_lower_wpos_ytransform.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir_lower_wpos_ytransform.c b/src/compiler/nir/nir_lower_wpos_ytransform.c index 873d259..771c6ff 100644 --- a/src/compiler/nir/nir_lo

[Mesa-dev] [PATCH 07/92] nir: add nir_lower_samplers_as_deref pass

2017-06-26 Thread Nicolai Hähnle
From: Nicolai Hähnle This pass is a replacement for the nir_lower_samplers pass, which has the advantage of keeping sampler references as derefs. This allows a unified treatment of texture instructions and image intrinsics in the backend. --- src/compiler/Makefile.sources | 1

[Mesa-dev] [PATCH 00/92] Experimental NIR backend for radeonsi

2017-06-26 Thread Nicolai Hähnle
Hi all, A few weeks ago I mentioned that I was looking into support of GL_ARB_gl_spirv. Based on that feedback, I continued an approach where Mesa translates SPIR-V to NIR during shader specialization, and hands off the lowered NIR to the driver. This makes it easier for a lot of the program resou

[Mesa-dev] [PATCH 03/92] nir: add NIR_PRINT environment variable

2017-06-26 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/compiler/nir/nir.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index ab7ba14..d1b90cb 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -2301,47 +2301,66 @@ void nir_metada

[Mesa-dev] [PATCH 08/92] nir: add nir_lower_uniforms_to_ubo pass

2017-06-26 Thread Nicolai Hähnle
From: Nicolai Hähnle This is an alternative lowering of default-block uniforms that doesn't use uniform load intrinsics. Instead, it translates the loads to UBO loads, allowing a simpler backend. --- src/compiler/Makefile.sources| 1 + src/compiler/nir/nir.h

[Mesa-dev] [PATCH 15/92] ddebug: add pipe_screen::get_struct_param

2017-06-26 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/gallium/drivers/ddebug/dd_screen.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/gallium/drivers/ddebug/dd_screen.c b/src/gallium/drivers/ddebug/dd_screen.c index a5d2be1..3f6368c 100644 --- a/src/gallium/drivers/ddebug/dd_screen.c +++ b/src/ga

[Mesa-dev] [PATCH 19/92] st/glsl_to_nir: fix the case where NIR clone testing is enabled

2017-06-26 Thread Nicolai Hähnle
From: Nicolai Hähnle In that case, prog->nir must be assigned at the end. --- src/mesa/state_tracker/st_glsl_to_nir.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index 524eefa..0a86

[Mesa-dev] [PATCH 04/92] nir: add nir_instr_rewrite_deref

2017-06-26 Thread Nicolai Hähnle
From: Nicolai Hähnle Allows modifying a texture instruction's texture and sampler derefs. --- src/compiler/nir/nir.c | 13 + src/compiler/nir/nir.h | 2 ++ 2 files changed, 15 insertions(+) diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 491b908..f81f4ee 100644 -

[Mesa-dev] [PATCH 14/92] gallium: add PIPE_STRUCT_CAP_NIR_LOWER_TEX_OPTIONS

2017-06-26 Thread Nicolai Hähnle
From: Nicolai Hähnle Allow the driver to configure the state tracker's nir_lower_tex pass when using NIR. --- src/gallium/docs/source/screen.rst | 20 src/gallium/drivers/freedreno/freedreno_screen.c | 14 ++ src/gallium/drivers/vc4/vc4_screen.c

[Mesa-dev] [PATCH 20/92] st/glsl_to_nir: fix edgeflag passthrough

2017-06-26 Thread Nicolai Hähnle
From: Nicolai Hähnle We have to mark the additional shader input as used, otherwise it will be eliminated, and we have to setup its index correctly. This is a bit of a hack, but so is everything surrounding edgeflag passthrough. --- src/mesa/state_tracker/st_glsl_to_nir.cpp | 3 +++ src/mesa/st

  1   2   3   >