Re: [Mesa-dev] Problem with RX 480 on Alien: Isolation and Dota 2

2016-09-23 Thread Marek Olšák
Those are just memory management stats. Linux 4.9 will contain optimizations that should prevent such fps drops. Marek On Sep 24, 2016 2:23 AM, "Romain Failliot" wrote: > So I've activated a bunch of stuff: GALLIUM_HUD="num-compilations, > num-bytes-moved,num-evictions;fps,cpu;draw-calls,VRAM-u

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

2016-09-23 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 88/88] i965: handle 32bit and 64bit version of shader cache objects

2016-09-23 Thread Timothy Arceri
Pointers will have different lengths so we simple create a different sha1 for each platform. --- src/mesa/drivers/dri/i965/brw_shader_cache.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/dri

[Mesa-dev] [PATCH 87/88] glsl: handle 32bit and 64bit version of shader cache objects

2016-09-23 Thread Timothy Arceri
Pointers will have different lengths so we simple create a different sha1 for each platform. --- src/compiler/glsl/shader_cache.cpp | 4 ++-- src/compiler/glsl/shader_cache.h | 6 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/comp

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

2016-09-23 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 849854a..4eb5c37 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -1025,6 +10

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

2016-09-23 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 76/88] i965: add cache fallback support for tess stages

2016-09-23 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 00bc1d2..73e7afc 100644 --- a/src/mesa/drivers/dri/i965/brw_shader_cache.c +++ b/src

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

2016-09-23 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 73e7afc..8d13746 100644 --- a/src/mesa/drivers/dri/i965/brw_shader_cache.c +++ b/src/mesa/driv

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

2016-09-23 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 3d7e5ae..90af8a8 100644 --- a/src/compiler/glsl/linker.

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

2016-09-23 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 746817e..849854a 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -1044,6 +10

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

2016-09-23 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 1d77e45..3d7e5ae 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/l

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

2016-09-23 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 d5289fb..e4963fd 100

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

2016-09-23 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_shader_cache.c | 80 1 file changed, 80 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c index 44ff969..f95dc57 100644 --- a/src/mesa/drivers/dri/i965/brw_shader_c

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

2016-09-23 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 64/88] i965: don't recreate program struct on cache fallback

2016-09-23 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 74/88] glsl: enable shader cache for tess stages

2016-09-23 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 f974311..746817e 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cac

[Mesa-dev] [PATCH 83/88] mesa: make string_to_uint_map hash table public

2016-09-23 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 71/88] i965: create populate key functions for tcs and tes

2016-09-23 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 | 70 +--- src/mesa/drivers/dri/i965/brw_tes.c | 58 +

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

2016-09-23 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 9b4c2e9..849c027 100644 --- a/src/compiler/glsl/linker.cpp ++

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

2016-09-23 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 f95dc57..097e079 100644 --- a/src/mesa/drivers/dri/i965/brw_shader_c

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

2016-09-23 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 26d1792..f974311 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.c

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

2016-09-23 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 69/88] glsl: cache PatchInputsRead and PatchOutputsWritten

2016-09-23 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 4d0b711..26d1792 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -1001,6 +1001,8

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

2016-09-23 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 | 97 4 files changed, 134 insertions(+), 6 deleti

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

2016-09-23 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 73f88fa..7b668ba 100644 --- a/src/mesa/drivers/dri/i965/brw_gs.c

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

2016-09-23 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 979f057..d571d4a 100644 --- a/src/mesa/drivers/dri/i

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

2016-09-23 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 5243725..44ff969 100644 --- a/src/mesa/drivers/dri/i965/brw_shader_cache.c +++ b/src/mesa/dr

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

2016-09-23 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 60/88] glsl: don't try to load/store buffer object values in the cache

2016-09-23 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 5733e69..966229c 100644 --- a/src/compiler/glsl/sha

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

2016-09-23 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 966229c..3121658 100644 --- a/src/compiler/glsl/shad

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

2016-09-23 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 | 9 src/compiler/glsl/linker.h | 3 ++- src/compiler

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

2016-09-23 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 d9

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

2016-09-23 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 56/88] glsl: don't reset sampler or image units on cache fallback

2016-09-23 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 799bcb2..a79bb33 100644 --- a/src/compiler/glsl/link_uniforms.cpp +++ b/src/compiler/glsl/link_uniforms

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

2016-09-23 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 070aee0..aaeb6ba 100

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

2016-09-23 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 c876465..5733e69 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -68,6 +68,7 @@ en

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

2016-09-23 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 63/88] i965: don't rebuild param list after cache miss

2016-09-23 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 46/88] i965: add shader cache support for pull param pointers

2016-09-23 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 c076c1c..979f057 100644 --- a/src/mesa/drivers/dri/i965/br

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

