Re: [Mesa-dev] mesa/llvmpipe select alpha visual

2016-10-02 Thread Thomas Søndergaard
On 1 October 2016 at 02:46, Roland Scheidegger wrote: > I'm not familiar with this code but presumably the xlib code is less > tested than dri one, so if it differs there changing it probably > wouldn't hurt. > IIRC in the past there were actually apps which were quite sensitive to > this stuff (

Re: [Mesa-dev] Error when trying to compile RADV

2016-10-02 Thread Michel Dänzer
On 02/10/16 08:28 PM, Jakub Hlusička wrote: > I ended up having to use `env LLVM_CONFIG=llvm-config-3.9` in order to > get it to compile. FWIW, passing --with-llvm-prefix=/usr/lib/llvm-3.9 to the configure script might do the trick as well. That'll be recorded in the config.status file (not sure a

[Mesa-dev] [PATCH] intel: fix compilation warning on gen_get_device_info

2016-10-02 Thread Tapani Pälli
(warning: 'const' type qualifier on return type has no effect) Signed-off-by: Tapani Pälli --- src/intel/common/gen_device_info.c | 2 +- src/intel/common/gen_device_info.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intel/common/gen_device_info.c b/src/intel/comm

[Mesa-dev] [PATCH 76/77] glsl: create separate 32bit and 64bit versions of shader cache objects

2016-10-02 Thread Timothy Arceri
Pointers will have different lengths so we simply create a different sha1 for each platform. In theory we should be able to share cached shaders as we cache all pointer as uint64_t however if a pointer is ever added to one of the structs we write to file with blob_write_bytes() we run the risk of

[Mesa-dev] [PATCH 70/77] util: make string_to_uint_map hash table public

2016-10-02 Thread Timothy Arceri
This will allow us to make use of the hash_table_call_foreach() function from outside the object. --- src/util/string_to_uint_map.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/string_to_uint_map.h b/src/util/string_to_uint_map.h index e0533ec..18f5166 100644 --

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

2016-10-02 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 74/77] i965: add an env var to force cache fallback

2016-10-02 Thread Timothy Arceri
There are a number of reasons we can get to the program upload stage and have neither IR nor a valid cached binary. For example the binary may have been randomly evicted from the cache to make room or the binary may have been created with an old version of Mesa. This environment variable enabled u

[Mesa-dev] [PATCH 67/77] glsl: cache more fragment shader state

2016-10-02 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 304f80e..c4ead81 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -1061,6 +10

[Mesa-dev] [PATCH 77/77] i965: create separate 32bit and 64bit versions of shader cache objects

2016-10-02 Thread Timothy Arceri
Pointers will have different lengths so we simply create a different sha1 for each platform. In theory we should be able to share cached shaders as we cache all pointer as uint64_t however if a pointer is ever added to one of the structs we write to file with blob_write_bytes() we run the risk of

[Mesa-dev] [PATCH 68/77] glsl: cache tess control shader VerticesOut

2016-10-02 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 c4ead81..18a338c 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -1042,6 +10

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

2016-10-02 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 df02198..ecdf7ef 100644 --- a/src/compiler/glsl/linker.

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

2016-10-02 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 ac03283..df02198 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/l

[Mesa-dev] [PATCH 64/77] glsl: enable shader cache for tess stages

2016-10-02 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 fdd1b98..304f80e 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cac

[Mesa-dev] [PATCH 65/77] i965: add shader cache support for tess stages

2016-10-02 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 | 24 -- src/mesa/drivers/dri/i965/brw_tes.c | 23 -- 4 files changed, 109 insertions(+),

[Mesa-dev] [PATCH 75/77] i965: pad out brw_stage_prog_data pointers to 64bits

2016-10-02 Thread Timothy Arceri
In order for this struct to have the same size on 64bit and 32bit platforms we uses unions to make sure the pointers always take up at least 64bits. This is useful for making sure we always write the same size data to disk in the shader cache. --- src/mesa/drivers/dri/i965/brw_compiler.h | 6 +++--

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

2016-10-02 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 66/77] glsl: don't reprocess or clear UBOs on cache fallback

2016-10-02 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 1b4a87a..6e05cad 100644 --- a/src/compiler/glsl/linker.cpp ++

