Re: [Mesa-dev] [PATCH] spirv: add missing switch case in vtn_handle_texture()

2016-05-18 Thread Eduardo Lima Mitev
Oh, I sent a similar patch earlier yersterday: https://lists.freedesktop.org/archives/mesa-dev/2016-May/117119.html FWIW, there is another instance of this warning in freedreno/ir3. Eduardo On 05/18/2016 04:36 AM, Jason Ekstrand wrote: > > > On Tue, May 17, 2016 at 6:30 PM, Brian Paul

Re: [Mesa-dev] [PATCH 3/3] nir: Add interp_var_at_offset flipping.

2016-05-18 Thread Kenneth Graunke
On Tuesday, May 17, 2016 11:34:00 PM PDT Kenneth Graunke wrote: > --- > src/compiler/nir/nir_lower_wpos_ytransform.c | 21 + > 1 file changed, 21 insertions(+) > > diff --git a/src/compiler/nir/nir_lower_wpos_ytransform.c b/src/compiler/ nir/nir_lower_wpos_ytransform.c > index

Re: [Mesa-dev] [PATCH] egl: Add OpenGL_ES to API string regardless of GLES version

2016-05-18 Thread Daniel Stone
Hi, On 18 May 2016 at 00:00, Ian Romanick wrote: > On 05/17/2016 09:59 AM, Ben Widawsky wrote: >> I think you misstated this. It's not invalid to have any other value. It's >> invalid to not have one of the 3 values, which I suppose is technically >> possible >> if you say support ES2, but not E

Re: [Mesa-dev] [PATCH] egl: Add OpenGL_ES to API string regardless of GLES version

2016-05-18 Thread Erik Faye-Lund
On Wed, May 18, 2016 at 10:12 AM, Daniel Stone wrote: > Hi, > > On 18 May 2016 at 00:00, Ian Romanick wrote: >> On 05/17/2016 09:59 AM, Ben Widawsky wrote: >>> I think you misstated this. It's not invalid to have any other value. It's >>> invalid to not have one of the 3 values, which I suppose i

[Mesa-dev] [Bug 95456] glXGetFBConfigs has invalid screen bounds

2016-05-18 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=95456 Stefan Dirsch changed: What|Removed |Added Attachment #123829|application/mbox|text/plain mime type|

Re: [Mesa-dev] [PATCH 08/13] winsys/amdgpu: start with smaller IBs, growing as necessary