2016-09-23 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 58/88] glsl: disable on disk shader cache when running as root

2016-09-23 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 53/88] i965: don't precompile or rebuild resource list on cache fallback

2016-09-23 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 ca00f07..e106151 100644 --

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

2016-09-23 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 61/88] i965: add support for caching clip planes

2016-09-23 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 7b5de32..3e00010 100644 --- a/src/mesa/drivers/dri/i

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

2016-09-23 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_shader_cache.c | 8 1 file changed, 8 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c index 19b0c81..9d95ee9 100644 --- a/src/mesa/drivers/dri/i965/brw_shader_cache.c +++ b/src/mesa/

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

2016-09-23 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 40/88] glsl: cache uniform values

2016-09-23 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 41/88] glsl: cache system values read bitfield

2016-09-23 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 a24b6aa..d982ce0 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -989,6 +989,7 @@

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

2016-09-23 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 a0362f4..641a9e6 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -97

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

2016-09-23 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 641a9e6..79ac3f9 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -971,6 +971,8 @

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

2016-09-23 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 fcdf7eb..a0362f4 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl

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

2016-09-23 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 7109243..fcdf7eb 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader

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

2016-09-23 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 45/88] i965: add image param shader cache support

2016-09-23 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 f64269e..c076c1c 100644 --- a/src/mesa/drivers/dri/i9

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

2016-09-23 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 220065f..c847ceb 100644 --- a/src/compiler/glsl/link_uniforms.

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

2016-09-23 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 79ac3f9..9d7c551 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -973,

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

2016-09-23 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 39bc10f..fb1004e 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/s

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

2016-09-23 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 fb1004e..78eab2b 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/gls

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

2016-09-23 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 f5dbfcf..e7d2106 100644 --- a/src/mesa/dr

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

2016-09-23 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 cd3d9e8..0609f41 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compi

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

2016-09-23 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 78eab2b..7109243 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -85,6 +85,1

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

2016-09-23 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 12/88] i965: add initial implementation of on disk shader cache

2016-09-23 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 15/88] glsl: Serialize three additional hash tables with program metadata

2016-09-23 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 21/88] glsl: cache subroutine uniform storage value

2016-09-23 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 dd2babe..6a3267c 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -148,6 +148,8 @@

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

2016-09-23 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 17/88] glsl: add param to force shader recompile

2016-09-23 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 27/88] glsl, i965: add support for caching shaders with xfb qualifiers

2016-09-23 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 | 87 src/mesa/drivers/dri/i965/brw_shader_cache.c | 7 +++ 3 files chan

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

2016-09-23 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 8b33f0e..dd2babe 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -147,6 +147,1

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

2016-09-23 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 16/88] glsl: fix uniform remap table cache when explicit locations used

2016-09-23 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 08927d9..10e94c8 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/gl

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

2016-09-23 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 66506af..9822eb9 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -79,6 +79,11

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

2016-09-23 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/88] glsl: compile shaders when program not found in cache

2016-09-23 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 29/88] glsl: add support for caching subroutines

2016-09-23 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 9822eb9..39bc10f 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/gls

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

2016-09-23 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 09/88] glsl: stub out _mesa_reference_program() in standalone compiler

2016-09-23 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 18/88] glsl: skip shader cache unless program is made up of vs or fs

2016-09-23 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 10e94c8..1052c67 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -52

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

2016-09-23 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 1052c67..8b33f0e 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shade

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

2016-09-23 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 22/88] glsl: add basic support for resource list to shader cache

2016-09-23 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 6a3267c..cd3d9e8 100644 -

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

2016-09-23 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 08/88] glsl: add cache to ctx and add sha1 string fields

2016-09-23 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 f550b0c..358cc01 100644 --- a/src/mesa/main/cont

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

2016-09-23 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 05/88] glsl: add new uniform fields to be used to restore state from cache

2016-09-23 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 4d3fc6d..220

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

2016-09-23 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 04/88] glsl: Switch to disable-by-default for the GLSL shader cache

2016-09-23 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 03/88] glsl: Add initial functions to implement an on-disk cache

2016-09-23 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] V5 On disk shader cache GLSL/i965

2016-09-23 Thread Timothy Arceri
V5: - added support for caching shaders with transform feedback enabled by the in shader xfb qualifiers now ARB_enhanced_layouts is enabled. - rebased on last 3 months of Mesa changes V4: - lots of reworking patches to remove code churn should be much nicer now - fixed fallback when shader has b

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

2016-09-23 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

Re: [Mesa-dev] [PATCH v2 0/9] radeonsi: ARB_query_buffer_object implementation

