Re: [Mesa-dev] [PATCH mesa] egl/dri3: implement query surface hook

2017-03-01 Thread Tapani Pälli
On 02/27/2017 03:42 PM, Emil Velikov wrote: On 27 February 2017 at 05:53, Tapani Pälli wrote: This is a DRI3 version of a change made for DRI2 (4d6d4f939e0af4252e0b, "egl/dri2: implement query surface hook"), that fixed failures in dEQP-EGL.functional.resize.surface_size.grow and dEQP-EGL.fu

Re: [Mesa-dev] [PATCH 1/2] isl: document the meaning of the array_len field in isl_view

2017-03-01 Thread Jason Ekstrand
Rb On Feb 23, 2017 11:40 PM, "Iago Toral Quiroga" wrote: > --- > src/intel/isl/isl.h | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h > index c340e6a..e6e9459 100644 > --- a/src/intel/isl/isl.h > +++ b/src/intel/isl/isl.h > @@ -934,6 +934,

Re: [Mesa-dev] [PATCH 2/2 v2] anv: do not subtract the base layer to compute depth in 3DSTATE_DEPTH_BUFFER

2017-03-01 Thread Jason Ekstrand
Reviewed-by: Jason Ekstrand On Mar 1, 2017 11:16 PM, "Iago Toral Quiroga" wrote: > According to the PRM description of the Depth field: > > "This field specifies the total number of levels for a volume texture >or the number of array elements allowed to be accessed starting at the >Mi

Re: [Mesa-dev] [PATCH 2/4] util/disk_cache: compress individual cache entries

2017-03-01 Thread Tobias Droste
Hi Timothy, if you plan to support multiple compression algorithms, shouldn't "struct cache_entry_file_data" contain some info about what compression algorithm was used to compress the data? Or is this already there and I missed it? Am Donnerstag, 2. März 2017, 03:20:05 CET schrieb Matt Turner:

Re: [Mesa-dev] [PATCH 2/2] anv: do not subtract the base layer to copute depth in 3DSTATE_DEPTH_BUFFER

2017-03-01 Thread Iago Toral
On Wed, 2017-03-01 at 11:39 -0800, Jason Ekstrand wrote: > On Tue, Feb 28, 2017 at 11:33 PM, Iago Toral > wrote: > > On Fri, 2017-02-24 at 07:25 -0800, Jason Ekstrand wrote: > > > On Feb 23, 2017 11:40 PM, "Iago Toral Quiroga" > > > > > wrote: > > > According to the PRM description of the Depth f

[Mesa-dev] [PATCH 2/2 v2] anv: do not subtract the base layer to compute depth in 3DSTATE_DEPTH_BUFFER

2017-03-01 Thread Iago Toral Quiroga
According to the PRM description of the Depth field: "This field specifies the total number of levels for a volume texture or the number of array elements allowed to be accessed starting at the Minimum Array Element for arrayed surfaces" However, ISL defines array_len as the length of the

Re: [Mesa-dev] [PATCH mesa 4/5] egl: add assert on the max length of the extension string

2017-03-01 Thread Tapani Pälli
On 03/02/2017 01:31 AM, Eric Engestrom wrote: Signed-off-by: Eric Engestrom --- src/egl/main/eglapi.c | 4 1 file changed, 4 insertions(+) diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 274dcde01d..2d7077f88b 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.

Re: [Mesa-dev] [PATCH mesa 2/5] egl: take new string into account when checking for overflow

2017-03-01 Thread Tapani Pälli
Maybe squash this together with patch 1? On 03/02/2017 01:31 AM, Eric Engestrom wrote: Otherwise the check would detect that the previous append() resulted in a buffer overflow, which would not even be caught if the last extension in the string is the one that goes over (which is likely). Signe

[Mesa-dev] [PATCH] i965: Assert that the binding table isn't bigger than surf_offsets

2017-03-01 Thread Jason Ekstrand
We used to have an assert in mark_surface_used to protect us from this but it's gone now. Instead, we'll assert right before we try to memcpy the contents of surf_offset into the binding table. --- src/mesa/drivers/dri/i965/brw_binding_tables.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [Mesa-dev] [PATCH 1/2] util/disk_cache: support caches for multiple architectures

2017-03-01 Thread Timothy Arceri
On 02/03/17 17:17, Ilia Mirkin wrote: On Thu, Mar 2, 2017 at 1:08 AM, Timothy Arceri wrote: Previously we were deleting the entire cache if a user switched between 32 and 64 bit applications. --- src/util/disk_cache.c | 21 + 1 file changed, 21 insertions(+) diff --git a

Re: [Mesa-dev] [PATCH 1/2] util/disk_cache: support caches for multiple architectures

2017-03-01 Thread Ilia Mirkin
On Thu, Mar 2, 2017 at 1:17 AM, Ilia Mirkin wrote: > On Thu, Mar 2, 2017 at 1:08 AM, Timothy Arceri wrote: >> Previously we were deleting the entire cache if a user switched >> between 32 and 64 bit applications. >> --- >> src/util/disk_cache.c | 21 + >> 1 file changed, 21 i

Re: [Mesa-dev] [PATCH 1/2] util/disk_cache: support caches for multiple architectures