2016-05-18 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Tue, May 17, 2016 at 10:42 PM, Nicolai Hähnle wrote: > From: Nicolai Hähnle > > This avoids allocating giant IBs from the outset, especially for CE and DMA. > > Since we now limit max_dw only by the size that the buffer happens to be > (which, due to the buffe

Re: [Mesa-dev] [PATCH 8/8] glsl/linker: Ensure the first stage of an SSO pipeline has input locs assigned

2016-05-18 Thread Timothy Arceri
On Tue, 2016-05-17 at 20:24 -0700, Ian Romanick wrote: > On 05/17/2016 04:40 PM, Timothy Arceri wrote: > > > > On Tue, 2016-05-17 at 15:11 -0700, Ian Romanick wrote: > > > > > > From: Ian Romanick > > > > > > Previously an SSO pipeline containing only a tessellation control > > > shader > > > a

Re: [Mesa-dev] [PATCH 8/8] glsl/linker: Ensure the first stage of an SSO pipeline has input locs assigned

2016-05-18 Thread Timothy Arceri
On Wed, 2016-05-18 at 20:44 +1000, Timothy Arceri wrote: > On Tue, 2016-05-17 at 20:24 -0700, Ian Romanick wrote: > > > > On 05/17/2016 04:40 PM, Timothy Arceri wrote: > > > > > > > > > On Tue, 2016-05-17 at 15:11 -0700, Ian Romanick wrote: > > > > > > > > > > > > From: Ian Romanick > > > >

Re: [Mesa-dev] [PATCH] egl: Add OpenGL_ES to API string regardless of GLES version

2016-05-18 Thread Emil Velikov
On 18 May 2016 at 09:27, Erik Faye-Lund wrote: > On Wed, May 18, 2016 at 10:12 AM, Daniel Stone wrote: >> Hi, >> >> On 18 May 2016 at 00:00, Ian Romanick wrote: >>> On 05/17/2016 09:59 AM, Ben Widawsky wrote: I think you misstated this. It's not invalid to have any other value. It's in

Re: [Mesa-dev] [PATCH] egl: Add OpenGL_ES to API string regardless of GLES version

2016-05-18 Thread Erik Faye-Lund
On Wed, May 18, 2016 at 1:01 PM, Emil Velikov wrote: > On 18 May 2016 at 09:27, Erik Faye-Lund wrote: >> On Wed, May 18, 2016 at 10:12 AM, Daniel Stone wrote: >>> Hi, >>> >>> On 18 May 2016 at 00:00, Ian Romanick wrote: On 05/17/2016 09:59 AM, Ben Widawsky wrote: > I think you misstate

Re: [Mesa-dev] [PATCH 2/2] egl: Check if API is supported when using eglBindAPI.

2016-05-18 Thread Emil Velikov
Hi Plamena, On 17 May 2016 at 17:35, Plamena Manolova wrote: > According to the EGL specifications before binding an API > we must check whether it's supported first. If not eglBindAPI > should return EGL_FALSE and generate a EGL_BAD_PARAMETER error. > > Signed-off-by: Plamena Manolova > --- >

Re: [Mesa-dev] [PATCH 08/18] swr: [rasterizer common] gcc/clang cleanup

2016-05-18 Thread Emil Velikov
On 17 May 2016 at 16:23, Rowley, Timothy O wrote: > It seems to me that we shouldn’t be redefining offsetof at all, but rather > including the appropriate header (cstddef) to make the definition available. > I’m removing this change and including that in swr’s os.h. New title will > read some

[Mesa-dev] [PATCH v3] glsl/linker: dvec3/dvec4 consume twice input vertex attributes

2016-05-18 Thread Juan A. Suarez Romero
From the GL 4.5 core spec, section 11.1.1 (Vertex Attributes): "A program with more than the value of MAX_VERTEX_ATTRIBS active attribute variables may fail to link, unless device-dependent optimizations are able to make the program fit within available hardware resources. For the purposes of this

Re: [Mesa-dev] [PATCH 12/18] swr: [rasterizer common] OSX cleanups

2016-05-18 Thread Emil Velikov
On 17 May 2016 at 17:56, Rowley, Timothy O wrote: > >> On May 17, 2016, at 5:56 AM, Emil Velikov wrote: >> Afaics, things were designed around the premise that one should be >> Windows/MSVC (?) compatible, correct ? >> >> In many places you're using the native types and hopefully soon you >> can

Re: [Mesa-dev] [PATCH v2] swr: fix swr linkage so that static llvm works

2016-05-18 Thread Emil Velikov
On 17 May 2016 at 23:36, Tim Rowley wrote: > --- > src/gallium/drivers/swr/Makefile.am | 17 - > 1 file changed, 16 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/drivers/swr/Makefile.am > b/src/gallium/drivers/swr/Makefile.am > index 6915aae..72d0ac4 100644 > --- a/sr

[Mesa-dev] [Bug 95456] glXGetFBConfigs has invalid screen bounds

2016-05-18 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=95456 Stefan Dirsch changed: What|Removed |Added CC||sndir...@suse.de -- You are receiving t

[Mesa-dev] [Bug 95456] glXGetFBConfigs has invalid screen bounds

2016-05-18 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=95456 --- Comment #1 from Stefan Dirsch --- (In reply to Jiri Slaby from comment #0) > Created attachment 123829 [details] [review] > patch > > This is bad: > if (priv && (priv->screens != NULL) >&& (screen >= 0) && (screen <= ScreenCount(

Re: [Mesa-dev] [PATCH v3] glsl/linker: dvec3/dvec4 consume twice input vertex attributes

2016-05-18 Thread Juan A. Suarez Romero
On Wed, 2016-05-18 at 13:30 +0200, Michael Schellenberger Costa wrote: > Would you mind citing the spec section from the commit message here > (only reference not the text)? Sure. J.A. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org h

Re: [Mesa-dev] [PATCH 8/8] glsl/linker: Ensure the first stage of an SSO pipeline has input locs assigned

2016-05-18 Thread Timothy Arceri
On Wed, 2016-05-18 at 20:59 +1000, Timothy Arceri wrote: > On Wed, 2016-05-18 at 20:44 +1000, Timothy Arceri wrote: > > > > On Tue, 2016-05-17 at 20:24 -0700, Ian Romanick wrote: > > > > > > > > > On 05/17/2016 04:40 PM, Timothy Arceri wrote: > > > > > > > > > > > > > > > > On Tue, 2016-05-17

[Mesa-dev] [PATCH v4] glsl/linker: dvec3/dvec4 consume twice input vertex attributes

2016-05-18 Thread Juan A. Suarez Romero
From the GL 4.5 core spec, section 11.1.1 (Vertex Attributes): "A program with more than the value of MAX_VERTEX_ATTRIBS active attribute variables may fail to link, unless device-dependent optimizations are able to make the program fit within available hardware resources. For the purposes of this

[Mesa-dev] [PATCH] spirv: add switch case for nir_texop_txf_ms_mcs in vtn_handle_texture()

2016-05-18 Thread Brian Paul
Mark it as unreachable. Silences a compiler warning: spirv/spirv_to_nir.c:1397:4: warning: enumeration value 'nir_texop_txf_ms_mcs' not handled in switch [-Wswitch] switch (instr->op) { ^ --- src/compiler/spirv/spirv_to_nir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/comp

[Mesa-dev] [PATCH] radeon: fixed division by zero

2016-05-18 Thread Jakob Sinclair
In the function r600_test_dma the max_width and max_height can be set to zero. These variables are later used to do a modulo operation which can lead to unexpected behavior if they are zero. This patch corrects that by first checking if the max_width or max_height are zero and if they are it sets w

Re: [Mesa-dev] [PATCH] radeon: fixed division by zero

2016-05-18 Thread Nicolai Hähnle
On 18.05.2016 08:17, Jakob Sinclair wrote: In the function r600_test_dma the max_width and max_height can be set to zero. Thanks for looking into that. Can they really? I see max_width = MIN2(tsrc.width0, tdst.width0); max_height = MIN2(tsrc.height0, tdst.height0); and

Re: [Mesa-dev] [PATCH] spirv: add switch case for nir_texop_txf_ms_mcs in vtn_handle_texture()

2016-05-18 Thread Jason Ekstrand
R-b On May 18, 2016 5:59 AM, "Brian Paul" wrote: > Mark it as unreachable. Silences a compiler warning: > > spirv/spirv_to_nir.c:1397:4: warning: enumeration value > 'nir_texop_txf_ms_mcs' not handled in switch [-Wswitch] > switch (instr->op) { > ^ > --- > src/compiler/spirv/spirv_to_ni

Re: [Mesa-dev] Mesa 11.1.4

2016-05-18 Thread enpeng xu
Hi Emil, I just downloaded mesa-11.1.4 and found glsl_lexer.cpp was in the release source code, further more, in the file, there are some absolute path generated from flex like this: #line 1 "/home/emil/development/mesa/src/glsl/glsl_lexer.ll" #line 2 "/home/emil/development/mesa/src/glsl/glsl_lex

[Mesa-dev] [PATCH 05/14] st/mesa: move PBO vertex and geometry shader creation to st_pbo.c

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/mesa/state_tracker/st_cb_texture.c | 92 ++ src/mesa/state_tracker/st_pbo.c| 88 src/mesa/state_tracker/st_pbo.h| 6 +++ 3 files changed, 97 insertions(+), 89 deletions(-) diff --git a

[Mesa-dev] [PATCH 06/14] st/mesa: rename pbo_upload to pbo

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle At the same time, rename members that are upload-specific to say so. --- src/mesa/state_tracker/st_cb_texture.c | 40 ++--- src/mesa/state_tracker/st_context.h| 10 src/mesa/state_tracker/st_pbo.c| 46 +

[Mesa-dev] [PATCH 12/14] st/mesa: add layer_offset to PBO fragment shader

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle This will be used to select a slice of a 3D texture. --- src/mesa/state_tracker/st_pbo.c | 19 +++ src/mesa/state_tracker/st_pbo.h | 1 + 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/mesa/state_tracker/st_pbo.c b/src/mesa/state_tracker

[Mesa-dev] [PATCH 13/14] st/mesa: hook up a no-op try_pbo_readpixels

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle For better bisectability given that the order of some of the fallback tests in the blit path are rearranged. --- src/mesa/state_tracker/st_cb_readpixels.c | 57 --- 1 file changed, 37 insertions(+), 20 deletions(-) diff --git a/src/mesa/state_tra

[Mesa-dev] [PATCH 09/14] st/mesa: move shareable parts of PBO upload state and draw to st_pbo.c

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/mesa/state_tracker/st_cb_texture.c | 109 + src/mesa/state_tracker/st_pbo.c| 122 + src/mesa/state_tracker/st_pbo.h| 4 ++ 3 files changed, 129 insertions(+), 106 deletions(-) diff --git a

[Mesa-dev] [PATCH 01/14] gallium: add PIPE_BARRIER_ALL define

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/gallium/include/pipe/p_defines.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index c231022..91f933b 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p

[Mesa-dev] [PATCH 11/14] st/mesa: create PBO download fragment shaders

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/mesa/state_tracker/st_pbo.c | 83 + src/mesa/state_tracker/st_pbo.h | 3 ++ 2 files changed, 79 insertions(+), 7 deletions(-) diff --git a/src/mesa/state_tracker/st_pbo.c b/src/mesa/state_tracker/st_pbo.c index 57ff9b0..c7735

[Mesa-dev] [PATCH 08/14] st/mesa: move PBO buffer address calculation to st_pbo.c

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/mesa/state_tracker/st_cb_texture.c | 168 ++--- src/mesa/state_tracker/st_pbo.c| 113 ++ src/mesa/state_tracker/st_pbo.h| 43 + 3 files changed, 204 insertions(+), 120 deletions(-) diff --git a

[Mesa-dev] [PATCH 03/14] gallium/cso: allow saving the first fragment shader image slot

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/gallium/auxiliary/cso_cache/cso_context.c | 39 +++ src/gallium/auxiliary/cso_cache/cso_context.h | 9 +++ src/mesa/state_tracker/st_atom_image.c| 9 --- 3 files changed, 53 insertions(+), 4 deletions(-) diff --git a/src/gal

[Mesa-dev] [PATCH 00/14] st/mesa: accelerate glReadPixels PBO downloads

2016-05-18 Thread Nicolai Hähnle
Hi, this series makes the existing PBO texture upload code symmetric, adding a download path that uses shader images a no-attachment framebuffers. This should help performance by reducing stalls in several games, including GRID: Autosport (verified with an apitrace), Metro 2033 Redux, and likely o

[Mesa-dev] [PATCH 10/14] st/mesa: add PBO download enable bit and fragment shaders

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle For downloads, the fragment shader must know the source texture target, hence we may cache multiple fragment shaders. --- src/mesa/state_tracker/st_context.h | 2 ++ src/mesa/state_tracker/st_pbo.c | 14 ++ 2 files changed, 16 insertions(+) diff --git a/src

[Mesa-dev] [PATCH 04/14] st/mesa: begin moving PBO functions into their own file

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/mesa/Makefile.sources | 2 + src/mesa/state_tracker/st_cb_texture.c | 53 src/mesa/state_tracker/st_cb_texture.h | 6 --- src/mesa/state_tracker/st_context.c| 5 +- src/mesa/state_tracker/st_pbo.c| 89 +

Re: [Mesa-dev] [PATCH 2/2] egl: Check if API is supported when using eglBindAPI.

2016-05-18 Thread Ian Romanick
On 05/17/2016 09:35 AM, Plamena Manolova wrote: > According to the EGL specifications before binding an API > we must check whether it's supported first. If not eglBindAPI > should return EGL_FALSE and generate a EGL_BAD_PARAMETER error. Can you provide a spec quotation? > Signed-off-by: Plamena

[Mesa-dev] [PATCH 07/14] st/mesa: move PBO upload fs creation to st_pbo.c

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/mesa/state_tracker/st_cb_texture.c | 78 +- src/mesa/state_tracker/st_pbo.c| 76 + src/mesa/state_tracker/st_pbo.h| 3 ++ 3 files changed, 80 insertions(+), 77 deletions(-) diff --git a

[Mesa-dev] [PATCH 14/14] st/mesa: implement PBO downloads for ReadPixels

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/mesa/state_tracker/st_cb_readpixels.c | 142 +- src/mesa/state_tracker/st_pbo.c | 16 src/mesa/state_tracker/st_pbo.h | 4 + 3 files changed, 159 insertions(+), 3 deletions(-) diff --git a/src/mesa/state_tracke

[Mesa-dev] [PATCH 02/14] gallium/u_inlines: allow NULL src in util_copy_image_view

2016-05-18 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/gallium/auxiliary/util/u_inlines.h | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h index 07c058a..789f6d6 100644 --- a/src/gallium/auxiliary/util/u_i

[Mesa-dev] [RFC 0/7] nir: some coverity (hopefully) fixes

2016-05-18 Thread Rob Clark
From: Rob Clark So I went through some of the nir coverity issues this morning. For the most part, they are cases which can never happen, so it is more of quieting the warnings than fixing actual issues. (But IMHO it is good to improve the signal/noise of the results so we notice real issues.)

[Mesa-dev] [RFC 4/7] nir/array: fix empty-iterator coverity warning

2016-05-18 Thread Rob Clark
From: Rob Clark For example, at nir_lower_locals_to_regs.c:365: CID 1358911 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)7. var_deref_op: Dereferencing null pointer deref_ptr. I'm pretty sure that coverity doesn't understand the relationship between arr->data and arr->size. I think thro

[Mesa-dev] [RFC 3/7] nir: coverity unitialized pointer read

2016-05-18 Thread Rob Clark
From: Rob Clark Not sure how coverity arrives at the conclusion that we can read comp[j] unitialized (around line 204), other than not being aware that ncomp is greater than 1 so it won't underflow in the 'if (tex->is_array)' case. --- src/compiler/nir/nir_lower_tex.c | 6 ++ 1 file changed,

[Mesa-dev] [RFC 2/7] nir: coverity sign-extension fix

2016-05-18 Thread Rob Clark
From: Rob Clark Not 100% sure, but I think being an unsigned literal will help: CID 1358505 (#1 of 1): Unintended sign extension (SIGN_EXTENSION)sign_extension: Suspicious implicit sign extension: load1->def.num_components with type unsigned char (8 bits, unsigned) is promoted in load1->def.num_

[Mesa-dev] [RFC 6/7] nir/validate: fix null deref coverity warning

2016-05-18 Thread Rob Clark
From: Rob Clark CID 1265536 (#1 of 2): Explicit null dereferenced (FORWARD_NULL)6. var_deref_op: Dereferencing null pointer parent. --- src/compiler/nir/nir_validate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c index b186

[Mesa-dev] [RFC 5/7] nir: fix block iterator coverity warning

2016-05-18 Thread Rob Clark
From: Rob Clark For example, in nir_opt_dead_cf.c:140: CID 1358914 (#1 of 1): Dereference null return value (NULL_RETURNS)13. dereference: Dereferencing a null pointer block. --- src/compiler/nir/nir.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir.h b/

[Mesa-dev] [RFC 7/7] nir/validate: assume() that hashtable entry exists

2016-05-18 Thread Rob Clark
From: Rob Clark At this point, it would require a logic error in nir_validate to not have already populated this hashtable entry, but coverity doesn't realize that: CID 1265547 (#1 of 1): Dereference null return value (NULL_RETURNS)3. dereference: Dereferencing a null pointer entry. CID 1271039

[Mesa-dev] [RFC 1/7] nir/glsl_to_nir: quell some uninit_member coverity errors

2016-05-18 Thread Rob Clark
From: Rob Clark --- src/compiler/nir/glsl_to_nir.cpp | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/compiler/nir/glsl_to_nir.cpp b/src/compiler/nir/glsl_to_nir.cpp index b25f065..3b487ff 100644 --- a/src/compiler/nir/glsl_to_nir.cpp +++ b/src/compiler/nir/glsl_to_nir.cpp @@ -213,

[Mesa-dev] [PATCH 1/4] gallium/radeon: ignore PIPE_TRANSFER_MAP_DIRECTLY

2016-05-18 Thread Marek Olšák
From: Marek Olšák Only st/xa is using this, which is irrelevant to us. --- src/gallium/drivers/radeon/r600_texture.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index c89afbc..b22f

[Mesa-dev] [PATCH] radeonsi: add a workaround for a bug in LLVM <= 3.8

2016-05-18 Thread Marek Olšák
From: Marek Olšák This is not directly applicable to stable and needs to be backported. --- src/gallium/drivers/radeonsi/si_shader.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 6166403..3df7

[Mesa-dev] [PATCH 4/4] gallium/radeon: small cleanups in r600_texture_transfer_map

2016-05-18 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeon/r600_texture.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index a00dedc..e2955aa 100644 --- a/src/gallium/drive

[Mesa-dev] [PATCH 3/4] gallium/radeon: don't set PB_USAGE in winsyses

2016-05-18 Thread Marek Olšák
From: Marek Olšák There is no point. --- src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 2 -- src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c index ed12f30.

[Mesa-dev] [PATCH 2/4] gallium/radeon: handle VRAM_GTT placements as having slow CPU reads

2016-05-18 Thread Marek Olšák
From: Marek Olšák not sure if we should include GTT WC too --- src/gallium/drivers/radeon/r600_buffer_common.c | 2 +- src/gallium/drivers/radeon/r600_texture.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gal

Re: [Mesa-dev] [PATCH] radeon: fixed division by zero

2016-05-18 Thread Marek Olšák
I guess Coverity doesn't know that rand() can't return a negative number. Marek On Wed, May 18, 2016 at 4:08 PM, Nicolai Hähnle wrote: > On 18.05.2016 08:17, Jakob Sinclair wrote: >> >> In the function r600_test_dma the max_width and max_height can be set to >> zero. > > > Thanks for looking int

Re: [Mesa-dev] [PATCH 1/2] mesa: Don't advertise GLES 3.1 without compute support

2016-05-18 Thread Marek Olšák
Thanks, I'm going to push this soon. Marek On Tue, Apr 19, 2016 at 4:57 PM, Daniel Scharrer wrote: > The MaxComputeWorkGroupInvocations constant is used in > compute_version_es2() instead of extensions->ARB_compute_shader > as ES has lower requirements than desktop GL. > > Both i965 and gallium

Re: [Mesa-dev] [PATCH] radeon: fixed division by zero

2016-05-18 Thread Jakob Sinclair
On 2016-05-18 16:08, Nicolai Hähnle wrote: On 18.05.2016 08:17, Jakob Sinclair wrote: In the function r600_test_dma the max_width and max_height can be set to zero. Thanks for looking into that. Can they really? I see max_width = MIN2(tsrc.width0, tdst.width0); max_height = MIN2(tsrc.height0

Re: [Mesa-dev] [PATCH v3] glsl/linker: dvec3/dvec4 consume twice input vertex attributes

2016-05-18 Thread Kenneth Graunke
On Wednesday, May 18, 2016 1:19:39 PM PDT Juan A. Suarez Romero wrote: > From the GL 4.5 core spec, section 11.1.1 (Vertex Attributes): > > "A program with more than the value of MAX_VERTEX_ATTRIBS > active attribute variables may fail to link, unless > device-dependent optimizations are able to m

Re: [Mesa-dev] [PATCH] radeonsi: add a workaround for a bug in LLVM <= 3.8

2016-05-18 Thread Nicolai Hähnle
On 18.05.2016 11:13, Marek Olšák wrote: From: Marek Olšák This is not directly applicable to stable and needs to be backported. This is because LLVM gets confused / misled about SGPRs vs. VGPRs, right? It's unfortunate, but I see no better way, so... Reviewed-by: Nicolai Hähnle --- sr

Re: [Mesa-dev] [PATCH 4/4] gallium/radeon: small cleanups in r600_texture_transfer_map

2016-05-18 Thread Nicolai Hähnle
For the series: Reviewed-by: Nicolai Hähnle On 18.05.2016 11:13, Marek Olšák wrote: From: Marek Olšák --- src/gallium/drivers/radeon/r600_texture.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/

Re: [Mesa-dev] [PATCH] winsys/amdgpu: add back multithreaded command submission

2016-05-18 Thread Marek Olšák
On Sat, May 7, 2016 at 5:12 PM, Nicolai Hähnle wrote: > Looks good to me, just two remarks below... > > > On 06.05.2016 13:31, Marek Olšák wrote: >> >> From: Marek Olšák >> >> Ported from the initial amdgpu winsys from the private AMD branch. >> >> The thread creates the buffer list, submits IBs,

Re: [Mesa-dev] [PATCH] radeonsi: add a workaround for a bug in LLVM <= 3.8

2016-05-18 Thread Marek Olšák
On Wed, May 18, 2016 at 6:41 PM, Nicolai Hähnle wrote: > On 18.05.2016 11:13, Marek Olšák wrote: >> >> From: Marek Olšák >> >> This is not directly applicable to stable and needs to be backported. > > > This is because LLVM gets confused / misled about SGPRs vs. VGPRs, right? > It's unfortunate,

Re: [Mesa-dev] [PATCH] winsys/amdgpu: add back multithreaded command submission

2016-05-18 Thread Nicolai Hähnle
On 18.05.2016 11:58, Marek Olšák wrote: On Sat, May 7, 2016 at 5:12 PM, Nicolai Hähnle wrote: Looks good to me, just two remarks below... On 06.05.2016 13:31, Marek Olšák wrote: From: Marek Olšák Ported from the initial amdgpu winsys from the private AMD branch. The thread creates the bu

[Mesa-dev] [PATCH v2] radeon: fixed division by zero

2016-05-18 Thread Jakob Sinclair
Coverity is getting a false positive that a division by zero can occur here. This change will silence the Coverity warnings as a division by zero cannot occur in this case. Signed-off-by: Jakob Sinclair --- Changes since V1: We realised that Coverity was actually giving out a false positive and

Re: [Mesa-dev] Mesa 11.1.4

2016-05-18 Thread Matt Turner
On Wed, May 18, 2016 at 8:15 AM, enpeng xu wrote: > Hi Emil, > I just downloaded mesa-11.1.4 and found glsl_lexer.cpp was in the release > source code, > further more, in the file, there are some absolute path generated from flex > like this: > > #line 1 "/home/emil/development/mesa/src/glsl/glsl_

Re: [Mesa-dev] [PATCH] winsys/amdgpu: add back multithreaded command submission

2016-05-18 Thread Marek Olšák
,On Wed, May 18, 2016 at 7:48 PM, Nicolai Hähnle wrote: > On 18.05.2016 11:58, Marek Olšák wrote: >> >> On Sat, May 7, 2016 at 5:12 PM, Nicolai Hähnle wrote: >>> >>> Looks good to me, just two remarks below... >>> >>> >>> On 06.05.2016 13:31, Marek Olšák wrote: From: Marek Olšák >

Re: [Mesa-dev] [PATCH 2/2] egl: Check if API is supported when using eglBindAPI.

2016-05-18 Thread Manolova, Plamena
Hi Emil, Thanks for reviewing! On Wed, May 18, 2016 at 12:11 PM, Emil Velikov wrote: > Hi Plamena, > > On 17 May 2016 at 17:35, Plamena Manolova > wrote: > > According to the EGL specifications before binding an API > > we must check whether it's supported first. If not eglBindAPI > > should r

Re: [Mesa-dev] [PATCH 2/2] egl: Check if API is supported when using eglBindAPI.

2016-05-18 Thread Manolova, Plamena
Hi Ian, Thanks for reviewing! On Wed, May 18, 2016 at 4:33 PM, Ian Romanick wrote: > On 05/17/2016 09:35 AM, Plamena Manolova wrote: > > According to the EGL specifications before binding an API > > we must check whether it's supported first. If not eglBindAPI > > should return EGL_FALSE and gen

Re: [Mesa-dev] [PATCH 00/14] st/mesa: accelerate glReadPixels PBO downloads

2016-05-18 Thread Brian Paul
On 05/18/2016 09:25 AM, Nicolai Hähnle wrote: Hi, this series makes the existing PBO texture upload code symmetric, adding a download path that uses shader images a no-attachment framebuffers. This should help performance by reducing stalls in several games, including GRID: Autosport (verified w

Re: [Mesa-dev] [RFC 5/7] nir: fix block iterator coverity warning

2016-05-18 Thread Connor Abbott
nir_cf_node_cf_tree_next() never returns NULL, maybe we can mark it as such? Also, what is coverity saying... we never dereference anything here, only inside the functions themselves... On Wed, May 18, 2016 at 11:54 AM, Rob Clark wrote: > From: Rob Clark > > For example, in nir_opt_dead_cf.c:140

[Mesa-dev] [AppVeyor] mesa master #1281 failed

2016-05-18 Thread AppVeyor
Build mesa 1281 failed Commit 2a8aa1e3de by Ardinartsev Nikita on 5/16/2016 11:27 PM: i965/urb: fixes division by zero\n\nFixes regression introduced by af5ca43f2676bff7499f93277f908b681cb821d0\n\nReviewed-by: Matt Turner \nBugzilla: https://bugs.freedesktop.or

Re: [Mesa-dev] [PATCH] anv/device: Fix viewportBoundsRange

2016-05-18 Thread Anuj Phogat
On Tue, May 17, 2016 at 4:23 PM, Nanley Chery wrote: > From: Nanley Chery > > Align with the spec requirement that the range must be at least > [−2 × maxViewportDimensions, 2 × maxViewportDimensions − 1]. Our > hardware supports this. > > Fixes dEQP-VK.api.info.device.properties > > Bugzilla: htt

[Mesa-dev] [PATCH] i965/compute: Fix uniform init issue when SIMD8 is skipped

2016-05-18 Thread Jordan Justen
In d8347f12ead89c5a58f69ce9283a54ac8487159c, we added support for skipping SIMD8 generation when the program local size is too large for SIMD8 to be usable. This change was missed in that commit. This bug would impact gen7 platforms when the compute shader local size is greater than 512, and gen8

Re: [Mesa-dev] [PATCH 2/2] egl: Check if API is supported when using eglBindAPI.

2016-05-18 Thread Ian Romanick
On 05/18/2016 11:45 AM, Manolova, Plamena wrote: > Hi Ian, > Thanks for reviewing! > > On Wed, May 18, 2016 at 4:33 PM, Ian Romanick > wrote: > > On 05/17/2016 09:35 AM, Plamena Manolova wrote: > > According to the EGL specifications before binding an API >

Re: [Mesa-dev] [PATCH 03/39] llvmpipe: Fix overflow for 32 bits available memory computation

2016-05-18 Thread Axel Davy
On 16/05/2016 20:08, Emil Velikov wrote: Then there's the question if other drivers want to apply, and thus move, it elsewhere. -Emil Has anyone an opinion about that particular point ? Axel ___ mesa-dev mailing list mesa-dev@lists.freedesktop.or

[Mesa-dev] [PATCH] docs: Document spec quoting practices

2016-05-18 Thread Ian Romanick
From: Ian Romanick v2: Remove extra "ES" from "GLSL ES ES". Noticed by Chris Forbes. v3: Many updates based on (very old) feedback from Paul Berry and (more recent) observation of what is most commonly done in the code base. Signed-off-by: Ian Romanick Cc: Brian Paul --- docs/devinfo.html |

[Mesa-dev] [Bug 91687] Crash when creating new context after destroying the old one using indirect rendering

2016-05-18 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91687 Marius Cirsta changed: What|Removed |Added CC||mfor...@gmail.com --- Comment #5 from Ma

[Mesa-dev] [PATCH] d3dadapter9: Add ddebug, rbug and trace support

2016-05-18 Thread Axel Davy
Add support for ddebug, rbug and trace Signed-off-by: Axel Davy --- src/gallium/targets/d3dadapter9/Makefile.am | 9 + 1 file changed, 9 insertions(+) diff --git a/src/gallium/targets/d3dadapter9/Makefile.am b/src/gallium/targets/d3dadapter9/Makefile.am index 8b27938..c37da98 100644 --

[Mesa-dev] [PATCH] gallium/util: Implement util_format_translate_3D

2016-05-18 Thread Axel Davy
This is the equivalent of util_format_translate, but for volumes. Signed-off-by: Axel Davy --- Emil, I hope I understood what you wanted correctly. src/gallium/auxiliary/util/u_format.c | 34 ++ src/gallium/auxiliary/util/u_format.h | 13 + 2 files ch

Re: [Mesa-dev] Mesa 11.1.4

2016-05-18 Thread Emil Velikov
On 18 May 2016 at 16:15, enpeng xu wrote: > Hi Emil, > I just downloaded mesa-11.1.4 and found glsl_lexer.cpp was in the release > source code, > further more, in the file, there are some absolute path generated from flex > like this: > > #line 1 "/home/emil/development/mesa/src/glsl/glsl_lexer.ll

Re: [Mesa-dev] [PATCH] gallium/util: Implement util_format_translate_3D

2016-05-18 Thread Emil Velikov
On 18 May 2016 at 21:33, Axel Davy wrote: > This is the equivalent of util_format_translate, but for volumes. > > Signed-off-by: Axel Davy > --- > Emil, I hope I understood what you wanted correctly. > Imho the function name should be all lowercase - util_format_translate_3d. The rest of gallium

Re: [Mesa-dev] [PATCH] gallium/util: Implement util_format_translate_3D

2016-05-18 Thread Axel Davy
On 18/05/2016 22:49, Emil Velikov wrote: On 18 May 2016 at 21:33, Axel Davy wrote: This is the equivalent of util_format_translate, but for volumes. Signed-off-by: Axel Davy --- Emil, I hope I understood what you wanted correctly. Imho the function name should be all lowercase - util_format

Re: [Mesa-dev] [PATCH 1/2] Silence warnings related to nir_texop_txf_ms_mcs not handled in switch

2016-05-18 Thread Anuj Phogat
On Tue, May 17, 2016 at 3:21 AM, Eduardo Lima Mitev wrote: > Such as > > ir3/ir3_compiler_nir.c: In function ‘emit_tex’: > ir3/ir3_compiler_nir.c:1438:2: warning: enumeration value > ‘nir_texop_txf_ms_mcs’ >not handled in switch [-Wswitch] > > and > > spirv/spirv_t

Re: [Mesa-dev] [PATCH 2/2] i965/fs: Silence warnings related to use of uninitialized values

2016-05-18 Thread Anuj Phogat
On Tue, May 17, 2016 at 3:21 AM, Eduardo Lima Mitev wrote: > brw_fs.cpp: In function ‘const unsigned int* brw_compile_fs(const [...] > brw_fs.cpp:6093:64: warning: ‘simd16_grf_start’ may be used uninitialized > [...] >prog_data->base.dispatch_grf_start_reg = simd16_grf_start; > > brw_fs.c

Re: [Mesa-dev] [Mesa-announce] Mesa 11.1.4

2016-05-18 Thread Matt Turner
On Wed, May 18, 2016 at 1:39 PM, Emil Velikov wrote: > That said, if we get consensus that we shouldn't ship them I can make > that happen. I'm against that. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/

Re: [Mesa-dev] [PATCH] docs: Document spec quoting practices

2016-05-18 Thread Kenneth Graunke
On Wednesday, May 18, 2016 1:12:29 PM PDT Ian Romanick wrote: > From: Ian Romanick > > v2: Remove extra "ES" from "GLSL ES ES". Noticed by Chris Forbes. > > v3: Many updates based on (very old) feedback from Paul Berry and (more > recent) observation of what is most commonly done in the code ba

Re: [Mesa-dev] [Mesa-announce] Mesa 11.1.4

2016-05-18 Thread enpeng xu
i agree, in fact, it's helpful to ship pre-generated files, especially for some platforms which do not use standard mesa Makefiles to build mesa:). Thanks Enpeng On Wed, May 18, 2016 at 5:19 PM, Matt Turner wrote: > On Wed, May 18, 2016 at 1:39 PM, Emil Velikov > wrote: > > That said, if we ge

[Mesa-dev] [PATCH] anv/batch_chain: free pointers for error cases

2016-05-18 Thread Mark Janes
Trivial fix to improperly handled cleanup during VK_ERROR_OUT_OF_HOST_MEMORY. Identified by Coverity: CID 1358908 and 1358909 --- src/intel/vulkan/anv_batch_chain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_b

Re: [Mesa-dev] [PATCH] glsl/linker: attempt to match anonymous structures at link

2016-05-18 Thread Ian Romanick
This patch is Reviewed-by: Ian Romanick On 05/16/2016 05:33 PM, Dave Airlie wrote: > From: Dave Airlie > > This is my attempt at fixing at least one of the UE4 bugs with GL4.3. > > If we are doing intrastage matching and hit anonymous structs, then > we should do a record comparison instead o

Re: [Mesa-dev] [PATCH 00/39] Some nine patches for Mesa 12.0

2016-05-18 Thread Axel Davy
Hi, I plan to merge the patches when freedesktop comes back, except d3dadapter9: Add d3dadapter9.pc which needs more work and llvmpipe: Fix overflow for 32 bits available memory computation for which discussions aren't finished. Axel On 15/05/2016 12:45, Axel Davy wrote: Hi, Here are so

Re: [Mesa-dev] [PATCH] anv/batch_chain: free pointers for error cases

2016-05-18 Thread Jason Ekstrand
R-B On Wed, May 18, 2016 at 2:37 PM, Mark Janes wrote: > Trivial fix to improperly handled cleanup during > VK_ERROR_OUT_OF_HOST_MEMORY. > > Identified by Coverity: CID 1358908 and 1358909 > --- > src/intel/vulkan/anv_batch_chain.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >

[Mesa-dev] [PATCH 01/12] nir: Fix wpos_ytransform lowering state_slot swizzle.

2016-05-18 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke --- src/compiler/nir/nir_lower_wpos_ytransform.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/nir/nir_lower_wpos_ytransform.c b/src/compiler/nir/nir_lower_wpos_ytransform.c index 1d53530..5546788 100644 --- a/src/compiler/nir/nir_lower_wpos_yt

[Mesa-dev] [PATCH 06/12] nir: Handle fddy_fine and fddy_coarse in nir_lower_wpos_ytransform.

2016-05-18 Thread Kenneth Graunke
These also need flipping! Signed-off-by: Kenneth Graunke --- src/compiler/nir/nir_lower_wpos_ytransform.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_lower_wpos_ytransform.c b/src/compiler/nir/nir_lower_wpos_ytransform.c index 7741df2..36e25b9 100

[Mesa-dev] [PATCH 05/12] nir: Make lower_wpos_ytransform_block a void function.

2016-05-18 Thread Kenneth Graunke
The return value was used for the old nir_foreach_block callback system, but at this point it no longer means anything. Signed-off-by: Kenneth Graunke Reviewed-by: Rob Clark --- src/compiler/nir/nir_lower_wpos_ytransform.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/s

[Mesa-dev] [PATCH 07/12] nir: Don't use ffma in nir_lower_wpos_ytransform().

2016-05-18 Thread Kenneth Graunke
ffma is an explicitly fused multiply add with higher precision. The optimizer will take care of promoting mul/add to fma when it's beneficial to do so. This fixes failures on Gen4-5 when using this pass, as those platforms don't actually implement fma(). Signed-off-by: Kenneth Graunke --- src/c

[Mesa-dev] [PATCH 03/12] nir: Add interp_var_at_offset flipping.

2016-05-18 Thread Kenneth Graunke
The Y-offset needs flipping as well, similar to ddy. Signed-off-by: Kenneth Graunke --- src/compiler/nir/nir_lower_wpos_ytransform.c | 21 + 1 file changed, 21 insertions(+) diff --git a/src/compiler/nir/nir_lower_wpos_ytransform.c b/src/compiler/nir/nir_lower_wpos_ytransfo

[Mesa-dev] [PATCH 09/12] i965, anv: Use NIR FragCoord re-center and y-transform passes.

2016-05-18 Thread Kenneth Graunke
This handles gl_FragCoord transformations and other window system vs. user FBO coordinate system flipping by multiplying/adding uniform values, rather than recompiles. This is much better because we have no decent way to guess whether the application is going to use a shader with the window system

[Mesa-dev] [PATCH 08/12] nir: Add a simple nir_lower_wpos_center() pass for Vulkan drivers.

2016-05-18 Thread Kenneth Graunke
nir_lower_wpos_ytransform() is great for OpenGL, which allows applications to choose whether their coordinate system's origin is upper left/lower left, and whether the pixel center should be on integer/half-integer boundaries. Vulkan, however, has much simpler requirements: the pixel center is alw

[Mesa-dev] [PATCH 11/12] i965: Delete dead dFdy flipping code.

2016-05-18 Thread Kenneth Graunke
Rob's pass flips dFdy in the opposite case of what I expected, so we always take the negate_value case. It doesn't really matter. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 24 +--- 1 file changed, 5 insertions(+), 19 deletions(-) di

[Mesa-dev] [PATCH 12/12] spirv: Handle the PixelCenterInteger execution mode.

2016-05-18 Thread Kenneth Graunke
This isn't allowed by Vulkan, but might be useful someday for SPIR-V in OpenGL (if that ever becomes a thing). It's easy enough to hook up, and as precedent, we already do so for OriginLowerLeft. Signed-off-by: Kenneth Graunke --- src/compiler/spirv/spirv_to_nir.c | 3 +++ src/compiler/spirv/v

  1   2   >