Re: [Mesa-dev] [PATCH 1/4] ac/radv: change api to create target machine

2017-07-06 Thread Bas Nieuwenhuizen
Series is Reviewed-by: Bas Nieuwenhuizen On Thu, Jul 6, 2017 at 4:09 AM, Dave Airlie wrote: > From: Dave Airlie > > This just modifies the API to make it easier to add other flags > to target machine creation. > > Signed-off-by: Dave Airlie > --- > src/amd/common/ac_llvm_util.c | 4 ++-- >

[Mesa-dev] [Bug 101703] No stencil buffer allocated when requested by GLUT

2017-07-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=101703 Bug ID: 101703 Summary: No stencil buffer allocated when requested by GLUT Product: Mesa Version: 17.0 Hardware: All OS: All Status: NEW Severity: normal

[Mesa-dev] [PATCH 1/2] intel: add number of subslices to device info

2017-07-06 Thread Lionel Landwerlin
We could have used a single integer to store that value, but Cannonlake has different number of subslices per slice depending on the GT. Signed-off-by: Lionel Landwerlin --- src/intel/common/gen_device_info.c | 54 -- src/intel/common/gen_device_info.h | 5 ++

[Mesa-dev] [PATCH 2/2] i965: perf: use new subslices numbers from device info

2017-07-06 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- src/mesa/drivers/dri/i965/brw_performance_query.c | 49 --- 1 file changed, 17 insertions(+), 32 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri/i965/brw_performance_query.c index 81389db

[Mesa-dev] [PATCH] glsl: look up for transform feedback varyings after linking

2017-07-06 Thread Juan A. Suarez Romero
Check if shaders have transform feedback varyings also after the post-link step. This fixes: KHR-GL45.enhanced_layouts.xfb_vertex_streams piglit/spec/arb_enhanced_layouts/gs-stream-location-aliasing --- src/compiler/glsl/glsl_to_nir.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/c

[Mesa-dev] [Bug 101703] No stencil buffer allocated when requested by GLUT

2017-07-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=101703 Eric Engestrom changed: What|Removed |Added Attachment #132472|0 |1 is obsolete|

[Mesa-dev] [PATCH] etnaviv: don't dereference etna_resource pointer if allocation fails

2017-07-06 Thread Aleksander Morgado
The check for the pointer being non-NULL was being done too late. Signed-off-by: Aleksander Morgado --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/driv

Re: [Mesa-dev] [PATCH] scons: Check for xlocale.h before defining HAVE_XLOCALE_H.

2017-07-06 Thread Emil Velikov
On 5 July 2017 at 22:25, Vinson Lee wrote: > glibc 2.26 removed xlocale.h. > https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27 > > Fix this build error with glibc 2.26. > > Compiling src/util/strtod.c ... > src/util/strtod.c:32:10: fatal error: xlocale.h: No such file or

Re: [Mesa-dev] [PATCH] etnaviv: don't dereference etna_resource pointer if allocation fails

2017-07-06 Thread Christian Gmeiner
2017-07-06 11:35 GMT+02:00 Aleksander Morgado : > The check for the pointer being non-NULL was being done too late. > > Signed-off-by: Aleksander Morgado Reviewed-by: Christian Gmeiner > --- > src/gallium/drivers/etnaviv/etnaviv_resource.c | 10 +++--- > 1 file changed, 7 insertions(+), 3

Re: [Mesa-dev] [RFC] travis: lower SWR requirement to GCC 4.8, aka std=c++11