[Mesa-dev] [PATCH 63/77] glsl: cache tes layout qualifiers

2016-10-02 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 002b8c3..fdd1b98 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.c

[Mesa-dev] [PATCH 59/77] glsl: add shader cache support for geometry shaders

2016-10-02 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 9b37155..c26974c 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/sha

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

2016-10-02 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 60/77] i965: add shader cache support for geometry shaders

2016-10-02 Thread Timothy Arceri
--- 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 | 29 +++- 3 files changed, 49 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/i

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

2016-10-02 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 a8ca719..fe553df 100644 --- a/src/compiler/glsl/sha

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

2016-10-02 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 62/77] glsl: cache PatchInputsRead and PatchOutputsWritten

2016-10-02 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 c26974c..002b8c3 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -1016,6 +1016,8

[Mesa-dev] [PATCH 58/77] i965: handle incompatiable binaries in shader-cache

2016-10-02 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 61/77] i965: add support for gs shader cache fallback

2016-10-02 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 3d06c2b..6b75303 100644 --- a/src/mesa/drivers/dri/i965/brw_shader_cache.c +++ b/src/mesa/dr

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

2016-10-02 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_link.cpp | 22 -- src/mesa/main/shaderobj.c | 2 +- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp b/src/mesa/drivers/dri/i965/brw_link.cpp index aa92321..9acbaa3 100644 --

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

2016-10-02 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 | 16 1 file changed, 16 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c

[Mesa-dev] [PATCH 51/77] glsl: disable on disk shader cache when running as another user

2016-10-02 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 88c1dbb..d4945b4 100644 --- a/src/compiler/glsl/cache.c +++ b/src/compiler/glsl/cache.c @@ -142,6 +142,10 @@ cache_create(void) struct stat sb;

[Mesa-dev] [PATCH 39/77] glsl: add a cache_remove() function

2016-10-02 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 46/77] glsl,i965: disable shader cache for SSO

2016-10-02 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 43/77] i965: add cache fallback support

2016-10-02 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 0452641..bd9306b 100644 --- a/src/mesa/drivers/dri/i

[Mesa-dev] [PATCH 54/77] i965: add support for caching clip planes

2016-10-02 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_shader_cache.c | 43 ++-- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c index d003c71..12b3db2 100644 --- a/src/mesa/drivers/dri/i

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

2016-10-02 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 ad7e8b7..37cc8d4 100644 --- a/src/compiler/glsl/link_uniforms.cpp +++ b/src/compiler/glsl/link_uniforms

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

2016-10-02 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 1e49fbc..a8ca719 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -69,6 +69,7 @@ en

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

2016-10-02 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 | 38 src/compiler/glsl/linker.cpp | 9 --- src/compiler/glsl/linker.h | 3 ++- src/compiler/

[Mesa-dev] [PATCH 55/77] glsl: reserve parameter storage on cache restore

2016-10-02 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 fe553df..9b37155 100644 --- a/src/compiler/glsl/shad

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

2016-10-02 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 45/77] glsl: skip more uniform initialisation when doing fallback linking

2016-10-02 Thread Timothy Arceri
We already pull these values from the metadata cache so no need to recreate them. --- src/compiler/glsl/linker.cpp | 29 +++-- src/mesa/main/shaderobj.c| 8 +--- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/src/compiler/glsl/linker.cpp b/src/com

[Mesa-dev] [PATCH 38/77] glsl: cache system values read bitfield

2016-10-02 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 11ce512..ae3633e 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -1004,6 +1004,7 @

[Mesa-dev] [PATCH 41/77] i965: add image param shader cache support

2016-10-02 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 8b31e71..a3dc2a3 100644 --- a/src/mesa/drivers/dri/i9

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

2016-10-02 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 ae

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

2016-10-02 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 c9bb6ad..067db8d 100644 --- a/src/compiler/glsl/link_uniforms.

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

2016-10-02 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 db31788..774b904 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -80,6 +80,11

[Mesa-dev] [PATCH 27/77] glsl: add support for caching subroutines

2016-10-02 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 774b904..793a909 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/gls

[Mesa-dev] [PATCH 37/77] glsl: cache uniform values

2016-10-02 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/77] glsl: cache some more image metadata

