[Mesa-dev] [PATCH 2/3] i965/eu: set DF imm value to the source of DIM

2016-07-12 Thread Samuel Iglesias Gonsálvez
According to HSW's PRM, vol02b, the DIM instruction has the following restriction: "Restriction : src0 must be immediate. src0 must specify the :f (F, Float) type encoding but is an immediate 64-bit DF (Double Float) value. dst must have type DF." This commit allows to upload the immediate 64-bit

[Mesa-dev] [PATCH 3/3] i965/fs: emit DIM instruction to load 64-bit immediates in HSW

2016-07-12 Thread Samuel Iglesias Gonsálvez
Signed-off-by: Samuel Iglesias Gonsálvez --- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 12 1 file changed, 12 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index a65c273..bf32dfd 100644 --- a/src/mesa/drivers/dri/i96

[Mesa-dev] [PATCH 1/3] i965: enable the emission of the DIM instruction

2016-07-12 Thread Samuel Iglesias Gonsálvez
Signed-off-by: Samuel Iglesias Gonsálvez --- src/mesa/drivers/dri/i965/brw_defines.h | 2 +- src/mesa/drivers/dri/i965/brw_eu.c | 2 +- src/mesa/drivers/dri/i965/brw_eu.h | 1 + src/mesa/drivers/dri/i965/brw_eu_emit.c | 1 + src/mesa/drivers/dri/i965/

[Mesa-dev] [Bug 96897] [opencl] clpeak hangs during compilation

2016-07-12 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=96897 Michel Dänzer changed: What|Removed |Added Assignee|dri-devel@lists.freedesktop |mesa-dev@lists.freedesktop.

[Mesa-dev] [PATCH] nv50: fix alphatest for non-blendable formats

2016-07-12 Thread Ilia Mirkin
The hardware can only do alphatest when using a blendable format. This means that the various *16 norm formats didn't work with alphatest. It appears that Talos Principle uses such formats, as well as alpha tests, for some internal renders, which made them be incorrect. However this does not appear

[Mesa-dev] [PATCH] egl/android: Remove unused variables

2016-07-12 Thread Nicolas Boichat
From: Tomasz Figa There are some unused variables left after previous clean-ups triggering compiler warnings. Let's remove them. Signed-off-by: Tomasz Figa --- src/egl/drivers/dri2/platform_android.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/egl/drivers/dri2/platform_android.c

[Mesa-dev] [PATCH] gallium/dri: Add shared glapi to LIBADD on Android

2016-07-12 Thread Nicolas Boichat
From: Tomasz Figa An earlier patch fixed the problem for classic drivers, however Gallium was still left broken. This patch applies the same workaround to Gallium, when compiled for Android. Following is a quote from the original patch: 0cbc90c57cfc mesa: dri: Add shared glapi to LIBADD on Andro

Re: [Mesa-dev] [PATCH 0/4] RadeonSI: Multithreaded shader compilation

2016-07-12 Thread Timothy Arceri
On Sun, 2016-07-10 at 01:24 +0200, Marek Olšák wrote: > On Sat, Jul 9, 2016 at 11:02 PM, Grazvydas Ignotas > wrote: > > On Sat, Jul 9, 2016 at 6:49 PM, Marek Olšák > > wrote: > > > On Fri, Jul 8, 2016 at 3:20 AM, Timothy Arceri > > > wrote: > > > > On Wed, 2016-06-29 at 18:32 +0200, Marek Olšák

[Mesa-dev] [PATCH 83/87] glsl/i965: make a copy of the shader source and use it at fallback

2016-07-12 Thread Timothy Arceri
A number of things can happen that change the shader source after it is compiled or linked. For example: - Source changed after it is first compiled - Source changed after linking - Shader detached after linking In order to be able to fallback to a full rebuild on a cache miss we make a copy of t

[Mesa-dev] [PATCH 84/87] mesa: make string_to_uint_map hash table public

2016-07-12 Thread Timothy Arceri
This will allow us to make use of the hash_table_call_foreach() function from outside the object. --- src/mesa/program/hash_table.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/program/hash_table.h b/src/mesa/program/hash_table.h index d0a2abf..0170bce 100644 --