2017-07-06 Thread Emil Velikov
On 5 July 2017 at 19:28, Rowley, Timothy O wrote: > >> On Jul 4, 2017, at 12:01 PM, Emil Velikov wrote: >> >> From: Emil Velikov >> >> With ealier commit we relaxed the requirement from C++14 to C++11. >> Update the build script so that it >> >> Cc: Tim Rowley > Fixes: 0b80b025021 ("swr: relax c

Re: [Mesa-dev] [PATCH] gallium: auxiliary: Fix standalone Android build of u_cpu_detect

2017-07-06 Thread Emil Velikov
On 6 July 2017 at 02:18, Tomasz Figa wrote: > On Thu, Jul 6, 2017 at 2:49 AM, Emil Velikov wrote: >> Hi Tomasz, >> >> On 5 July 2017 at 15:58, Tomasz Figa wrote: >>> Commit 463b7d0332c5("gallium: Enable ARM NEON CPU detection.") >>> introduced CPU feature detection based Android cpufeatures libr

Re: [Mesa-dev] [PATCH 01/10] egl: move eglCreateDRMImageMESA's malloc later

2017-07-06 Thread Emil Velikov
On 30 June 2017 at 12:56, Daniel Stone wrote: > Hi Emil, > > On 30 June 2017 at 12:15, Emil Velikov wrote: >> Kristian can you shed some light? The extension seems quite sparse. >> >> Weston used the extension back in 2011. While the Glamor bit were >> dropped somewhat recently in May 2017. >> >>

Re: [Mesa-dev] [PATCH 5/7] i965: Assert that we don't use CPU write maps to non-coherent buffers.

2017-07-06 Thread Chris Wilson
Quoting Kenneth Graunke (2017-07-05 21:56:52) > Using CPU maps of non-coherent buffers can get us in a lot of trouble, > and WC maps are a reasonable alternative anyway. Guard against shooting > ourselves in the foot by adding an assert, and comment. Reviewed-by: Chris Wilson -Chris

Re: [Mesa-dev] [PATCH 6/7] i965: Don't use PREAD for glGetBufferSubData().

2017-07-06 Thread Chris Wilson
Quoting Kenneth Graunke (2017-07-05 21:56:53) > diff --git a/src/mesa/drivers/dri/i965/intel_buffer_objects.c > b/src/mesa/drivers/dri/i965/intel_buffer_objects.c > index a9ac29a6a81..2b0f7b9a698 100644 > --- a/src/mesa/drivers/dri/i965/intel_buffer_objects.c > +++ b/src/mesa/drivers/dri/i965/inte

Re: [Mesa-dev] [PATCH] glsl: gl_Max{Vertex, Fragment}UniformComponents exist in all desktop GL versions

2017-07-06 Thread Andres Gomez
It looks like we could want this into -stable (?) On Fri, 2017-06-16 at 12:05 +0200, Iago Toral Quiroga wrote: > The current implementation assumed that these were replaced in GLSL >= 4.10 > by gl_Max{Vertex,Fragment}UniformVectors, however this is not true: both > built-ins should be produced fro

Re: [Mesa-dev] [PATCH] glsl: gl_Max{Vertex, Fragment}UniformComponents exist in all desktop GL versions

2017-07-06 Thread Iago Toral
Yes, I think so, thanks Andres. Iago On Thu, 2017-07-06 at 16:45 +0300, Andres Gomez wrote: > It looks like we could want this into -stable (?) > > On Fri, 2017-06-16 at 12:05 +0200, Iago Toral Quiroga wrote: > > The current implementation assumed that these were replaced in GLSL > > >= 4.10 > >

Re: [Mesa-dev] [PATCH 01/10] egl: move eglCreateDRMImageMESA's malloc later

2017-07-06 Thread Eric Engestrom
On Friday, 2017-06-30 12:15:11 +0100, Emil Velikov wrote: > From: Emil Velikov > > Don't bother allocating any memory until we're finished parsing and > sanitising all the attributes. > > As a nice side effect we now consistently set eglError when any of > the attrib/values are not correct. Not

Re: [Mesa-dev] [PATCHv2] etnaviv: Add support for ETC2 texture compression

2017-07-06 Thread Wladimir
Hello, On Tue, Jun 27, 2017 at 5:47 PM, Christian Gmeiner wrote: > 2017-06-27 17:39 GMT+02:00 Wladimir J. van der Laan : >> On Tue, Jun 27, 2017 at 05:31:52PM +0200, Wladimir J. van der Laan wrote: >> >>> > sure if we should advertise the broken formats (on gpus with HALTI0). >> >> FWIW, I did ch

Re: [Mesa-dev] [PATCH 1/3] mesa/main: Move NULL pointer check.

2017-07-06 Thread Andres Gomez
It looks like we could want this into -stable (?) On Wed, 2017-06-14 at 19:33 +0300, Plamena Manolova wrote: > In blit_framebuffer we're already doing a NULL > pointer check for readFb and drawFb so it makes > sense to do it before we actually use the pointers. > > CID: 1412569 > Signed-off-by: P

Re: [Mesa-dev] [PATCH 09/10] egl: enhance KHR_gl_image extensions checks

2017-07-06 Thread Eric Engestrom
On Friday, 2017-06-30 12:15:19 +0100, Emil Velikov wrote: > From: Emil Velikov > > Drop the (duplicate) top-level check in dri2_create_image_khr() and add > the respective checks in dri2_create_image_khr_{texture,renderbuffer} > > Signed-off-by: Emil Velikov > --- > src/egl/drivers/dri2/egl_dr

[Mesa-dev] [PATCH] gallium: improve selection of pixel format

2017-07-06 Thread Olivier Lauffenburger
Current selection of pixel format does not enforce the request of stencil or depth buffer if the color depth is not the same as requested. For instance, GLUT requests a 32-bit color buffer with an 8-bit stencil buffer, but because color buffers are only 24-bit, no priority is given to creating a st

[Mesa-dev] [PATCH 2/2] gallium: Implement wglUseFontBitmaps.

2017-07-06 Thread Olivier Lauffenburger
wglUseFontBitmaps is currently a noop. This patch implements this function for Windows. Signed-off-by: Olivier Lauffenburger --- src/gallium/state_trackers/wgl/stw_wgl.c | 50 1 file changed, 44 insertions(+), 6 deletions(-) diff --git a/src/gallium/state_tracke

Re: [Mesa-dev] [PATCH] scons: Check for xlocale.h before defining HAVE_XLOCALE_H.

2017-07-06 Thread Eric Engestrom
On Wednesday, 2017-07-05 21:25:12 +, Vinson Lee wrote: > glibc 2.26 removed xlocale.h. > https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27 > > Fix this build error with glibc 2.26. > > Compiling src/util/strtod.c ... > src/util/strtod.c:32:10: fatal error: xlocale.h:

[Mesa-dev] [PATCH 3/3] mesa: fix glPrimitiveRestartNV crash inside a render list.

2017-07-06 Thread Olivier Lauffenburger
glPrimitiveRestartNV crashes when it is called during the compilation of a render list. There are two reasons: - ctx->Driver.CurrentSavePrimitive is not set to the current primitive - save_PrimitiveRestartNV() calls _save_Begin() which only sets an OpenGL error, instead of calling vbo_save_Notif

[Mesa-dev] [PATCH 3/3] swr/rast: remove unused variables

2017-07-06 Thread Tim Rowley
--- src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp | 2 -- src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.c

[Mesa-dev] [PATCH 1/3] swr/rast: _mm*_undefined_* implementations for gcc<4.9

2017-07-06 Thread Tim Rowley
Define these in terms of setzero for ancient gcc versions which don't have the undefined intrinsics. Cc: mesa-sta...@lists.freedesktop.org --- src/gallium/drivers/swr/rasterizer/common/os.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/drivers/swr/rasterizer/common/os.h b

[Mesa-dev] [PATCH 2/3] swr/rast: don't use _mm256_fmsub_ps in AVX code

2017-07-06 Thread Tim Rowley
--- src/gallium/drivers/swr/rasterizer/common/simdlib_256_avx.inl | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/swr/rasterizer/common/simdlib_256_avx.inl b/src/gallium/drivers/swr/rasterizer/common/simdlib_256_avx.inl index aec79e3..16eb521 100644 --

Re: [Mesa-dev] [RFC] travis: lower SWR requirement to GCC 4.8, aka std=c++11

2017-07-06 Thread Rowley, Timothy O
On Jul 6, 2017, at 5:39 AM, Emil Velikov mailto:emil.l.veli...@gmail.com>> wrote: On 5 July 2017 at 19:28, Rowley, Timothy O mailto:timothy.o.row...@intel.com>> wrote: On Jul 4, 2017, at 12:01 PM, Emil Velikov mailto:emil.l.veli...@gmail.com>> wrote: From: Emil Velikov mailto:emil.veli...@c

[Mesa-dev] [PATCH] gallium/util: remove unused util_{begin, end}_pipestat_query() helpers

2017-07-06 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/gallium/auxiliary/util/u_helpers.c | 50 -- src/gallium/auxiliary/util/u_helpers.h | 7 - 2 files changed, 57 deletions(-) diff --git a/src/gallium/auxiliary/util/u_helpers.c b/src/gallium/auxiliary/util/u_helpers.c ind

Re: [Mesa-dev] [PATCH 09/10] egl: enhance KHR_gl_image extensions checks

2017-07-06 Thread Emil Velikov
On 6 July 2017 at 15:45, Eric Engestrom wrote: > On Friday, 2017-06-30 12:15:19 +0100, Emil Velikov wrote: >> From: Emil Velikov >> >> Drop the (duplicate) top-level check in dri2_create_image_khr() and add >> the respective checks in dri2_create_image_khr_{texture,renderbuffer} >> >> Signed-off-

Re: [Mesa-dev] [Mesa-stable] [PATCH 1/3] mesa/main: Move NULL pointer check.

2017-07-06 Thread Emil Velikov
On 6 July 2017 at 15:35, Andres Gomez wrote: > It looks like we could want this into -stable (?) > _mesa_update_draw_buffer_bounds is a no-op if the buffer pointer is NULL. There's no issue to fix, but making Coverity happy is not a bad idea either ;-) -Emil __

Re: [Mesa-dev] [PATCH 3/4] ac/llvm: set xnack like radeonsi does.

2017-07-06 Thread Jan Vesely
On Thu, 2017-07-06 at 12:09 +1000, Dave Airlie wrote: > From: Dave Airlie > > Use family, but only set xnack+ for gfx9. > > Signed-off-by: Dave Airlie > --- > src/amd/common/ac_llvm_util.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/amd/common/ac_llvm_util.

[Mesa-dev] BCM7268 V3D3.3 ("vc5") driver release

2017-07-06 Thread Eric Anholt
I've just pushed a "vc5" branch to my Mesa tree (https://github.com/anholt/mesa/commits/vc5). This is the culmination of a couple of months of work on building a new driver for Broadcom's V3D 3.3. V3D 3.3 is a GLES3.1 part, though I'm nowhere near conformance yet. This driver is for BCM7268, a s

[Mesa-dev] [Bug 101709] [llvmpipe] piglit gl-1.0-scissor-offscreen regression

2017-07-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=101709 Bug ID: 101709 Summary: [llvmpipe] piglit gl-1.0-scissor-offscreen regression Product: Mesa Version: git Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW

Re: [Mesa-dev] [PATCH 1/8] mesa: check for allocation failures in _mesa_new_texture_object()

2017-07-06 Thread Andres Gomez
It looks like we could want patches 1 and 3-8 from this series into -stable (?) On Wed, 2017-06-21 at 11:04 +0200, Samuel Pitoiset wrote: > Signed-off-by: Samuel Pitoiset > --- > src/mesa/main/texobj.c | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/src/mesa/main

Re: [Mesa-dev] [st/va] Fix leak in VAAPI subpictures

2017-07-06 Thread Andres Gomez
On Thu, 2017-06-22 at 09:25 +, Namburu, Chandu-babu wrote: > From: Chandu Babu N > Subject: [PATCH] [st/va] Fix leak in VAAPI subpictures >   > sampler view allocated in vaAssociateSubpicture is not cleared > in vaiDeassociateSubpicture. >   > Reviewed-by: Christian König > --- > src/gallium/

Re: [Mesa-dev] [PATCH 3/4] ac/llvm: set xnack like radeonsi does.

2017-07-06 Thread Alex Deucher
On Thu, Jul 6, 2017 at 1:13 PM, Jan Vesely wrote: > On Thu, 2017-07-06 at 12:09 +1000, Dave Airlie wrote: >> From: Dave Airlie >> >> Use family, but only set xnack+ for gfx9. >> >> Signed-off-by: Dave Airlie >> --- >> src/amd/common/ac_llvm_util.c | 4 +++- >> 1 file changed, 3 insertions(+), 1

Re: [Mesa-dev] [PATCH 1/4] radeonsi: fix DCC fast clear for luminance and alpha formats

2017-07-06 Thread Andres Gomez
Marek, would we want this series in -stable or we shouldn't bother ? On Tue, 2017-06-20 at 19:06 +0200, Marek Olšák wrote: > From: Marek Olšák > > I reproduced this bug on Polaris11 and Raven. > > I can't get this bug on Fiji. The reason might be that Fiji doesn't use > 2D tiling for the test d

Re: [Mesa-dev] [st/va] Fix leak in VAAPI subpictures

2017-07-06 Thread Andres Gomez
It looks like we could want this into -stable (?) On Thu, 2017-07-06 at 21:10 +0300, Andres Gomez wrote: > On Thu, 2017-06-22 at 09:25 +, Namburu, Chandu-babu wrote: > > From: Chandu Babu N > > Subject: [PATCH] [st/va] Fix leak in VAAPI subpictures > >   > > sampler view allocated in vaAssoci

Re: [Mesa-dev] [PATCH v6 1/3] util: Add util_strlcpy

2017-07-06 Thread Robert Foss
On Wed, 2017-07-05 at 08:46 -0600, Brian Paul wrote: > On 07/05/2017 12:57 AM, Robert Foss wrote: > > Add local strlcpy implementation. > > > > Signed-off-by: Robert Foss > > --- > > Changes since v5: > >    Actually include changes from v5 in patch > > > > Changes since v4: > >    Gustaw Smolar

Re: [Mesa-dev] [st/va] Fix leak in VAAPI subpictures

2017-07-06 Thread Alex Deucher
On Thu, Jul 6, 2017 at 2:37 PM, Andres Gomez wrote: > It looks like we could want this into -stable (?) Yes, I think so. Alex > > On Thu, 2017-07-06 at 21:10 +0300, Andres Gomez wrote: >> On Thu, 2017-06-22 at 09:25 +, Namburu, Chandu-babu wrote: >> > From: Chandu Babu N >> > Subject: [PAT

[Mesa-dev] [PATCH] swr/rast: Correctly allocate SWR_STATS memory as cacheline aligned

2017-07-06 Thread Tim Rowley
Cacheline alignment of SWR_STATS to prevent sharing of cachelines between threads (performance). Gets rid of gcc-7.1 warning about using c++17's over-aligned new feature. Cc: mesa-sta...@lists.freedesktop.org --- src/gallium/drivers/swr/rasterizer/core/api.cpp | 6 +++--- src/gallium/drivers

Re: [Mesa-dev] [PATCH v6 1/3] util: Add util_strlcpy

2017-07-06 Thread Gustaw Smolarczyk
2017-07-06 20:52 GMT+02:00 Robert Foss : > On Wed, 2017-07-05 at 08:46 -0600, Brian Paul wrote: >> On 07/05/2017 12:57 AM, Robert Foss wrote: >> > Add local strlcpy implementation. >> > >> > Signed-off-by: Robert Foss >> > --- >> > Changes since v5: >> >Actually include changes from v5 in patc

Re: [Mesa-dev] [PATCH 3/4] ac/llvm: set xnack like radeonsi does.

2017-07-06 Thread Matt Arsenault
> On Jul 5, 2017, at 19:09, Dave Airlie wrote: > > From: Dave Airlie > > Use family, but only set xnack+ for gfx9. > The driver shouldn’t be explicitly setting this. This should be set as part of the subtarget chosen -Matt ___ mesa-dev mailing li

Re: [Mesa-dev] [PATCH 1/3] swr/rast: _mm*_undefined_* implementations for gcc<4.9

2017-07-06 Thread Cherniak, Bruce
Reviewed-by: Bruce Cherniak > On Jul 6, 2017, at 11:26 AM, Tim Rowley wrote: > > Define these in terms of setzero for ancient gcc versions which don't > have the undefined intrinsics. > > Cc: mesa-sta...@lists.freedesktop.org > --- > src/gallium/drivers/swr/rasterizer/common/os.h | 6 ++ >

Re: [Mesa-dev] [PATCH 3/3] swr/rast: remove unused variables

2017-07-06 Thread Cherniak, Bruce
Reviewed-by: Bruce Cherniak > On Jul 6, 2017, at 11:26 AM, Tim Rowley wrote: > > --- > src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp | 2 -- > src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp | 2 -- > 2 files changed, 4 deletions(-) > > diff --git a/src/gallium/drivers/

Re: [Mesa-dev] [PATCH 2/3] swr/rast: don't use _mm256_fmsub_ps in AVX code

2017-07-06 Thread Cherniak, Bruce
Reviewed-by: Bruce Cherniak > On Jul 6, 2017, at 11:26 AM, Tim Rowley wrote: > > --- > src/gallium/drivers/swr/rasterizer/common/simdlib_256_avx.inl | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/drivers/swr/rasterizer/common/simdlib_256_avx.inl > b/s

Re: [Mesa-dev] [PATCH] swr/rast: Correctly allocate SWR_STATS memory as cacheline aligned

2017-07-06 Thread Cherniak, Bruce
Reviewed-by: Bruce Cherniak > On Jul 6, 2017, at 1:55 PM, Tim Rowley wrote: > > Cacheline alignment of SWR_STATS to prevent sharing of cachelines > between threads (performance). > > Gets rid of gcc-7.1 warning about using c++17's over-aligned new > feature. > > Cc: mesa-sta...@lists.freedesk

[Mesa-dev] [PATCH 2/6] nir/lower_io_to_temporaries: don't set compact on shadow vars

2017-07-06 Thread Connor Abbott
From: Connor Abbott The compact flag doesn't make sense on local variables, since the packing on them is up to the driver. This fixes nir_validate assertions in some cases, particularly when lower_io_to_temporaries is used on per-vertex inputs/outputs. --- src/compiler/nir/nir_lower_io_to_tempor

[Mesa-dev] [PATCH 0/6] radv: Rewrite local & shared variable handling

2017-07-06 Thread Connor Abbott
From: Connor Abbott This series grew out of trying to get rid of the copy-n-pasted index calculation code in radv's NIR-to-LLVM path, in particular in radv_get_deref_offset(). I realized for IO it's probably better to switch to using nir_lower_io after Nicolai's series, but for local variables an

[Mesa-dev] [PATCH 1/6] nir: don't segfault when printing variables with no name

2017-07-06 Thread Connor Abbott
From: Connor Abbott While normally we give variables whose name field is NULL a temporary name when called from nir_print_shader(), when we were calling from nir_print_instr() we never bothered, meaning that we just segfaulted when trying to print out instructions with such a variable. Since nir_

[Mesa-dev] [PATCH 3/6] ac/nir: rewrite local variable handling

2017-07-06 Thread Connor Abbott
From: Connor Abbott The old way was very TGSI-based, and couldn't handle indirect dereferences at all. Instead, pass through the type information NIR has about local variables to LLVM, and translate NIR dereferences directly into the equivalent GEP instructions in LLVM. --- src/amd/common/ac_nir

[Mesa-dev] [PATCH 4/6] ac/nir: rewrite shared variable handling

2017-07-06 Thread Connor Abbott
From: Connor Abbott Similar to before, do the direct NIR->LLVM translation instead of lowering to an array then back to a variable. This should fix indirect dereferences, make shared variables more tightly packed, and make LLVM's alias analysis more precise. --- src/amd/common/ac_nir_to_llvm.c |

[Mesa-dev] [PATCH 6/6] radv: don't lower indirect derefs

2017-07-06 Thread Connor Abbott
From: Connor Abbott Radeonsi doesn't either. As of the last commit, these should be handled properly as long as LLVM has scratch support. We also should use nir_lower_io_to_temporaries() for inputs instead of generating an if-ladder, since that should be more efficient. --- src/amd/vulkan/radv_p

[Mesa-dev] [PATCH 5/6] radv: reorder and add passes to match i965

2017-07-06 Thread Connor Abbott
From: Connor Abbott This makes the radv shader pipeline much closer to brw_preprocess_nir(). The main changes are: - Now we call nir_split_var_copies(), which is necessary for nir_lower_var_copies() to work correctly. The SPIR-V frontend never generates variable copies, so we didn't notice this,

Re: [Mesa-dev] [PATCH 1/3] st/mesa: find proper mipmap level in st_ClearTexSubImage()

2017-07-06 Thread Charmaine Lee
>From: Brian Paul >To: >CC: Neha Bhende >The Piglit arb_clear_texture-error test creates a texture with only >a 1x1 image at level=1, then tries to clear level 0 (non-existant) s/non-existant/non-existent/ >and level 1 (exists). The test only checks that the former generates >an error but t

[Mesa-dev] [PATCH] radv: don't overallocate depth/stencil formats

2017-07-06 Thread Dave Airlie
From: Dave Airlie For depth/stencil formats the surface layer allocates the stencil separately, so we don't need to include it in the bpe. This reduces the side of d32s8 allocates to something closer to pro. Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_image.c | 2 +- 1 file changed, 1

Re: [Mesa-dev] [PATCH 3/4] ac/llvm: set xnack like radeonsi does.

2017-07-06 Thread Dave Airlie
On 7 July 2017 at 05:07, Matt Arsenault wrote: > >> On Jul 5, 2017, at 19:09, Dave Airlie wrote: >> >> From: Dave Airlie >> >> Use family, but only set xnack+ for gfx9. >> > > The driver shouldn’t be explicitly setting this. This should be set as part > of the subtarget chosen Well I expect Ma

[Mesa-dev] [PATCH mesa] build systems: move git_sha1_gen.sh to bin/

2017-07-06 Thread Eric Engestrom
There was no reason for this script to live outside the scripts directory. Suggested-by: Brian Paul Signed-off-by: Eric Engestrom --- Makefile.am| 2 +- git_sha1_gen.sh => bin/git_sha1_gen.sh | 2 +- src/Makefile.am| 2 +- src/SConscript

[Mesa-dev] [PATCH 2/2] anv/image: Disable CCS if the image doesn't support rendering

2017-07-06 Thread Nanley Chery
Signed-off-by: Nanley Chery --- src/intel/vulkan/anv_image.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index c84fc8ddea..df505ce8f0 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@

[Mesa-dev] [PATCH 1/2] Revert "intel/isl: Only create a CCS buffer if the image supports rendering"

2017-07-06 Thread Nanley Chery
This reverts commit 8aaa13467dc289d35dc7900ab9fab9a7689c4178, which was based on an incorrect assumption. Unlike the restriction placed on image views in the Vulkan API, OpenGL allows you to render to texture views whose formats differ from the originals. Bugzilla: https://bugzilla.freedesktop.org

Re: [Mesa-dev] [PATCH 3/4] ac/llvm: set xnack like radeonsi does.

2017-07-06 Thread Matt Arsenault
> On Jul 6, 2017, at 13:08, Dave Airlie wrote: > > On 7 July 2017 at 05:07, Matt Arsenault wrote: >> >>> On Jul 5, 2017, at 19:09, Dave Airlie wrote: >>> >>> From: Dave Airlie >>> >>> Use family, but only set xnack+ for gfx9. >>> >> >> The driver shouldn’t be explicitly setting this. Thi

[Mesa-dev] [PATCH] st/dri: always initialize 'opencl_func_mutex' in struct dri_screen

2017-07-06 Thread Aleksander Morgado
The 'opencl_func_mutex' is destroyed in dri_destroy_screen_helper() unconditionally, so make sure it is always initialized to avoid any undefined behaviour. Signed-off-by: Aleksander Morgado --- src/gallium/state_trackers/dri/dri2.c | 1 + src/gallium/state_trackers/dri/drisw.c | 1 + 2 files c

Re: [Mesa-dev] [PATCH 3/4] ac/llvm: set xnack like radeonsi does.

2017-07-06 Thread Marek Olšák
On Thu, Jul 6, 2017 at 10:14 PM, Matt Arsenault wrote: > >> On Jul 6, 2017, at 13:08, Dave Airlie wrote: >> >> On 7 July 2017 at 05:07, Matt Arsenault wrote: >>> On Jul 5, 2017, at 19:09, Dave Airlie wrote: From: Dave Airlie Use family, but only set xnack+ for gfx9. >>

Re: [Mesa-dev] [PATCH 3/4] ac/llvm: set xnack like radeonsi does.

2017-07-06 Thread Marek Olšák
On Thu, Jul 6, 2017 at 8:12 PM, Alex Deucher wrote: > On Thu, Jul 6, 2017 at 1:13 PM, Jan Vesely wrote: >> On Thu, 2017-07-06 at 12:09 +1000, Dave Airlie wrote: >>> From: Dave Airlie >>> >>> Use family, but only set xnack+ for gfx9. >>> >>> Signed-off-by: Dave Airlie >>> --- >>> src/amd/common

Re: [Mesa-dev] [PATCH 3/6] ac/nir: rewrite local variable handling

2017-07-06 Thread Bas Nieuwenhuizen
On Thu, Jul 6, 2017 at 9:48 PM, Connor Abbott wrote: > From: Connor Abbott > > The old way was very TGSI-based, and couldn't handle indirect > dereferences at all. Instead, pass through the type information NIR has I think the old code should handle indirect derefs just fine? See the indir_index

Re: [Mesa-dev] [PATCH 1/6] nir: don't segfault when printing variables with no name

2017-07-06 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Thu, Jul 6, 2017 at 9:48 PM, Connor Abbott wrote: > From: Connor Abbott > > While normally we give variables whose name field is NULL a temporary > name when called from nir_print_shader(), when we were calling from > nir_print_instr() we never bothered, meanin

Re: [Mesa-dev] [PATCH mesa] build systems: move git_sha1_gen.sh to bin/

2017-07-06 Thread Brian Paul
LGTM. Reviewed-by: Brian Paul On 07/06/2017 02:08 PM, Eric Engestrom wrote: There was no reason for this script to live outside the scripts directory. Suggested-by: Brian Paul Signed-off-by: Eric Engestrom --- Makefile.am| 2 +- git_sha1_gen.sh => bin/git_sha

Re: [Mesa-dev] [PATCH 4/6] ac/nir: rewrite shared variable handling

2017-07-06 Thread Bas Nieuwenhuizen
Patches 3-4 look technically correct to me, so for just using it for shared vars Reviewed-by: Bas Nieuwenhuizen On Thu, Jul 6, 2017 at 9:48 PM, Connor Abbott wrote: > From: Connor Abbott > > Similar to before, do the direct NIR->LLVM translation instead of > lowering to an array then back to a

Re: [Mesa-dev] [PATCH 3/4] ac/llvm: set xnack like radeonsi does.

2017-07-06 Thread Alex Deucher
On Thu, Jul 6, 2017 at 4:56 PM, Marek Olšák wrote: > On Thu, Jul 6, 2017 at 8:12 PM, Alex Deucher wrote: >> On Thu, Jul 6, 2017 at 1:13 PM, Jan Vesely wrote: >>> On Thu, 2017-07-06 at 12:09 +1000, Dave Airlie wrote: From: Dave Airlie Use family, but only set xnack+ for gfx9.

Re: [Mesa-dev] [PATCH 3/6] ac/nir: rewrite local variable handling

2017-07-06 Thread Connor Abbott
On Thu, Jul 6, 2017 at 2:01 PM, Bas Nieuwenhuizen wrote: > On Thu, Jul 6, 2017 at 9:48 PM, Connor Abbott > wrote: >> From: Connor Abbott >> >> The old way was very TGSI-based, and couldn't handle indirect >> dereferences at all. Instead, pass through the type information NIR has > > I think the

Re: [Mesa-dev] [PATCH 5/6] radv: reorder and add passes to match i965

2017-07-06 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Thu, Jul 6, 2017 at 9:50 PM, Connor Abbott wrote: > From: Connor Abbott > > This makes the radv shader pipeline much closer to brw_preprocess_nir(). > The main changes are: > > - Now we call nir_split_var_copies(), which is necessary for > nir_lower_var_copies(

[Mesa-dev] [PATCH] etnaviv: fix refcnt initialization in etna_screen

2017-07-06 Thread Aleksander Morgado
Despite being a member of the etna_screen struct, 'refcnt' is used by the winsys-specific logic to track the reference count of the object managed in a hash table. When the count reaches zero, the pipe screen is removed from the table and destroyed. Fix the logic by initializing the refcnt to 1 wh

Re: [Mesa-dev] [PATCH 0/6] radv: Rewrite local & shared variable handling

2017-07-06 Thread Connor Abbott
On Thu, Jul 6, 2017 at 12:48 PM, Connor Abbott wrote: > From: Connor Abbott > > This series grew out of trying to get rid of the copy-n-pasted index > calculation code in radv's NIR-to-LLVM path, in particular in > radv_get_deref_offset(). I realized for IO it's probably better to > switch to usi

Re: [Mesa-dev] [PATCH 1/4] radeonsi: fix DCC fast clear for luminance and alpha formats

2017-07-06 Thread Marek Olšák
On Thu, Jul 6, 2017 at 8:24 PM, Andres Gomez wrote: > Marek, would we want this series in -stable or we shouldn't bother ? Don't bother. Patch 1 isn't that important. Other patches are for features not enabled in 17.1. Marek ___ mesa-dev mailing list m

Re: [Mesa-dev] [PATCH 09/19] radeonsi: add basic memory object support

2017-07-06 Thread Andres Rodriguez
On 2017-07-04 12:39 PM, Andres Rodriguez wrote: On 2017-07-04 09:30 AM, Christian König wrote: Am 04.07.2017 um 15:13 schrieb Nicolai Hähnle: On 01.07.2017 01:03, Andres Rodriguez wrote: From: Dave Airlie Signed-off-by: Andres Rodriguez --- src/gallium/drivers/radeon/r600_pipe_common.

[Mesa-dev] [PATCH] radv/ac: drop setting xnack

2017-07-06 Thread Dave Airlie
From: Dave Airlie Since radv uses compute rings and we can't know when we are setting up the shaders what ring they are to be used on, we should just use the default xnack setting. This may be suboptimal in some places, but if we hit a problem, we likely should try and address this between llvm a

Re: [Mesa-dev] [PATCH 0/6] radv: Rewrite local & shared variable handling

2017-07-06 Thread Alex Smith
On 6 July 2017 at 22:20, Connor Abbott wrote: > On Thu, Jul 6, 2017 at 12:48 PM, Connor Abbott > wrote: >> From: Connor Abbott >> >> This series grew out of trying to get rid of the copy-n-pasted index >> calculation code in radv's NIR-to-LLVM path, in particular in >> radv_get_deref_offset(). I

Re: [Mesa-dev] [PATCH] radv/ac: drop setting xnack

2017-07-06 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Fri, Jul 7, 2017 at 12:10 AM, Dave Airlie wrote: > From: Dave Airlie > > Since radv uses compute rings and we can't know when we are setting > up the shaders what ring they are to be used on, we should just use > the default xnack setting. This may be suboptima

Re: [Mesa-dev] [PATCH 6/6] radv: don't lower indirect derefs

2017-07-06 Thread Bas Nieuwenhuizen
On Thu, Jul 6, 2017 at 9:50 PM, Connor Abbott wrote: > From: Connor Abbott > > Radeonsi doesn't either. As of the last commit, these should be handled > properly as long as LLVM has scratch support. We also should use > nir_lower_io_to_temporaries() for inputs instead of generating an > if-ladder

Re: [Mesa-dev] [PATCH 2/6] nir/lower_io_to_temporaries: don't set compact on shadow vars

2017-07-06 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Thu, Jul 6, 2017 at 12:48 PM, Connor Abbott wrote: > From: Connor Abbott > > The compact flag doesn't make sense on local variables, since the > packing on them is up to the driver. This fixes nir_validate assertions > in some cases, particularly when lower_io_to

Re: [Mesa-dev] [PATCH 2/2] ac/nir: Fix ordering of parameters for image atomic cmpswap intrinsics

2017-07-06 Thread Bas Nieuwenhuizen
Thanks! Pushed and cc'd it to stable. Not pushing the first patch as I assume that is superseded by Connors patches. On Fri, Jun 30, 2017 at 12:15 PM, Alex Smith wrote: > The NIR parameters are ordered "compare, data", matching GLSL, but both > the image and buffer LLVM intrinsics take them the

Re: [Mesa-dev] [PATCH] etnaviv: fix refcnt initialization in etna_screen

2017-07-06 Thread Aleksander Morgado
On Thu, Jul 6, 2017 at 11:18 PM, Aleksander Morgado wrote: > Despite being a member of the etna_screen struct, 'refcnt' is used by > the winsys-specific logic to track the reference count of the object > managed in a hash table. When the count reaches zero, the pipe screen > is removed from the ta

[Mesa-dev] [Bug 101712] CPU lockup after ring 0 stalled

2017-07-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=101712 Bug ID: 101712 Summary: CPU lockup after ring 0 stalled Product: Mesa Version: unspecified Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity:

[Mesa-dev] [Bug 101712] CPU lockup after ring 0 stalled

2017-07-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=101712 guiscara...@gmail.com changed: What|Removed |Added Priority|medium |high --- Comment #1 from guiscar

[Mesa-dev] [Bug 101712] CPU lockup after ring 0 stalled

2017-07-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=101712 --- Comment #2 from guiscara...@gmail.com --- Created attachment 132488 --> https://bugs.freedesktop.org/attachment.cgi?id=132488&action=edit DSMEG (more detailed log) Here it is a more detailed log -- You are receiving this mail because: Yo

Re: [Mesa-dev] [PATCH 3/3] mesa: fix glPrimitiveRestartNV crash inside a render list.

2017-07-06 Thread Brian Paul
Thanks for the patches, Olivier! I'm a bit short on time, but I'll test/commit them ASAP. I'll take a closer look at the VBO issue too. -Brian On 07/06/2017 09:45 AM, Olivier Lauffenburger wrote: glPrimitiveRestartNV crashes when it is called during the compilation of a render list. There

[Mesa-dev] [PATCH 1/1] drm/i915: Version the MOCS settings

2017-07-06 Thread Ben Widawsky
From: Ben Widawsky Starting with GEN9, Memory Object Control State (MOCS) becomes an index into a table as opposed to the direct programming within the command. The table has 62 usable entries (ie 6 bits can represent all settings), and each buffer type may use one of these 62 entries to describe

[Mesa-dev] [Bug 101703] No stencil buffer allocated when requested by GLUT

2017-07-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=101703 Brian Paul changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Mesa-dev] [PATCH 2/3] intel: Merge latest i915 uapi

2017-07-06 Thread Ben Widawsky
Signed-off-by: Ben Widawsky --- src/intel/drm/i915_drm.h | 8 1 file changed, 8 insertions(+) diff --git a/src/intel/drm/i915_drm.h b/src/intel/drm/i915_drm.h index c26bf7c125..69e38ce89f 100644 --- a/src/intel/drm/i915_drm.h +++ b/src/intel/drm/i915_drm.h @@ -431,6 +431,14 @@ typedef s

[Mesa-dev] [PATCH 3/3] intel: Make driver aware of MOCS table version

2017-07-06 Thread Ben Widawsky
We don't yet have optimal MOCS settings, but we have enough to know how to at least determine when we might have non-optimal settings within our driver. Signed-off-by: Ben Widawsky --- src/intel/vulkan/anv_device.c | 12 src/intel/vulkan/anv_private.h| 2 ++

[Mesa-dev] [PATCH 0/3] MOCS versioning

2017-07-06 Thread Ben Widawsky
Copying the kernel commit message: Starting with GEN9, Memory Object Control State (MOCS) becomes an index into a table as opposed to the direct programming within the command. The table has 62 usable entries (ie 6 bits can represent all settings), and each buffer type may use one of these 62 entr

[Mesa-dev] [PATCH 01/20] nir: Add intrinsics from ARB_shader_group_vote

2017-07-06 Thread Matt Turner
These are intrinsics rather than opcodes, because they operate across channels. --- src/compiler/glsl/glsl_to_nir.cpp | 22 ++ src/compiler/nir/nir_intrinsics.h | 5 + 2 files changed, 27 insertions(+) diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/gl

[Mesa-dev] [PATCH 02/20] nir: Add pass to optimize intrinsics

2017-07-06 Thread Matt Turner
Specifically, constant fold intrinsics from ARB_shader_group_vote, but I suspect it'll be useful for other things in the future. --- src/compiler/Makefile.sources | 1 + src/compiler/nir/nir.h| 2 + src/compiler/nir/nir_opt_intrinsics.c | 102 +++

[Mesa-dev] [PATCH 04/20] i965/vec4: Lower ARB_shader_group_vote intrinsics

2017-07-06 Thread Matt Turner
I don't expect anyone is going to care about using this in vec4 programs (vertex/tessellation/geometry on Gen6/7), no one has come up with a good way to implement it much less test it. --- src/intel/compiler/brw_compiler.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/intel/compiler/b

[Mesa-dev] [PATCH 03/20] nir: Support lowering vote intrinsics

2017-07-06 Thread Matt Turner
... trivially (as allowed by the spec!) by reusing the existing nir_opt_intrinsics code. --- src/compiler/nir/nir.h| 4 src/compiler/nir/nir_opt_intrinsics.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/ni

[Mesa-dev] [PATCH 05/20] i965/fs: Handle explicit flag destinations in flags_written()

2017-07-06 Thread Matt Turner
The implementations of the ARB_shader_group_vote intrinsics will explicitly write the flag as the destination register. --- src/intel/compiler/brw_fs.cpp | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp

[Mesa-dev] [PATCH 06/20] i965/fs: Implement ARB_shader_group_vote operations

2017-07-06 Thread Matt Turner
--- src/intel/compiler/brw_fs_nir.cpp | 36 1 file changed, 36 insertions(+) diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp index a9dce42c38..264398f38e 100644 --- a/src/intel/compiler/brw_fs_nir.cpp +++ b/src/intel/compile

[Mesa-dev] [PATCH 11/20] i965/fs: Allow emit_uniformize() to broadcast a specific channel

2017-07-06 Thread Matt Turner
This function will be used to implement read_invocation (by specifying a specific channel) and read_first_invocation (by not specifying a channel). --- src/intel/compiler/brw_fs_builder.h | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/intel/compiler/brw_fs_builder

[Mesa-dev] [PATCH 10/20] nir: Add pass to scalarize read_invocation/read_first_invocation

2017-07-06 Thread Matt Turner
i965 will want these to be scalar operations. --- src/compiler/Makefile.sources | 1 + src/compiler/nir/nir.h | 2 +- .../nir/nir_lower_read_invocation_to_scalar.c | 112 + 3 files changed, 114 insertions(+), 1 deletion(

  1   2   >