2016-10-02 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 ddf0c5d..3e2e2f1 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -990,

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

2016-10-02 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_shader_cache.c | 28 +++- 1 file changed, 27 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 a3dc2a3..0452641 100644 --- a/src/mesa/drivers/dri/i9

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

2016-10-02 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 55 +- 1 file changed, 49 insertions(+), 6 deletions(-) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 793a909..cd18edc 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/s

[Mesa-dev] [PATCH 32/77] glsl: add support for caching atomic buffers

2016-10-02 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 0937accd..6213d63 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/gls

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

2016-10-02 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 34/77] glsl: cache clip distance array size

2016-10-02 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 1d71068..ddf0c5d 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -988,6 +988,8 @

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

2016-10-02 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 a64f6e5..0937accd 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shade

[Mesa-dev] [PATCH 30/77] glsl: add support for serialising image types

2016-10-02 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 1c5c4f5..a64f6e5 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -86,6 +86,1

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

2016-10-02 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 854a21c..abbd696 100644 -

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

2016-10-02 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 154 + 1 file changed, 154 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index cd18edc..1c5c4f5 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/gls

[Mesa-dev] [PATCH 33/77] glsl: cache interpolation qualifier for frag shader

2016-10-02 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 6213d63..1d71068 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -98

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

2016-10-02 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 25/77] glsl, i965: add support for caching shaders with xfb qualifiers

2016-10-02 Thread Timothy Arceri
For now this disables the shader cache when transform feedback is enabled via the GL API. --- src/compiler/glsl/linker.cpp | 15 - src/compiler/glsl/shader_cache.cpp | 89 src/mesa/drivers/dri/i965/brw_shader_cache.c | 7 +++ 3 files chan

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

2016-10-02 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 34 +- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 08927d9..529ec71 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/c

[Mesa-dev] [PATCH 19/77] glsl: cache subroutine uniform storage value

2016-10-02 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 b4b7ee6..854a21c 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -149,6 +149,8 @@

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

2016-10-02 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 10/77] glsl: add helper to convert pointers to uint64_t

2016-10-02 Thread Timothy Arceri
This will be used to store all pointers in the cache as 64bit ints allowing us to avoid issues when a 32bit program reads a cached shader that was created by a 64bit application. --- src/compiler/glsl/shader_cache.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/compiler/glsl/

[Mesa-dev] [PATCH 21/77] glsl: add shader cache support for samplers

2016-10-02 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 34 ++ 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index abbd696..4903980 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/c

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

2016-10-02 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

Re: [Mesa-dev] [PATCH 01/77] .gitignore: Ignore src/compiler/spirv2nir

2016-10-02 Thread Timothy Arceri
Whoops these three patches where sent by mistake. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 09/77] glsl: add initial implementation of shader cache

2016-10-02 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 16/77] glsl: skip shader cache unless program is made up of vs or fs

2016-10-02 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 529ec71..2fb8330 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -53

[Mesa-dev] [PATCH 17/77] glsl: cache more uniform storage values

2016-10-02 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 2fb8330..b0a7876 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shade

[Mesa-dev] [PATCH 18/77] glsl: cache SSBO uniform storage values

2016-10-02 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 b0a7876..b4b7ee6 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -148,6 +148,1

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

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

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

2016-10-02 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 08/77] mesa: add new MESA_GLSL flag for printing shader cache debug info

2016-10-02 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 15/77] glsl: add param to force shader recompile

2016-10-02 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 07/77] glsl: stub out _mesa_reference_program() in standalone compiler

2016-10-02 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 11/77] i965: add initial implementation of on disk shader cache

2016-10-02 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 | 375 ++

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

2016-10-02 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 06/77] glsl: add cache to ctx and add sha1 string fields

2016-10-02 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 697b518..a7c4a58 100644 --- a/src/mesa/main/cont

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

2016-10-02 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 01/77] i965: move program id generation

2016-10-02 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] [PATCH 02/77] docs: add shader cache environment variables

2016-10-02 Thread Timothy Arceri
Reviewed-by: Eric Anholt --- docs/envvars.html | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/envvars.html b/docs/envvars.html index cf57ca5..f0f18b3 100644 --- a/docs/envvars.html +++ b/docs/envvars.html @@ -112,6 +112,17 @@ glGetString(GL_VERSION) for OpenGL ES. glGetStr

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