[Mesa-dev] [PATCH 86/87] glsl: retain buffer block state on cache fallback

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/linker.cpp | 70 1 file changed, 45 insertions(+), 25 deletions(-) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 6851881..8a1803c 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/l

[Mesa-dev] [PATCH 79/87] glsl: cache more fragment shader state

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 8 1 file changed, 8 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 9b958a0..437e22e 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -968,6 +968

[Mesa-dev] [PATCH 87/87] glsl: don't lose sampler or image units when cache falls back

2016-07-12 Thread Timothy Arceri
The old linked shader is deleted so we need to make sure we hold onto these values. --- src/compiler/glsl/linker.cpp | 8 1 file changed, 8 insertions(+) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 8a1803c..637236f 100644 --- a/src/compiler/glsl/linker.

[Mesa-dev] [PATCH 60/87] glsl: don't try to load/store buffer object values in the cache

2016-07-12 Thread Timothy Arceri
Also add an assert to catch buffer overflows. --- src/compiler/glsl/shader_cache.cpp | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 60ea14c..72e45c1 100644 --- a/src/compiler/glsl/sha

[Mesa-dev] [PATCH 80/87] i965: add unreachable for compute stage in shader cache

2016-07-12 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_shader_cache.c | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c index 96a84aa..6e3b6e9 100644 --- a/src/mesa/drivers/dri/i965/brw_shader_cache.c +++ b/src/mesa/driv

[Mesa-dev] [PATCH 63/87] i965: don't rebuild param list after cache miss

2016-07-12 Thread Timothy Arceri
Previously we ended up with the same param list but in a different location, which will mess up the pointers stored in the new cache object if all stages were not fully rebuilt e.g. after a fragment program cache miss. This also stops the list from being leaked on fallback. --- src/mesa/drivers/d

[Mesa-dev] [PATCH 85/87] glsl/mesa: make a copy of attribute bindings in case of cache fallback

2016-07-12 Thread Timothy Arceri
If the shader cache falls back to doing a compile and link we need the original attribute bindings as they could have changed after the program was first linked. --- src/compiler/glsl/linker.cpp | 5 - src/compiler/glsl/shader_cache.cpp | 11 +++ src/mesa/main/mtypes.h

[Mesa-dev] [PATCH 36/87] glsl: don't crash when dumping shaders if some come from cache

2016-07-12 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_link.cpp | 6 +- src/mesa/main/shaderapi.c | 6 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp b/src/mesa/drivers/dri/i965/brw_link.cpp index 5374685..ae4c68a 100644 --- a/src/mesa/dr

[Mesa-dev] [PATCH 76/87] i965: add cache fallback support for tess stages

2016-07-12 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_shader_cache.c | 12 1 file changed, 12 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c index 1aebaf8..96a84aa 100644 --- a/src/mesa/drivers/dri/i965/brw_shader_cache.c +++ b/src

[Mesa-dev] [PATCH 75/87] i965: add support for writing tess programs to cache

2016-07-12 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_compiler.h | 4 ++ src/mesa/drivers/dri/i965/brw_shader_cache.c | 66 src/mesa/drivers/dri/i965/brw_tcs.c | 2 + src/mesa/drivers/dri/i965/brw_tes.c | 2 + 4 files changed, 74 insertions(+) diff --git a/src/me

[Mesa-dev] [PATCH 46/87] i965: add shader cache support for pull param pointers

2016-07-12 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_shader_cache.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c index d37d5e0..19c8b99 100644 --- a/src/mesa/drivers/dri/i965/br

[Mesa-dev] [PATCH 69/87] glsl: cache PatchInputsRead and PatchOutputsWritten

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 4 1 file changed, 4 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 3edc577..36e501d 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -925,6 +925,8 @

[Mesa-dev] [PATCH 61/87] i965: add support for caching clip planes

2016-07-12 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_shader_cache.c | 41 +--- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c index 5326c52..f9e1374 100644 --- a/src/mesa/drivers/dri/i