2017-03-01 Thread Ilia Mirkin
On Thu, Mar 2, 2017 at 1:08 AM, Timothy Arceri wrote: > Previously we were deleting the entire cache if a user switched > between 32 and 64 bit applications. > --- > src/util/disk_cache.c | 21 + > 1 file changed, 21 insertions(+) > > diff --git a/src/util/disk_cache.c b/src/u

[Mesa-dev] [PATCH 2/2] docs: update envvars.html to reflect having a cache per arch

2017-03-01 Thread Timothy Arceri
--- docs/envvars.html | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/envvars.html b/docs/envvars.html index 9f1f708..aa56cd1 100644 --- a/docs/envvars.html +++ b/docs/envvars.html @@ -112,21 +112,24 @@ glGetString(GL_VERSION) for OpenGL ES. MESA_GLSL_VERSION_OVERRI

[Mesa-dev] [PATCH 1/2] util/disk_cache: support caches for multiple architectures

2017-03-01 Thread Timothy Arceri
Previously we were deleting the entire cache if a user switched between 32 and 64 bit applications. --- src/util/disk_cache.c | 21 + 1 file changed, 21 insertions(+) diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c index 3abdec4..1a91c69 100644 --- a/src/util/disk_c

[Mesa-dev] [PATCH 0.5/7] intel/tools: Use a makefile included from intel/Makefile.am