2016-10-02 Thread Timothy Arceri
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 variables in the fol

[Mesa-dev] V6 On disk shader cache GLSL/i965

2016-10-02 Thread Timothy Arceri
The last two patches are not needed but it seems safer to just store separate shaders for different platform to avoid any future bugs which we are unlikely to do regression testing for since there is no real advantage in sharing the cached shaders. V6: - rewrote a bunch of the i965 shader cache fu

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

2016-10-02 Thread Timothy Arceri
Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_link.cpp | 14 ++ src/mesa/main/shaderapi.c | 9 +++-- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp b/src/mesa/drivers/dri/i965/brw_link.cpp inde

[Mesa-dev] [PATCH 01/77] .gitignore: Ignore src/compiler/spirv2nir

2016-10-02 Thread Timothy Arceri
From: Chad Versace --- src/compiler/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/.gitignore b/src/compiler/.gitignore index c0e6299..5d30b4e 100644 --- a/src/compiler/.gitignore +++ b/src/compiler/.gitignore @@ -1,4 +1,5 @@ glsl_compiler +spirv2nir subtest-cr su

Re: [Mesa-dev] [PATCH] glsl: Make blend_colordodge compare against 1.0 - FLT_EPSILON.

2016-10-02 Thread Kenneth Graunke
On Thursday, September 8, 2016 10:33:06 PM PDT Francisco Jerez wrote: [snip] > Heh, right, my concern was that this smells strongly like a test relying > on not terribly well-defined behavior... AFAICT the problem addressed > here is ultimately caused by the discontinuity that the COLORBURN > blen

Re: [Mesa-dev] [PATCH 00/19] RadeonSI random patches

2016-10-02 Thread Edward O'Callaghan
With the trivial comment fix in patch 6, either way, this series is, Reviewed-by: Edward O'Callaghan On 10/03/2016 08:09 AM, Marek Olšák wrote: > Hi, > > These are random patches that I wrote or picked from my private branches. > Some of them are useful improvements or cleanups, others are less

Re: [Mesa-dev] [PATCH 06/19] radeonsi: drop support for NULL sampler views

2016-10-02 Thread Edward O'Callaghan
On 10/03/2016 08:09 AM, Marek Olšák wrote: > From: Marek Olšák > > not used anymore. It was used when the polygon stipple texture was constant. > --- > src/gallium/drivers/radeonsi/si_descriptors.c | 5 +++-- > src/gallium/drivers/radeonsi/si_state.c | 11 +-- > 2 files changed,

Re: [Mesa-dev] [PATCH 1/5] glsl: remove tabs from linker.{cpp,h}

2016-10-02 Thread Kenneth Graunke
On Wednesday, September 28, 2016 4:04:05 PM PDT Timothy Arceri wrote: > --- > src/compiler/glsl/linker.cpp | 807 > +-- > src/compiler/glsl/linker.h | 8 +- > 2 files changed, 407 insertions(+), 408 deletions(-) May as well. I didn't read any of these

Re: [Mesa-dev] [PATCH 2/6] i965/sync: Stop cacheing fence's signal status

2016-10-02 Thread Kenneth Graunke
On Tuesday, September 27, 2016 11:51:20 PM PDT Chad Versace wrote: > Cacheing the signal status complicates the code for questionable > performance benefit. I added the cacheing long ago, and I now think it > was the wrong decision. > > When we later add support for fences based on sync fds (that

Re: [Mesa-dev] [PATCH 1/2] i965: rename max_hs_* variables to max_tcs_*

2016-10-02 Thread Kenneth Graunke
On Monday, October 3, 2016 10:39:28 AM PDT Timothy Arceri wrote: > Using consistent naming allows us to create macros more easily. I suppose it would :) Both are Reviewed-by: Kenneth Graunke signature.asc Description: This is a digitally signed message part. ___

[Mesa-dev] [PATCH] egl/drm, gallium: replace all calls to dup(2) with fcntl(F_DUPFD_CLOEXEC)