[Mesa-dev] [PATCH 78/87] glsl: don't reprocess or clear UBOs on cache fallback

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/linker.cpp | 14 -- src/mesa/main/shaderobj.c| 16 +--- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index dc426bf..527b636 100644 --- a/src/compiler/glsl/linker.cpp ++

[Mesa-dev] [PATCH 81/87] glsl: cache tess control shader VerticesOut

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 8 1 file changed, 8 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 437e22e..c661557 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -949,6 +949

[Mesa-dev] [PATCH 68/87] i965: add support for gs shader cache fallback

2016-07-12 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_shader_cache.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c index 9e696b2..adbb23c 100644 --- a/src/mesa/drivers/dri/i965/brw_shader_cache.c +++ b/src/mesa/dr

[Mesa-dev] [PATCH 58/87] glsl: disable on disk shader cache when running as root

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/cache.c | 4 1 file changed, 4 insertions(+) diff --git a/src/compiler/glsl/cache.c b/src/compiler/glsl/cache.c index a6a9e47..dd53f4e 100644 --- a/src/compiler/glsl/cache.c +++ b/src/compiler/glsl/cache.c @@ -141,6 +141,10 @@ cache_create(void) struct stat sb;

[Mesa-dev] [PATCH 72/87] i965: add upload cache functions for tcs and tes

2016-07-12 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_shader_cache.c | 78 1 file changed, 78 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c index adbb23c..66e80b6 100644 --- a/src/mesa/drivers/dri/i965/brw_shader_c

[Mesa-dev] [PATCH 71/87] i965: create populate key functions for tcs and tes

2016-07-12 Thread Timothy Arceri
These will be used by the on disk shader cache. --- src/mesa/drivers/dri/i965/brw_program.h | 10 +++-- src/mesa/drivers/dri/i965/brw_state_upload.c | 18 +--- src/mesa/drivers/dri/i965/brw_tcs.c | 64 +--- src/mesa/drivers/dri/i965/brw_tes.c | 58

[Mesa-dev] [PATCH 57/87] i965: track mesa version shader cache items were created with

2016-07-12 Thread Timothy Arceri
Also remove cache item and fallback to full recompile if current Mesa version differs. --- src/mesa/drivers/dri/i965/brw_shader_cache.c | 17 + 1 file changed, 17 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.

[Mesa-dev] [PATCH 67/87] glsl/i965: add shader cache support for geometry shaders

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 18 +- src/mesa/drivers/dri/i965/brw_compiler.h | 2 + src/mesa/drivers/dri/i965/brw_gs.c | 23 +-- src/mesa/drivers/dri/i965/brw_shader_cache.c | 96 4 files changed, 133 insertions(+), 6 deleti

[Mesa-dev] [PATCH 56/87] glsl: don't reset sampler or image units on cache fallback

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/link_uniforms.cpp | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/link_uniforms.cpp b/src/compiler/glsl/link_uniforms.cpp index b5cc9e6..c23191a 100644 --- a/src/compiler/glsl/link_uniforms.cpp +++ b/src/compiler/glsl/link_uniforms

[Mesa-dev] [PATCH 73/87] i965: add tess sha1 generation functions

2016-07-12 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_shader_cache.c | 48 1 file changed, 48 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c index 66e80b6..870bda6 100644 --- a/src/mesa/drivers/dri/i965/brw_shader_c

[Mesa-dev] [PATCH 74/87] glsl: enable shader cache for tess stages

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 0c56587..9b958a0 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cac

[Mesa-dev] [PATCH 82/87] glsl: use linked shaders rather than compiled shaders

2016-07-12 Thread Timothy Arceri
At this point there is no reason not to be using the linked shaders, using the linked shaders should be faster and will make things simpler for upcoming shader cache work. The previous variable name suggests the linked shaders were intended to be used here anyway. --- src/compiler/glsl/linker.cpp

[Mesa-dev] [PATCH 64/87] i965: don't recreate program struct on cache fallback

2016-07-12 Thread Timothy Arceri
We already have the struct and paramlist we don't want to recreate them as this is unnecessary and would mean we would need to remap anything using the old paramlist to the addresses of the new one. --- src/compiler/glsl/linker.cpp | 5 src/mesa/drivers/dri/i965/brw_link.cpp