2017-03-01 Thread Jason Ekstrand
--- src/Makefile.am| 4 -- src/intel/Makefile.am | 2 + src/intel/{tools/Makefile.am => Makefile.tools.am} | 52 +++--- 3 files changed, 17 insertions(+), 41 deletions(-) rename src/intel/{tools/Makefile.am => Make

[Mesa-dev] [Bug 68504] 9.2-rc1 workaround for clover build failure on ppc/altivec: cannot convert 'bool' to '__vector(4) __bool int' in return

2017-03-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=68504 Matt Turner changed: What|Removed |Added Assignee|mesa-dev@lists.freedesktop. |matts...@gmail.com |org

[Mesa-dev] [PATCH] clover: Work around build failure with AltiVec.

2017-03-01 Thread Matt Turner
Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=587210 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68504 --- A similar patch was sent three and a half years ago. [1] Curro expressed a concern about changing to a GNU C++ dialect and suggested disabling AltiVec code generation for Clove

Re: [Mesa-dev] [PATCH 2/4] i965: Delete vestiges of resource streamer code.

2017-03-01 Thread Jason Ekstrand
Fine by me. All four are Reviewed-by: Jason Ekstrand On Wed, Mar 1, 2017 at 6:56 PM, Kenneth Graunke wrote: > We never actually used the resource streamer in any shipping build > of Mesa. We have no plans to do so in the future. We looked into > using it in Vulkan, and concluded that it was

[Mesa-dev] [PATCH 6/7] anv/wsi: Don't include wayland-drm-client-protocol.h

2017-03-01 Thread Jason Ekstrand
--- src/intel/vulkan/anv_wsi_wayland.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/intel/vulkan/anv_wsi_wayland.c b/src/intel/vulkan/anv_wsi_wayland.c index 5d49671..690fd30 100644 --- a/src/intel/vulkan/anv_wsi_wayland.c +++ b/src/intel/vulkan/anv_wsi_wayland.c @@ -22,7 +22,6 @@ */

[Mesa-dev] [PATCH 7/7] intel/vulkan: Get rid of recursive make

2017-03-01 Thread Jason Ekstrand
Admittedly, it's actually rather painful give how many different bits we have to build, to set LDADD, CFLAGS, CPPFLAGS, etc for each one. --- src/Makefile.am | 5 -- src/intel/Makefile.am| 8 ++ src/intel/Makefile.sources | 65 ++ src/intel/Makefile.vulkan.a

[Mesa-dev] [PATCH 5/7] anv: stop including brw_context.h

2017-03-01 Thread Jason Ekstrand
--- src/intel/vulkan/anv_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index f148b35..c7c7170 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -63,9 +63,9 @@ struct ge

[Mesa-dev] [PATCH 2/7] vulkan: Build common Vulkan code earlier

2017-03-01 Thread Jason Ekstrand
--- src/Makefile.am | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 7001528..a558755 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -75,6 +75,11 @@ endif # include only conditionally ? SUBDIRS += compiler +if HAVE_VU

[Mesa-dev] [PATCH 4/7] intel/isl: Stop linking libi965_compiler.la into tests

2017-03-01 Thread Jason Ekstrand
--- src/intel/Makefile.isl.am | 1 - 1 file changed, 1 deletion(-) diff --git a/src/intel/Makefile.isl.am b/src/intel/Makefile.isl.am index 5a317f5..ee2215d 100644 --- a/src/intel/Makefile.isl.am +++ b/src/intel/Makefile.isl.am @@ -74,7 +74,6 @@ TESTS += $(check_PROGRAMS) isl_tests_isl_surf_get_

[Mesa-dev] [PATCH 1/7] vulkan/wsi: Generate wayland protocol headers separately from EGL

2017-03-01 Thread Jason Ekstrand
Previously, we were depending on EGL for generating the headers and providing the protocol symbols. However, since neither Vulkan driver actually wants to link against EGL, this is kind-of pointless. It also creates a weird build dependency. --- src/amd/vulkan/Makefile.am | 3 --- src/

[Mesa-dev] [PATCH 0/7] intel: Use non-recursive make for vulkan

2017-03-01 Thread Jason Ekstrand
This series applies on top of a patch that move the i965 back-end compiler to src/intel/compiler. I don't expect to actually push this for a while but at least we now have the patches. This gives Emil and others a chance to provide review feedback. Jason Ekstrand (7): vulkan/wsi: Generate wayl

[Mesa-dev] [PATCH 3/7] anv/tests: Use a relative include path for anv_private.h

2017-03-01 Thread Jason Ekstrand
--- src/intel/vulkan/tests/block_pool_no_free.c| 2 +- src/intel/vulkan/tests/state_pool.c| 2 +- src/intel/vulkan/tests/state_pool_free_list_only.c | 2 +- src/intel/vulkan/tests/state_pool_no_free.c| 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --g

Re: [Mesa-dev] [PATCH 2/2] svga: fix crash regression since e027935a795

2017-03-01 Thread Charmaine Lee
Change series looks good. Reviewed-by: Charmaine Lee From: Brian Paul Sent: Wednesday, March 1, 2017 6:45:54 PM To: mesa-dev@lists.freedesktop.org Cc: Charmaine Lee; Neha Bhende Subject: [PATCH 2/2] svga: fix crash regression since e027935a795 During th

[Mesa-dev] [PATCH] swr: Fix crash in swr_update_derived following st/mesa state changes.

2017-03-01 Thread Bruce Cherniak
Recent change to st/mesa state update logic caused major regressions to swr validation code. swr uses the same validation logic (swr_update_derived) for both draw and Clear calls. New st/mesa state update logic results in certain state objects not being set/bound during Clear. This was causing n

Re: [Mesa-dev] Mesa 17.0.1 release candidate

2017-03-01 Thread Michel Dänzer
On 02/03/17 03:35 AM, Emil Velikov wrote: > Hello list, > > The candidate for the Mesa 17.0.1 is now available. Currently we have: > - 60 queued > - 9 nominated (outstanding) > - and 0 rejected patch(es) > > > The current queue consists of: > > On the GLX/EGL front we have a GLVND fix for "T

[Mesa-dev] [Bug 100028] Mesa 17+llvm 4.0.0rc2 fail to compile

2017-03-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=100028 --- Comment #1 from Michel Dänzer --- https://cgit.freedesktop.org/mesa/mesa/commit/?id=0f53404565b9ef9da9d7022b5732463acd496742 fixes this. -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for t

Re: [Mesa-dev] [PATCH] vulkan/wsi: Improve the DRI3 error message

2017-03-01 Thread Jason Ekstrand
Pushed On Tue, Feb 28, 2017 at 8:30 PM, Jacob Lifshay wrote: > This commit improves the message by telling them that they could probably > enable DRI3. More importantly, it includes a little heuristic to check > to see if we're running on AMD or NVIDIA's proprietary X11 drivers and, > if we are

[Mesa-dev] [PATCH 3/4] i965: Make a devinfo local variable.

2017-03-01 Thread Kenneth Graunke
screen->devinfo.gen is annoying to type and linewrap. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/intel_screen.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/

[Mesa-dev] [PATCH 2/4] i965: Delete vestiges of resource streamer code.

2017-03-01 Thread Kenneth Graunke
We never actually used the resource streamer in any shipping build of Mesa. We have no plans to do so in the future. We looked into using it in Vulkan, and concluded that it was unusable. We're not the only ones to arrive at the conclusion that it's not worth using. So, drop the last vestiges o

[Mesa-dev] [PATCH 4/4] i965: Return NULL from initScreen2, not false.

2017-03-01 Thread Kenneth Graunke
This returns a pointer, not a boolean. No actual effect, but cleaner. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/intel_screen.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/int

[Mesa-dev] [PATCH 1/4] i965: Drop duplicate #defines now that we've bumped libdrm requirements.

2017-03-01 Thread Kenneth Graunke
We've updated our libdrm requirement, and it will already provide these. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/intel_batchbuffer.c | 5 - src/mesa/drivers/dri/i965/intel_screen.c | 8 2 files changed, 13 deletions(-) diff --git a/src/mesa/drivers/dri/i96

[Mesa-dev] Any updates on threaded GL dispatch?

2017-03-01 Thread Dieter Nützel
Hello Gregory and Marek, are there any updates on threaded GL dispatch? I mean this: [-] As a quick summary: * there are now only 2 minors fail on piglit with my latest patches (sent to Marek) * I have a pending patch to allow asynchronous PBO transfer * Now that piglit is crash free I will

[Mesa-dev] [Bug 100028] Mesa 17+llvm 4.0.0rc2 fail to compile

2017-03-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=100028 Bug ID: 100028 Summary: Mesa 17+llvm 4.0.0rc2 fail to compile Product: Mesa Version: 17.0 Hardware: Other OS: All Status: NEW Severity: normal

[Mesa-dev] [PATCH 2/2] svga: fix crash regression since e027935a795

2017-03-01 Thread Brian Paul
During the first update of the hw_clear_state atoms, we may not yet have a current rasterizer state object. So, svga->curr.rast may be NULL and we crash. Add a few null pointer checks to work around this. Note that these are only needed in the state update functions which are called for 'clear'

[Mesa-dev] [PATCH 1/2] svga: s/unsigned/pipe_prim_type/

2017-03-01 Thread Brian Paul
And add some default switch cases to silence compiler warnings. --- src/gallium/drivers/svga/svga_context.h | 2 +- src/gallium/drivers/svga/svga_pipe_draw.c | 2 +- src/gallium/drivers/svga/svga_state_framebuffer.c | 3 +++ src/gallium/drivers/svga/svga_swtnl_state.c | 3 +

Re: [Mesa-dev] [PATCH] nir/builder: Add an int46 immediate helper

2017-03-01 Thread Jason Ekstrand
On Wed, Mar 1, 2017 at 6:10 PM, Ilia Mirkin wrote: > Probably meant int64 in the subject? (I was all excited to read about > this new cool int46 type...) > Yes. I've fixed it locally. Sorry to disappoint. > On Wed, Mar 1, 2017 at 7:57 PM, Jason Ekstrand > wrote: > > --- > > src/compiler/ni

Re: [Mesa-dev] [PATCH 2/4] util/disk_cache: compress individual cache entries

2017-03-01 Thread Matt Turner
On Wed, Mar 1, 2017 at 2:19 PM, Timothy Arceri wrote: > IMO we should go with zlib and people can provide future patches with > justifications/stats for using a different library over zlib just like we do > for any other performance based patch. Yes, agreed. "Which compression should we use?" is

Re: [Mesa-dev] [PATCH] nir/builder: Add an int46 immediate helper

2017-03-01 Thread Ilia Mirkin
Probably meant int64 in the subject? (I was all excited to read about this new cool int46 type...) On Wed, Mar 1, 2017 at 7:57 PM, Jason Ekstrand wrote: > --- > src/compiler/nir/nir_builder.h | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/src/compiler/nir/nir_builder.h b/s

Re: [Mesa-dev] [PATCH] mesa: Use _mesa_has_OES_geometry_shader() when validating draws

2017-03-01 Thread Ilia Mirkin
On Wed, Mar 1, 2017 at 8:47 PM, Tomasz Figa wrote: > Hi, > > On Fri, Feb 24, 2017 at 9:38 AM, Tomasz Figa wrote: >> On Fri, Feb 24, 2017 at 5:00 AM, Kenneth Graunke >> wrote: >>> >>> On Thursday, February 23, 2017 10:46:54 AM PST Ilia Mirkin wrote: >>> > The assumption was that if you're setting

Re: [Mesa-dev] [PATCH] mesa: Use _mesa_has_OES_geometry_shader() when validating draws

2017-03-01 Thread Tomasz Figa
Hi, On Fri, Feb 24, 2017 at 9:38 AM, Tomasz Figa wrote: > On Fri, Feb 24, 2017 at 5:00 AM, Kenneth Graunke > wrote: >> >> On Thursday, February 23, 2017 10:46:54 AM PST Ilia Mirkin wrote: >> > The assumption was that if you're setting that ext, you can do gles31. >> > Is >> > there a driver/hw c

[Mesa-dev] [PATCH V2] util/disk_cache: compress individual cache entries

2017-03-01 Thread Timothy Arceri
This reduces the cache size for Deus Ex from ~160M to ~30M for radeonsi. I'm also seeing the following improvements in minimum fps in the Shadow of Mordor benchmark: no-cache:~10fps with-cache-no-compression: ~15fps with-cache-and-compression: ~20fps Note the with cache re

[Mesa-dev] [PATCH V2] util/disk_cache: add support for detecting corrupt cache entries

2017-03-01 Thread Timothy Arceri
V2: fix pointer increments for writing/reading crc --- src/util/disk_cache.c | 37 ++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c index f5e1145..f8e9948 100644 --- a/src/util/disk_cache.c +++ b/src/

Re: [Mesa-dev] [PATCH 1/4] util/disk_cache: add support for detecting corrupt cache entries

2017-03-01 Thread Timothy Arceri
On 02/03/17 11:00, Timothy Arceri wrote: On 01/03/17 23:58, Grazvydas Ignotas wrote: On Wed, Mar 1, 2017 at 7:25 AM, Timothy Arceri wrote: --- src/util/disk_cache.c | 37 ++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/src/util/disk_cac

[Mesa-dev] [PATCH] nir/builder: Add an int46 immediate helper

2017-03-01 Thread Jason Ekstrand
--- src/compiler/nir/nir_builder.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h index 2eaa025..1dc56eb 100644 --- a/src/compiler/nir/nir_builder.h +++ b/src/compiler/nir/nir_builder.h @@ -253,6 +253,17 @@ nir_imm_i

[Mesa-dev] [PATCH RFC] clover: clone pipe-resource if root-buffer already exists

2017-03-01 Thread Jan Vesely
Fixes cl-api-enqueue-read_write-buffer on carrizo+topaz machine Signed-off-by: Jan Vesely --- I'm not sure if cloning is the right thigh to do. Should we copy the pointer and increase ref count instead? PS: the assert did not trigger despite building mesa with --enable-debug Jan src/gallium/s

Re: [Mesa-dev] [PATCH v2 18/18] anv/image: Allow HiZ on input attachment-capable depth/stencil images

2017-03-01 Thread Jason Ekstrand
I didn't re-read every patch, just the ones I made comments on. Assuming only the commented patches made real changes, the series is Reviewed-by: Jason Ekstrand I really like the direction things are going. On Wed, Mar 1, 2017 at 2:30 PM, Nanley Chery wrote: > While an input attachment may o

Re: [Mesa-dev] [PATCH 2/2] gallivm, ac: add function attributes at call sites instead of declarations

2017-03-01 Thread Mike Lothian
Hi I think this patch is causing build problems for me /var/tmp/portage/media-libs/mesa-/work/mesa-/src/amd/common/ac_nir_to_llvm.c: In function ‘create_llvm_function’: /var/tmp/portage/media-libs/mesa-/work/mesa-/src/amd/common/ac_nir_to_llvm.c:265:4: error: implicit declaration

Re: [Mesa-dev] [PATCH v2 04/18] anv: Update the HiZ sampling helper

2017-03-01 Thread Jason Ekstrand
On Wed, Mar 1, 2017 at 2:30 PM, Nanley Chery wrote: > Validate the inputs, verify that this image has a depth > buffer, use gen_device_info instead of > > v2: > - Add parenthesis (Jason Ekstrand) > - Make parameters const > I don't really get why everything needs to be const but it also doesn't

[Mesa-dev] [PATCH v2] mesa: Avoid read of uninitialized variable

2017-03-01 Thread Robert Foss
The is_color_attachement variable is later read when handling two separate error cases, where only one of the cases results in the variable being initialized. This can be avoided by giving the variable a safe default value. Coverity-Id: 1398631 Signed-off-by: Robert Foss Reviewed-by: Ilia Mirkin

Re: [Mesa-dev] [PATCH 3/4] radeonsi: add support for an on-disk shader cache

2017-03-01 Thread Timothy Arceri
On 02/03/17 10:33, Axel Davy wrote: On 02/03/2017 00:27, Timothy Arceri wrote: On 01/03/17 18:36, Axel Davy wrote: My understanding of the code is that the disk cache just depends on the sscreen->b.disk_shader_cache being initialized, and it looks like this is always initialized. Thus the d

Re: [Mesa-dev] [PATCH 1/4] util/disk_cache: add support for detecting corrupt cache entries

2017-03-01 Thread Timothy Arceri
On 01/03/17 23:58, Grazvydas Ignotas wrote: On Wed, Mar 1, 2017 at 7:25 AM, Timothy Arceri wrote: --- src/util/disk_cache.c | 37 ++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c index f5e1145..

[Mesa-dev] [PATCH mesa 1/5] egl: move assert *before* the buffer overflow

2017-03-01 Thread Eric Engestrom
Signed-off-by: Eric Engestrom --- src/egl/main/eglapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 5694b5a4ca..d964b4d289 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -470,8 +470,8 @@ _eglCreateExten

[Mesa-dev] [PATCH mesa 5/5] egl: remove space at the end of extension string

2017-03-01 Thread Eric Engestrom
Signed-off-by: Eric Engestrom --- src/egl/main/eglapi.c | 4 1 file changed, 4 insertions(+) diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 2d7077f88b..a7a1976535 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -529,6 +529,10 @@ _eglCreateExtensionsString

[Mesa-dev] [PATCH mesa 3/5] egl: add note about checking the extension string length

2017-03-01 Thread Eric Engestrom
The current string uses up to 910/1000 chars, so a couple more extensions will bring it over, but would go unnoticed if not tested with all extensions active. Signed-off-by: Eric Engestrom --- src/egl/main/eglapi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/egl/ma

[Mesa-dev] [PATCH mesa 2/5] egl: take new string into account when checking for overflow

2017-03-01 Thread Eric Engestrom
Otherwise the check would detect that the previous append() resulted in a buffer overflow, which would not even be caught if the last extension in the string is the one that goes over (which is likely). Signed-off-by: Eric Engestrom --- src/egl/main/eglapi.c | 3 ++- 1 file changed, 2 insertions

[Mesa-dev] [PATCH mesa 4/5] egl: add assert on the max length of the extension string

2017-03-01 Thread Eric Engestrom
Signed-off-by: Eric Engestrom --- src/egl/main/eglapi.c | 4 1 file changed, 4 insertions(+) diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 274dcde01d..2d7077f88b 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -467,6 +467,7 @@ _eglAppendExtension(char **

Re: [Mesa-dev] [PATCH 3/4] radeonsi: add support for an on-disk shader cache

2017-03-01 Thread Axel Davy
On 02/03/2017 00:27, Timothy Arceri wrote: On 01/03/17 18:36, Axel Davy wrote: My understanding of the code is that the disk cache just depends on the sscreen->b.disk_shader_cache being initialized, and it looks like this is always initialized. Thus the disk cache is always enabled. Could you

[Mesa-dev] [PATCH] nir/int64: Properly handle imod/irem

2017-03-01 Thread Jason Ekstrand
The previous implementation was fine for GLSL which doesn't really have a signed modulus/remainder. They just leave the behavior undefined whenever either source is negative. However, in SPIR-V, there is a defined behavior for negative arguments. This commit beefs up the pass so that it handles

Re: [Mesa-dev] [PATCH 1/4] util/disk_cache: add support for detecting corrupt cache entries

2017-03-01 Thread Timothy Arceri
On 01/03/17 23:58, Grazvydas Ignotas wrote: On Wed, Mar 1, 2017 at 7:25 AM, Timothy Arceri wrote: --- src/util/disk_cache.c | 37 ++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c index f5e1145..

Re: [Mesa-dev] [PATCH 3/4] radeonsi: add support for an on-disk shader cache

2017-03-01 Thread Timothy Arceri
On 01/03/17 18:36, Axel Davy wrote: My understanding of the code is that the disk cache just depends on the sscreen->b.disk_shader_cache being initialized, and it looks like this is always initialized. Thus the disk cache is always enabled. Could you add a RADEON_DEBUG env var to disable it, p

Re: [Mesa-dev] [PATCH] Mesa: Fix performance query id check

2017-03-01 Thread Robert Bragg
Since seeing that I had indeed sent out a v2 patch and it was reviewed by Plamena too (thanks) I've just gone a head and pushed that now (though with an updated commit message instead of copy pasting the original message). Thanks, - Robert On Mon, Feb 27, 2017 at 3:43 PM, Robert Bragg wrote: >

Re: [Mesa-dev] [PATCH] amd/common: Fix build with new ac_add_function_attr()

2017-03-01 Thread Tobias Klausmann
This patch was never intended to fix the warnings, only the build error. If you care to enough to fix the rest, patches are always welcome! Greetings, Tobias On 01.03.17 23:55, Mike Lothian wrote: I can confirm this fixes the build for me But I still get warnings: /var/tmp/portage/media-l

Re: [Mesa-dev] [PATCH v1] mesa: Avoid read of uninitialized variable

2017-03-01 Thread Anuj Phogat
On Wed, Mar 1, 2017 at 2:34 PM, Robert Foss wrote: > The is_color_attachement variable is later read when handling two > separate error cases, where only one of the cases results in the > variable being initialized. > > This can be avoided by giving the variable a safe default value. > > Coverity-

Re: [Mesa-dev] [PATCH v1] mesa: Avoid read of uninitialized variable

2017-03-01 Thread Ilia Mirkin
Sure, why not. In practice, this can never hit, but the cost of making Coverity slightly happier is low. (Hm, or can it hit, with a surfaceless context...) Reviewed-by: Ilia Mirkin On Wed, Mar 1, 2017 at 5:34 PM, Robert Foss wrote: > The is_color_attachement variable is later read when handling

Re: [Mesa-dev] [PATCH] amd/common: Fix build with new ac_add_function_attr()

2017-03-01 Thread Bas Nieuwenhuizen
Pushed, thanks. On Wed, Mar 1, 2017 at 10:16 PM, Tobias Klausmann wrote: > Fix usage of ac_add_function_attr() and make it known! > > common/ac_nir_to_llvm.c: In function 'create_llvm_function': > common/ac_nir_to_llvm.c:265:4: error: implicit declaration of function > 'ac_add_function_attr' [-We

Re: [Mesa-dev] [PATCH] amd/common: Fix build with new ac_add_function_attr()

2017-03-01 Thread Mike Lothian
I can confirm this fixes the build for me But I still get warnings: /var/tmp/portage/media-libs/mesa-/work/mesa-/src/amd/common/ ac_nir_to_llvm.c: In function ‘visit_interp’: /var/tmp/portage/media-libs/mesa-/work/mesa-/src/amd/common/ ac_nir_to_llvm.c:3022:11: warning: ‘location’

[Mesa-dev] [PATCH v1] mesa: Avoid read of uninitialized variable

2017-03-01 Thread Robert Foss
The is_color_attachement variable is later read when handling two separate error cases, where only one of the cases results in the variable being initialized. This can be avoided by giving the variable a safe default value. Coverity-Id: 1398631 Signed-off-by: Robert Foss --- src/mesa/main/fbobj

[Mesa-dev] [PATCH v2 17/18] anv/cmd_buffer: Centralize automatic layout transitions

2017-03-01 Thread Nanley Chery
Signed-off-by: Nanley Chery --- src/intel/vulkan/genX_cmd_buffer.c | 54 +- 1 file changed, 12 insertions(+), 42 deletions(-) diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 50599e9e26..540dd82fd8 100644 --- a/src/in

[Mesa-dev] [PATCH v2 18/18] anv/image: Allow HiZ on input attachment-capable depth/stencil images

2017-03-01 Thread Nanley Chery
While an input attachment may only take on one of those two layouts, other depth/stencil attachments that use the same image may have HiZ-enabled layouts. Improves the average frame rate on a release candidate of a proprietary Vulkan benchmark by 9.94% over 3 runs on my SKL GT4. Signed-off-by: Nan

[Mesa-dev] [PATCH v2 14/18] anv/cmd_buffer: Enable render pass awareness

2017-03-01 Thread Nanley Chery
v2: Update cmd_state_reset (Jason Ekstrand) Signed-off-by: Nanley Chery --- src/intel/vulkan/anv_cmd_buffer.c | 3 +++ src/intel/vulkan/genX_cmd_buffer.c | 7 +++ 2 files changed, 10 insertions(+) diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c index 08e

[Mesa-dev] [PATCH v2 08/18] anv/descriptor_set: Store aux usage of sampled image descriptors

2017-03-01 Thread Nanley Chery
Signed-off-by: Nanley Chery --- src/intel/vulkan/anv_descriptor_set.c | 8 src/intel/vulkan/anv_private.h| 5 + 2 files changed, 13 insertions(+) diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c index 7853ec7dd9..53535a4bcd 100644 -

[Mesa-dev] [PATCH v2 15/18] anv/blorp: Encapsulate subpass id querying

2017-03-01 Thread Nanley Chery
Signed-off-by: Nanley Chery --- src/intel/vulkan/anv_blorp.c | 8 ++-- src/intel/vulkan/anv_private.h | 15 +++ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c index 7472efce6a..d79c5e0e8c 100644 --- a/

[Mesa-dev] [PATCH v2 13/18] anv/pass: Store subpass attachment reference list

2017-03-01 Thread Nanley Chery
We'll loop through this array when performing automatic layout transitions. v2: Adjust formatting of an assignment (Jason Ekstrand) Signed-off-by: Nanley Chery --- src/intel/vulkan/anv_pass.c| 8 ++-- src/intel/vulkan/anv_private.h | 7 +++ 2 files changed, 13 insertions(+), 2 delet

[Mesa-dev] [PATCH v2 06/18] anv/image: Simplify setup of HiZ sampler surface state

2017-03-01 Thread Nanley Chery
Signed-off-by: Nanley Chery --- src/intel/vulkan/anv_image.c | 30 -- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 0c41ed301d..16a60833e0 100644 --- a/src/intel/vulkan/anv_image.c +++

[Mesa-dev] [PATCH v2 09/18] anv/cmd_buffer: Conditionally choose the sampled image surface state

2017-03-01 Thread Nanley Chery
Signed-off-by: Nanley Chery --- src/intel/vulkan/genX_cmd_buffer.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index e5fb60a94f..f7aeefdc71 100644 --- a/src/intel/vulkan/genX_cmd_buffe

[Mesa-dev] [PATCH v2 12/18] anv/pass: Fix size of anv_render_pass:subpass_attachments

2017-03-01 Thread Nanley Chery
Don't allocate space for resolve attachments if the subpass has none. Signed-off-by: Nanley Chery --- src/intel/vulkan/anv_pass.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_pass.c b/src/intel/vulkan/anv_pass.c index 399ccb3970..5bd205d2f0 100644 --

[Mesa-dev] [PATCH v2 11/18] anv: Store the user's VkAttachmentReference

2017-03-01 Thread Nanley Chery
We will be using the image layout. Store the full struct directly from the user. Signed-off-by: Nanley Chery --- src/intel/vulkan/anv_blorp.c | 24 src/intel/vulkan/anv_cmd_buffer.c | 4 ++-- src/intel/vulkan/anv_pass.c| 21 ++--- src/inte

[Mesa-dev] [PATCH v2 03/18] anv/cmd_buffer: Replace layout_to_hiz_usage()

2017-03-01 Thread Nanley Chery
Signed-off-by: Nanley Chery --- src/intel/vulkan/genX_cmd_buffer.c | 72 +++--- 1 file changed, 28 insertions(+), 44 deletions(-) diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 5171e6f587..bec2f6c7bb 100644 --- a/src/in

[Mesa-dev] [PATCH v2 10/18] anv/cmd_buffer: Remove extra resolve for certain depth buffers

2017-03-01 Thread Nanley Chery
Due to recent commits, the sampler now bypasses the auxiliary HiZ buffer when reading from a depth image subresource that is in the general layout. Remove this unneeded resolve. Signed-off-by: Nanley Chery --- src/intel/vulkan/genX_cmd_buffer.c | 71 -- 1 file

[Mesa-dev] [PATCH v2 04/18] anv: Update the HiZ sampling helper

2017-03-01 Thread Nanley Chery
Validate the inputs, verify that this image has a depth buffer, use gen_device_info instead of v2: - Add parenthesis (Jason Ekstrand) - Make parameters const - Use gen_device_info instead of gen - Pass aspect to missed function in transition_depth_buffer Signed-off-by: Nanley Chery --- src/inte

[Mesa-dev] [PATCH v2 16/18] anv/cmd_buffer: Add attachment transitioning functions

2017-03-01 Thread Nanley Chery
This is needed to transition input attachments. Signed-off-by: Nanley Chery --- src/intel/vulkan/genX_cmd_buffer.c | 85 ++ 1 file changed, 85 insertions(+) diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index a9c77cf10e

[Mesa-dev] [PATCH v2 02/18] anv/image: Add anv_layout_to_aux_usage()

2017-03-01 Thread Nanley Chery
This function supersedes layout_to_hiz_usage(). v2: - Don't find the optimal buffer for layout transitions (Jason Ekstrand). - Pass the devinfo instead of the gen (Jason Ekstrand) - Update the function documentation. Signed-off-by: Nanley Chery --- src/intel/vulkan/anv_image.c | 134 +

[Mesa-dev] [PATCH v2 05/18] anv/image: Remove extra dependency on HiZ-specific variable

2017-03-01 Thread Nanley Chery
surf_usage is only useful to image views that may use HiZ buffers. Storage image views don't use HiZ buffers. v2: Update commit message and add an assertion. Fixes: 055ff2ec521 ("anv: Replace anv_image_has_hiz() with ISL_AUX_USAGE_HIZ") Signed-off-by: Nanley Chery --- src/intel/vulkan/anv_image

[Mesa-dev] [PATCH v2 01/18] anv/pass: Avoid accessing attachment array out of bounds

2017-03-01 Thread Nanley Chery
Cc: Signed-off-by: Nanley Chery Reviewed-by: Jason Ekstrand --- src/intel/vulkan/anv_pass.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/intel/vulkan/anv_pass.c b/src/intel/vulkan/anv_pass.c index 2df18260d3..a8b24703bc 100644 --- a/src/intel/v

[Mesa-dev] [PATCH v2 07/18] anv/image: Create an additional surface state for sampling

2017-03-01 Thread Nanley Chery
This will be used to sample a depth input attachment without having to pass through the HiZ buffer. Signed-off-by: Nanley Chery --- src/intel/vulkan/anv_image.c | 22 +- src/intel/vulkan/anv_private.h | 6 ++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git

Re: [Mesa-dev] [PATCH 2/4] util/disk_cache: compress individual cache entries

2017-03-01 Thread Timothy Arceri
On 01/03/17 23:58, Steven Newbury wrote: On Wed, 2017-03-01 at 12:38 +0200, Eero Tamminen wrote: Hi, On 01.03.2017 07:25, Timothy Arceri wrote: This reduces the cache size for Deus Ex from ~160M to ~30M for radeonsi. I'm also seeing the following improvements in minimum fps in the Shadow of M

Re: [Mesa-dev] [PATCH 01/24] i965: Move a couple of #defines from brw_context to brw_compiler

2017-03-01 Thread Anuj Phogat
On Tue, Feb 28, 2017 at 9:03 PM, Jason Ekstrand wrote: > --- > src/mesa/drivers/dri/i965/brw_compiler.h | 16 > src/mesa/drivers/dri/i965/brw_context.h | 18 -- > 2 files changed, 16 insertions(+), 18 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_co

[Mesa-dev] [PATCH] getteximage: avoid to lookup textures with id 0

2017-03-01 Thread Samuel Pitoiset
This fixes the following assertion when the key is 0. main/hash.c:181: _mesa_HashLookup_unlocked: Assertion `key' failed. Fixes: 633c959fae ("getteximage: Return correct error value when texure object is not found") Signed-off-by: Samuel Pitoiset --- src/mesa/main/texgetimage.c | 10 +++---

[Mesa-dev] [PATCH] mesa/main: remove useless check in _mesa_IsSampler()

2017-03-01 Thread Samuel Pitoiset
_mesa_lookup_samplerobj() returns NULL if sampler is 0. Signed-off-by: Samuel Pitoiset --- src/mesa/main/samplerobj.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c index 8a0835a23d..a86e1d62d8 100644 --- a/src/m

Re: [Mesa-dev] [PATCH 05/24] i965: Move assign_common_binding_table_offsets to brw_program

2017-03-01 Thread Anuj Phogat
On Tue, Feb 28, 2017 at 9:03 PM, Jason Ekstrand wrote: > This isn't used by Vulkan and is specific to the way the GL driver > works. There's no reason to have it in common compiler code. Also, it > relies on BRW_MAX_* defines which are defined in brw_context.h > --- > src/mesa/drivers/dri/i965/

[Mesa-dev] [PATCH] amd/common: Fix build with new ac_add_function_attr()

2017-03-01 Thread Tobias Klausmann
Fix usage of ac_add_function_attr() and make it known! common/ac_nir_to_llvm.c: In function 'create_llvm_function': common/ac_nir_to_llvm.c:265:4: error: implicit declaration of function 'ac_add_function_attr' [-Werror=implicit-function-declaration] ac_add_function_attr(main_function, i + 1, A

Re: [Mesa-dev] [PATCH] glsl: remove unecessary flags.q.subroutine_def

2017-03-01 Thread Samuel Pitoiset
Mark, could you try "[PATCH] glsl: fix subroutine mismatch between declarations/definitions" ? It fixes the piglit regression on my side. On 03/01/2017 08:36 PM, Mark Janes wrote: This patch breaks gl45-cts.shader_subroutine.static_subroutine_call. It also breaks piglit.spec.arb_shader_subrou

[Mesa-dev] [PATCH] glsl: fix subroutine mismatch between declarations/definitions

2017-03-01 Thread Samuel Pitoiset
Previously, when q.subroutine was set to 1, a new subroutine declaration was added to the AST, while 0 meant a subroutine definition has been detected by the parser. Thus, setting the q.subroutine flag in both situations is obviously wrong because a new type identifier is added instead of trying t

Re: [Mesa-dev] [PATCH] st/va: Support fractional framerate in misc parameter

2017-03-01 Thread Mark Thompson
On 27/01/17 22:03, Mark Thompson wrote: > Signed-off-by: Mark Thompson > --- > See - this is a > recent addition, but is backwards-compatible. > > Depends on Andy's patch >

Re: [Mesa-dev] [PATCH v4 6/8] nir: Add a simple int64 lowering pass

2017-03-01 Thread Matt Turner
On Sat, Feb 25, 2017 at 1:10 PM, Jason Ekstrand wrote: > The algorithms used by this pass, especially for division, are heavily > based on the work Ian Romanick did for the similar int64 lowering pass > in the GLSL compiler. > > v2: Properly handle vectors > > v3: Get rid of log2_denom stuff. Sin

Re: [Mesa-dev] [PATCH] i965: Move select_clip_planes to brw_vs.c

2017-03-01 Thread Jason Ekstrand
On Wed, Mar 1, 2017 at 12:21 PM, Matt Turner wrote: > On Wed, Mar 1, 2017 at 12:16 PM, Jason Ekstrand > wrote: > > --- > > src/mesa/drivers/dri/i965/brw_shader.cpp | 25 - > > src/mesa/drivers/dri/i965/brw_vs.c | 25 + > > 2 files changed, 2

  1   2   >