2016-09-23 Thread Edward O'Callaghan
Patches 1-7 & 9 are, Reviewed-by: Edward O'Callaghan and 8 is, Acked-by: Edward O'Callaghan On 09/22/2016 10:28 PM, Nicolai Hähnle wrote: > Hi all, > > some fixes based on feedback from v1. > > In related news, https://reviews.llvm.org/D24822 improves the lowering of > the division-by-constant

Re: [Mesa-dev] Problem with RX 480 on Alien: Isolation and Dota 2

2016-09-23 Thread Romain Failliot
So I've activated a bunch of stuff: GALLIUM_HUD="num-compilations,num-bytes-moved,num-evictions;fps,cpu;draw-calls,VRAM-usage" and had one small freeze of around 2s. Here is the screenshot (look at the fps drop and the concurrent num bytes moved and num evictions): https://framapic.org/GSwpilewir6

Re: [Mesa-dev] Problem with RX 480 on Alien: Isolation and Dota 2

2016-09-23 Thread Romain Failliot
Thanks Marek, I'll test that! In the meantime, firstly I fixed an important bug in Mesamatrix so now the matrix is more accurate, and I also just found the problem with Dota 2: it is not because of the new drivers but because of a change I did in the video options, I don't remember having done tha

Re: [Mesa-dev] [PATCH 8/8] st/mesa: small optimization in swizzle_swizzle()

2016-09-23 Thread Charmaine Lee
Series looks good to me. Reviewed-by: Charmaine Lee From: Brian Paul Sent: Friday, September 23, 2016 8:48 AM To: mesa-dev@lists.freedesktop.org Cc: Charmaine Lee Subject: [PATCH 8/8] st/mesa: small optimization in swizzle_swizzle() Usually, there's no

Re: [Mesa-dev] [PATCH 1/8] svga: eliminate unneeded gotos in svga_validate_surface_view()

2016-09-23 Thread Brian Paul
On 09/23/2016 03:28 PM, Charmaine Lee wrote: From: Brian Paul Sent: Friday, September 23, 2016 8:48 AM To: mesa-dev@lists.freedesktop.org Cc: Charmaine Lee Subject: [PATCH 1/8] svga: eliminate unneeded gotos in svga_validate_surface_view() --- src/gallium/drivers/svga/svga_surface.c | 9 +

Re: [Mesa-dev] [PATCH 1/8] svga: eliminate unneeded gotos in svga_validate_surface_view()

2016-09-23 Thread Charmaine Lee
>From: Brian Paul >Sent: Friday, September 23, 2016 8:48 AM >To: mesa-dev@lists.freedesktop.org >Cc: Charmaine Lee >Subject: [PATCH 1/8] svga: eliminate unneeded gotos in >svga_validate_surface_view() >--- > src/gallium/drivers/svga/svga_surface.c | 9 +++-- > 1 file changed, 3 insertions(+

Re: [Mesa-dev] [PATCH 1/8] svga: eliminate unneeded gotos in svga_validate_surface_view()

2016-09-23 Thread Charmaine Lee
>From: Brian Paul >Sent: Friday, September 23, 2016 8:48 AM >To: mesa-dev@lists.freedesktop.org >Cc: Charmaine Lee >Subject: [PATCH 1/8] svga: eliminate unneeded gotos in >svga_validate_surface_view() >--- > src/gallium/drivers/svga/svga_surface.c | 9 +++-- > 1 file changed, 3 insertions(+

Re: [Mesa-dev] [PATCH] virgl: fix flushing while removing sampler views

2016-09-23 Thread Marc-André Lureau
Hi On Sat, Sep 24, 2016 at 12:00 AM Dave Airlie wrote: > On 14 September 2016 at 04:00, wrote: > > From: Marc-André Lureau > > > > When updating the sampler views, virgl might need to flush. After > > flushing, the resources are reattached, however, the sampler > > enabled_mask isn't yet updat

Re: [Mesa-dev] [PATCH v2 4/7] intel/isl: Allow multisampling with ISL_FORMAT_HiZ

2016-09-23 Thread Jason Ekstrand
On Sep 23, 2016 10:14 PM, "Nanley Chery" wrote: > > On Mon, Sep 12, 2016 at 05:58:21PM -0700, Jason Ekstrand wrote: > > HiZ buffers can be multisampled and, on BDW+, simply using interleaved > > As stated in your comment in the second-to-last hunk, this is actually > true for all platforms pre-SKL

Re: [Mesa-dev] [AppVeyor] mesa master #2241 failed

2016-09-23 Thread Dylan Baker
Quoting Jose Fonseca (2016-09-23 11:11:18) > On 23/09/16 18:26, Dylan Baker wrote: > > Quoting Jose Fonseca (2016-09-23 05:01:12) > >> This seems to have broke Windows builds. > >> > >> It seems this is not only exporting symbols on GLESv2.so but everywhere. > >> > >> It's not obvious how to fix it

  1   2   >