[Mesa-dev] [PATCH 77/87] i965: enable cache uploads for tess stages

2016-07-12 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_tcs.c | 22 ++ src/mesa/drivers/dri/i965/brw_tes.c | 21 + 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_tcs.c b/src/mesa/drivers/dri/i965/brw_tcs.c index d1a329e..19b36e5 100

[Mesa-dev] [PATCH 59/87] glsl: add shader cache support for encoding double

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 8dacf3e..60ea14c 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -68,6 +68,7 @@ en

[Mesa-dev] [PATCH 66/87] i965: make gs key generation helper available to shader cache

2016-07-12 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_gs.c | 2 +- src/mesa/drivers/dri/i965/brw_gs.h | 4 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index 3f7a5cf..1865ef1 100644 --- a/src/mesa/drivers/dri/i965/brw_gs.c

[Mesa-dev] [PATCH 65/87] i965: handle incompatiable binaries in shader-cache

2016-07-12 Thread Timothy Arceri
Remove incompatiable binaries of a program before attempting to store a new one. A previous commit already handles deleting an incompatiable binary for shader variants this handles the case for an initial shader compile. Without this a variant would delete the binary then fallback to a full recomp

[Mesa-dev] [PATCH 62/87] glsl: reserve parameter storage on cache restore

2016-07-12 Thread Timothy Arceri
Since we know how big the list will be we can allocate the storage upfront. --- src/compiler/glsl/shader_cache.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 72e45c1..13b7d27 100644 --- a/src/compiler/glsl/shad

[Mesa-dev] [PATCH 70/87] glsl: cache tes layout qualifiers

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 23 +++ 1 file changed, 23 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 36e501d..0c56587 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.c

[Mesa-dev] [PATCH 48/87] glsl: don't lose uniform values when falling back to full compile

2016-07-12 Thread Timothy Arceri
Here we skip the recreation of uniform storage if we are relinking after a cache miss. --- src/compiler/glsl/link_uniforms.cpp | 33 +--- src/compiler/glsl/linker.cpp | 3 ++- src/compiler/glsl/linker.h | 3 ++- src/compiler/glsl

[Mesa-dev] [PATCH 50/87] glsl,i965: disable shader cache for SSO

2016-07-12 Thread Timothy Arceri
Caching SSO requires us to be a little more careful so disable it for now. --- src/compiler/glsl/linker.cpp | 7 ++- src/mesa/drivers/dri/i965/brw_shader_cache.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/g

[Mesa-dev] [PATCH 38/87] glsl: cache some more image metadata

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 12 1 file changed, 12 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 66007d4..568d1dd 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -897,

[Mesa-dev] [PATCH 51/87] i965: copy program id to key before upload

2016-07-12 Thread Timothy Arceri
The program may have already been assigned an id so make sure to use it. --- src/mesa/drivers/dri/i965/brw_shader_cache.c | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c index e78e5fe..cf248b4 100

[Mesa-dev] [PATCH 53/87] i965: don't precompile or rebuild resource list on cache fallback

2016-07-12 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_link.cpp | 8 +--- src/mesa/main/shaderobj.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp b/src/mesa/drivers/dri/i965/brw_link.cpp index 651105c..aa1a1f2 100644 --- a/src/mesa/drive

[Mesa-dev] [PATCH 49/87] glsl: skip more uniform initialisation when doing fallback linking

2016-07-12 Thread Timothy Arceri
We already pull these values from the metadata cache so no need to recreate them. --- src/compiler/glsl/linker.cpp | 22 ++ src/mesa/main/shaderobj.c| 8 +--- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/g

[Mesa-dev] [PATCH 45/87] i965: add image param shader cache support

2016-07-12 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_shader_cache.c | 31 +++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c index 751abb1..d37d5e0 100644 --- a/src/mesa/drivers/dri/i9

[Mesa-dev] [PATCH 37/87] glsl: cache clip distance array size

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 4 1 file changed, 4 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 4b73d04..66007d4 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -895,6 +895,8 @

[Mesa-dev] [PATCH 52/87] mesa: extend LinkShader function to include cache fallback param