2016-10-02 Thread Matt Whitlock
Without this fix, duplicated file descriptors leak into child processes. See commit aaac913e901229d11a1894f6aaf646de6b1a542c for one instance where the same fix was employed. Cc: Signed-off-by: Matt Whitlock --- src/egl/drivers/dri2/platform_android.c | 3 ++- src/gallium/auxiliary/

[Mesa-dev] [PATCH 1/3] i965: solve cubemap negative x/y/z faces buffer offset issue in dEQP.

2016-10-02 Thread Xu,Randy
Add the miptree level/slice x/y_offset when count the surface offset in brw_emit_surface_state. The surface offset has two parts, one is from mt->offset, which should be 32 aligned in width/height for tiled buffer; another is from mt->level[current_level].slice[current_slice]. x/y_offset. This fix

[Mesa-dev] [PATCH 1/5] egl/android: replace call to dup(2) with fcntl(F_DUPFD_CLOEXEC)

2016-10-02 Thread Matt Whitlock
Without this fix, duplicated file descriptors leak into child processes. See commit aaac913e901229d11a1894f6aaf646de6b1a542c for one instance where the same fix was employed. Cc: Signed-off-by: Matt Whitlock --- src/egl/drivers/dri2/platform_android.c | 3 ++- 1 file changed, 2 insertions(+), 1

[Mesa-dev] [PATCH 2/5] gallium/auxiliary: replace call to dup(2) with fcntl(F_DUPFD_CLOEXEC)

2016-10-02 Thread Matt Whitlock
Without this fix, duplicated file descriptors leak into child processes. See commit aaac913e901229d11a1894f6aaf646de6b1a542c for one instance where the same fix was employed. Cc: Signed-off-by: Matt Whitlock --- src/gallium/auxiliary/vl/vl_winsys_drm.c | 3 ++- 1 file changed, 2 insertions(+),

[Mesa-dev] [PATCH 3/5] st/dri: replace calls to dup(2) with fcntl(F_DUPFD_CLOEXEC)

2016-10-02 Thread Matt Whitlock
Without this fix, duplicated file descriptors leak into child processes. See commit aaac913e901229d11a1894f6aaf646de6b1a542c for one instance where the same fix was employed. Cc: Signed-off-by: Matt Whitlock --- src/gallium/state_trackers/dri/dri2.c | 5 +++-- 1 file changed, 3 insertions(+), 2

[Mesa-dev] [PATCH 5/5] gallium/winsys: replace calls to dup(2) with fcntl(F_DUPFD_CLOEXEC)

2016-10-02 Thread Matt Whitlock
Without this fix, duplicated file descriptors leak into child processes. See commit aaac913e901229d11a1894f6aaf646de6b1a542c for one instance where the same fix was employed. Cc: Signed-off-by: Matt Whitlock --- src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c | 3 ++- src/gallium/winsys/rad

[Mesa-dev] [PATCH 4/5] st/xa: replace call to dup(2) with fcntl(F_DUPFD_CLOEXEC)

2016-10-02 Thread Matt Whitlock
Without this fix, duplicated file descriptors leak into child processes. See commit aaac913e901229d11a1894f6aaf646de6b1a542c for one instance where the same fix was employed. Cc: Signed-off-by: Matt Whitlock --- src/gallium/state_trackers/xa/xa_tracker.c | 3 ++- 1 file changed, 2 insertions(+)

Re: [Mesa-dev] [PATCH] egl/drm, gallium: replace all calls to dup(2) with fcntl(F_DUPFD_CLOEXEC)

2016-10-02 Thread Matt Whitlock
On Friday, 30 September 2016, at 2:35 pm, Emil Velikov wrote: > On 30 September 2016 at 06:47, Matt Whitlock > wrote: > > Without this fix, duplicated file descriptors leak into child processes. > > See commit aaac913e901229d11a1894f6aaf646de6b1a542c for one instance > > where the same fix was em

[Mesa-dev] [PATCH 1/3] i965: solve cubemap negative x/y/z faces buffer offset issue in dEQP.

2016-10-02 Thread Xu,Randy
Add the miptree level/slice x/y_offset when count the surface offset in brw_emit_surface_state. The surface offset has two parts, one is from mt->offset, which should be 32 aligned in width/height for tiled buffer; another is from mt->level[current_level].slice[current_slice]. x/y_offset. This fix

  1   2   >