2016-07-12 Thread Timothy Arceri
This allows up to skip certain linking tasks such as building the resource list when we are falling back to a full compile after a cache miss. --- src/mesa/drivers/dri/i965/brw_link.cpp | 3 ++- src/mesa/drivers/dri/i965/brw_shader.h | 4 +++- src/mesa/main/dd.h | 3

[Mesa-dev] [PATCH 47/87] i965: add cache fallback support

2016-07-12 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_shader_cache.c | 53 ++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c index 19c8b99..83c360c 100644 --- a/src/mesa/drivers/dri/i

[Mesa-dev] [PATCH 55/87] i965: get scratch on cache restore

2016-07-12 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_shader_cache.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c index 18b75fb..8334d69 100644 --- a/src/mesa/drivers/dri/i965/brw_shader_cache.c +++ b/src/mesa/dr

[Mesa-dev] [PATCH 54/87] i965: generate outputs written for use in fs key

2016-07-12 Thread Timothy Arceri
This is normally generated at link time so we need to do it ourselves for use with the shader cache. --- src/mesa/drivers/dri/i965/brw_shader_cache.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i96

[Mesa-dev] [PATCH 40/87] glsl: cache uniform values

2016-07-12 Thread Timothy Arceri
These may be lowered constant arrays or uniform values that we set before linking so we need to cache the actual uniform values. --- src/compiler/glsl/shader_cache.cpp | 31 +++ 1 file changed, 31 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/co

[Mesa-dev] [PATCH 35/87] glsl: cache interpolation qualifier for frag shader

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index ed9c9a5..4b73d04 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -89

[Mesa-dev] [PATCH 41/87] glsl: cache system values read bitfield

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 5bf0f44..adef1a0 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -913,6 +913,7 @@

[Mesa-dev] [PATCH 39/87] glsl: make uniform values helper available for use elsewhere

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/link_uniforms.cpp | 2 +- src/compiler/glsl/linker.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/link_uniforms.cpp b/src/compiler/glsl/link_uniforms.cpp index 547633b..b5c75f7 100644 --- a/src/compiler/glsl/link_uniforms.

[Mesa-dev] [PATCH 43/87] glsl: add a cache_remove() function

2016-07-12 Thread Timothy Arceri
This will be used to remove cache items created with an old version of Mesa from the cache. --- src/compiler/glsl/cache.c | 22 ++ src/compiler/glsl/cache.h | 12 2 files changed, 34 insertions(+) diff --git a/src/compiler/glsl/cache.c b/src/compiler/glsl/cache.c

[Mesa-dev] [PATCH 44/87] glsl: track mesa version shader cache items were created with

2016-07-12 Thread Timothy Arceri
Also remove cache item and fallback to full recompile if current Mesa version differs. V2: don't leak buffer` --- src/compiler/glsl/shader_cache.cpp | 13 + 1 file changed, 13 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index ad

[Mesa-dev] [PATCH 42/87] glsl: use reproducible name for lowered const arrays

2016-07-12 Thread Timothy Arceri
Otherwise we can end up with mismatching names between the cached binary and the cached metadata. --- src/compiler/glsl/ir_optimization.h | 2 +- src/compiler/glsl/linker.cpp | 2 +- src/compiler/glsl/lower_const_arrays_to_uniforms.cpp | 16 --

[Mesa-dev] [PATCH 34/87] glsl: add support for caching atomic buffers

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 87 ++ 1 file changed, 87 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index da075cd..ed9c9a5 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl

[Mesa-dev] [PATCH 31/87] glsl: add shader cache support for buffer blocks

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 157 + 1 file changed, 157 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index ed1c06f..cd92e24 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/gls

[Mesa-dev] [PATCH 26/87] glsl: skip linking when current program has been retrieved from cache

2016-07-12 Thread Timothy Arceri
The scenario is a program has been linked for the first time and we cache the program metadata, then glLinkProgram() is called for a second time. Since we will now retrieve the program metadata from cache we need to skip linking. --- src/compiler/glsl/shader_cache.cpp | 1 + 1 file changed, 1 inse

[Mesa-dev] [PATCH 24/87] glsl: compile shaders when program not found in cache

2016-07-12 Thread Timothy Arceri
We may have seen the individual shaders before and skipped compiling but they may not have been used together in this combination before. We could probably only compile the shaders which were skipped here but we need to be careful because the source may also have been changed since the last compil

[Mesa-dev] [PATCH 23/87] glsl: add shader cache support for samplers

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 30 ++ 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index e038cf6..415de82 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compi

[Mesa-dev] [PATCH 33/87] glsl: add support for serialising atomic and array types

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 7025f8f..da075cd 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader

[Mesa-dev] [PATCH 29/87] glsl: add support for caching subroutines

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 100 + 1 file changed, 100 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 5cdb59c..48014f4 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/gls

[Mesa-dev] [PATCH 22/87] glsl: add basic support for resource list to shader cache

2016-07-12 Thread Timothy Arceri
This initially adds support for simple uniforms and varyings. --- src/compiler/glsl/shader_cache.cpp | 114 + 1 file changed, 114 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 6f786ba..e038cf6 100644 -

[Mesa-dev] [PATCH 30/87] glsl: store subroutine remap table in shader cache

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 49 +- 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 48014f4..ed1c06f 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/s

[Mesa-dev] [PATCH 28/87] glsl: add cache support for encoding subroutine type

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 3ed46f3..5cdb59c 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -79,6 +79,11

[Mesa-dev] [PATCH 32/87] glsl: add support for serialising image types

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 8 1 file changed, 8 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index cd92e24..7025f8f 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -85,6 +85,1

[Mesa-dev] [PATCH 21/87] glsl: cache subroutine uniform storage value

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 639ddb6..6f786ba 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -148,6 +148,8 @@

[Mesa-dev] [PATCH 25/87] glsl: add support for skipping shader cache to compiler and linker

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/linker.cpp | 5 +++-- src/compiler/glsl/program.h | 3 ++- src/compiler/glsl/standalone.cpp | 2 +- src/mesa/main/ff_fragment_shader.cpp | 2 +- src/mesa/main/shaderapi.c| 2 +- src/mesa/program/ir_to_mesa.cpp | 5 +++-- src/mesa/program/

[Mesa-dev] [PATCH 09/87] glsl: stub out _mesa_reference_program() in standalone compiler

2016-07-12 Thread Timothy Arceri
The shader cache will start calling these from the compiler. --- src/compiler/glsl/standalone_scaffolding.cpp | 8 src/compiler/glsl/standalone_scaffolding.h | 4 2 files changed, 12 insertions(+) diff --git a/src/compiler/glsl/standalone_scaffolding.cpp b/src/compiler/glsl/stand

[Mesa-dev] [PATCH 27/87] glsl, i965: don't used shader cache when transform feedback enabled

2016-07-12 Thread Timothy Arceri
Note in future we may want to use the cache when in shader xfb qualifiers override the API. --- src/compiler/glsl/linker.cpp | 15 ++- src/compiler/glsl/shader_cache.cpp | 7 +++ src/mesa/drivers/dri/i965/brw_shader_cache.c | 7 +++ 3 files changed,

[Mesa-dev] [PATCH 17/87] glsl: add param to force shader recompile

2016-07-12 Thread Timothy Arceri
This will be used to skip checking the cache and force a recompile. --- src/compiler/glsl/glsl_parser_extras.cpp | 22 -- src/compiler/glsl/program.h | 2 +- src/compiler/glsl/standalone.cpp | 3 ++- src/mesa/main/shaderapi.c| 2 +- 4 fil

[Mesa-dev] [PATCH 12/87] i965: add initial implementation of on disk shader cache

2016-07-12 Thread Timothy Arceri
This uses the recently-added cache.c to write out the final linked binary for vertex and fragment shader programs. This is based off the initial implementation done by Carl. --- src/mesa/drivers/dri/i965/Makefile.sources | 1 + src/mesa/drivers/dri/i965/brw_shader_cache.c | 390 ++

[Mesa-dev] [PATCH 14/87] glsl, i965: make use of on disk shader cache

2016-07-12 Thread Timothy Arceri
The hash key for glsl metadata is a hash of the hashes of each GLSL source string. This commit uses the put_key/get_key support in the cache put the SHA-1 hash of the source string for each successfully compiled shader into the cache. This allows for early, optimistic returns from glCompileShader

[Mesa-dev] [PATCH 20/87] glsl: cache SSBO uniform storage values

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 8aae1c8..639ddb6 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -147,6 +147,1

[Mesa-dev] [PATCH 16/87] glsl: fix uniform remap table cache when explicit locations used

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index fe875a5..955700a 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/gl

[Mesa-dev] [PATCH 15/87] glsl: Serialize three additional hash tables with program metadata

2016-07-12 Thread Timothy Arceri
From: Carl Worth The three additional tables are AttributeBindings, FragDataBindings, and FragDataIndexBindings. The first table (AttributeBindings) was identified as missing by trying to test the shader cache with a program that called glGetAttribLocation. Many thanks to Tapani Pälli , as it w

[Mesa-dev] [PATCH 07/87] i965: add new field for storing program size

2016-07-12 Thread Timothy Arceri
From: Carl Worth This will be used by the on disk shader cache. Signed-off-by: Timothy Arceri --- src/mesa/drivers/dri/i965/brw_compiler.h | 4 src/mesa/drivers/dri/i965/brw_vs.c | 2 ++ src/mesa/drivers/dri/i965/brw_wm.c | 2 ++ 3 files changed, 8 insertions(+) diff --git a/

[Mesa-dev] [PATCH 19/87] glsl: cache more uniform storage values

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 08f8e37..8aae1c8 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shade

[Mesa-dev] [PATCH 11/87] glsl: add initial implementation of shader cache

2016-07-12 Thread Timothy Arceri
This uses the recently-added cache.c to write out a serialization of various state that's required in order to successfully load and use a binary written out by a drivers backend, this state is referred to as "metadata" throughout the implementation. This patch is based on the initial work done by

[Mesa-dev] [PATCH 18/87] glsl: skip shader cache unless program is made up of vs or fs

2016-07-12 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 955700a..08f8e37 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -52

[Mesa-dev] [PATCH 13/87] i965: always set program id to 0 for on disk cache

2016-07-12 Thread Timothy Arceri
We don't care what instance of the program it is we only care if its the correct binary to load so ignore program id for on disk cache. --- src/mesa/drivers/dri/i965/brw_shader_cache.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/dr

[Mesa-dev] [PATCH 03/87] glsl: Add initial functions to implement an on-disk cache

2016-07-12 Thread Timothy Arceri
From: Carl Worth This code provides for an on-disk cache of objects. Objects are stored and retrieved via names that are arbitrary 20-byte sequences, (intended to be SHA-1 hashes of something identifying for the content). The directory used for the cache can be specified by means of environment v

[Mesa-dev] [PATCH 05/87] glsl: add new uniform fields to be used to restore state from cache

2016-07-12 Thread Timothy Arceri
From: Carl Worth Signed-off-by: Timothy Arceri --- src/compiler/glsl/link_uniforms.cpp | 2 ++ src/mesa/main/mtypes.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/link_uniforms.cpp b/src/compiler/glsl/link_uniforms.cpp index dbe808f..547

[Mesa-dev] [PATCH 02/87] glsl: Prepare standalone compiler to be able to use parameter lists

2016-07-12 Thread Timothy Arceri
From: Carl Worth As part of the shader-cache work an upcoming change will add new references to _mesa_add_parameter and _mesa_new_parameter_list from the glsl code. To prepare for that, and to allow the standalone glsl_compiler to still link, here we add mesa/program/prog_parameter.c to the libgl

[Mesa-dev] [PATCH 06/87] i965: make vs and fs key generation helpers available to shader cache

2016-07-12 Thread Timothy Arceri
From: Carl Worth Signed-off-by: Timothy Arceri --- src/mesa/drivers/dri/i965/brw_vs.c | 3 +-- src/mesa/drivers/dri/i965/brw_vs.h | 4 src/mesa/drivers/dri/i965/brw_wm.c | 2 +- src/mesa/drivers/dri/i965/brw_wm.h | 4 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src

[Mesa-dev] [PATCH 04/87] glsl: Switch to disable-by-default for the GLSL shader cache

2016-07-12 Thread Timothy Arceri
From: Carl Worth The shader cache is expected to be developed incrementally over a fairly long series of commits. For that period of instability, we require users to opt into the shader cache by setting: MESA_GLSL_CACHE_ENABLE=1 In the future, when the shader cache is complete, we can r

[Mesa-dev] [PATCH 08/87] glsl: add cache to ctx and add sha1 string fields

2016-07-12 Thread Timothy Arceri
From: Carl Worth V2: dont leak cache Signed-off-by: Timothy Arceri --- src/mesa/main/context.c | 6 ++ src/mesa/main/mtypes.h | 5 + 2 files changed, 11 insertions(+) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 574c0fb..8c706a4 100644 --- a/src/mesa/main/cont

[Mesa-dev] [PATCH 10/87] mesa: add new MESA_GLSL flag for printing shader cache debug info

2016-07-12 Thread Timothy Arceri
--- docs/shading.html | 1 + src/mesa/main/mtypes.h| 1 + src/mesa/main/shaderapi.c | 2 ++ 3 files changed, 4 insertions(+) diff --git a/docs/shading.html b/docs/shading.html index cf989ce..51d0986 100644 --- a/docs/shading.html +++ b/docs/shading.html @@ -49,6 +49,7 @@ execution. T

[Mesa-dev] [PATCH 01/87] i965: move program id generation

2016-07-12 Thread Timothy Arceri
This generates the program ids at cache upload time rather than at program creation time. Moving the id generation here will be useful for on-disk shader cache support because it means we don't generate ids if there was a cache miss and we had to fall back to compiling from source. This increases

[Mesa-dev] V4 On disk shader cache for i965

2016-07-12 Thread Timothy Arceri
Big thanks to Grazvydas Ignotas for helping test this version. V4: - lots of reworking patches to remove code churn should be much nicer now - fixed fallback when shader has been detached - fixed a couple of bugs with UBOs - no more printfs, debug info is behind an environment var - various clean

Re: [Mesa-dev] [PATCH 1/5] gallivm: add helper lp_add_attr_dereferenceable

2016-07-12 Thread Roland Scheidegger
Am 13.07.2016 um 00:56 schrieb Marek Olšák: > From: Marek Olšák > > Not sure if this is the right way to do it, but it seems to work. > > v2: make it a no-op on LLVM <= 3.5 > --- > src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 11 +++ > src/gallium/auxiliary/gallivm/lp_bld_misc.h |

Re: [Mesa-dev] [PATCH 10/14] isl: Add support for HiZ surfaces

2016-07-12 Thread Jason Ekstrand
On Jul 12, 2016 4:14 PM, "Chad Versace" wrote: > > On Tue 12 Jul 2016, Jason Ekstrand wrote: > > On Tue, Jul 12, 2016 at 2:36 PM, Chad Versace > > wrote: > > > > > Also, isl.c needs an update in this hunk: > > > > > ># isl.c > > >if (isl_surf_usage_is_depth_or_stencil(info->usage)) { > >

[Mesa-dev] [PATCH mesa] gallium/cso: avoid unnecessary null dereference

2016-07-12 Thread Eric Engestrom
The label `out:` calls `destroy()` which dereferences `ctx`. This is unnecessary as there is nothing to destroy. Immediately return instead. CovID: 1258255 Signed-off-by: Eric Engestrom --- src/gallium/auxiliary/cso_cache/cso_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[Mesa-dev] [PATCH mesa] vl: fix memory leak

2016-07-12 Thread Eric Engestrom
CovID: 1363008 Signed-off-by: Eric Engestrom --- src/gallium/auxiliary/vl/vl_bicubic_filter.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/auxiliary/vl/vl_bicubic_filter.c b/src/gallium/auxiliary/vl/vl_bicubic_filter.c index 25bc58c..602424b 100644 --- a/src/gallium/auxilia

  1   2   >