Re: [Mesa-dev] Discussion: C++11 std::future in Mesa

2016-06-01 Thread
On Wed, Jun 1, 2016 at 4:06 PM, Brian Paul wrote: > I think the issue here is someone comes along with no history in the project > and asserts that he has a great solution for a problem Asynchronous computation is an essential part of the solution to the problem (problem ==

[Mesa-dev] [PATCH] egl: Account for default values of texture target and format

2016-06-01 Thread Plamena Manolova
When validating attributes during surface creation we should account for the default values of texture target and format (EGL_NO_TEXTURE) since the user is not obligated to explicitly set both via the attribute list passed to eglCreatePbufferSurface. Signed-off-by: Plamena Manolova

Re: [Mesa-dev] Discussion: C++11 std::future in Mesa

2016-06-01 Thread
On Wed, Jun 1, 2016 at 3:53 PM, Marek Olšák wrote: > Because of external factors you can't predict, your driver suddenly > receives a bunch of shaders that take 2000 ms to compile right before > a draw call. Your budget is 16 ms per frame to get 30 fps, but you > can't render

Re: [Mesa-dev] [PATCH 10/21] i965/eu: Use current exec size instead of p->compressed in surface message generation.

2016-06-01 Thread Alejandro Piñeiro
On 01/06/16 17:05, Jason Ekstrand wrote: > > > On May 24, 2016 12:21 AM, "Francisco Jerez" > wrote: > > > > This was kind of an abuse of p->compressed, dataport send message > > instructions are always uncompressed. Use the current execution

Re: [Mesa-dev] Discussion: C++11 std::future in Mesa

2016-06-01 Thread
On Wed, Jun 1, 2016 at 3:50 PM, Erik Faye-Lund wrote: > On Wed, Jun 1, 2016 at 3:02 PM, ⚛ <0xe2.0x9a.0...@gmail.com> wrote: >> On Wed, Jun 1, 2016 at 2:19 PM, Marek Olšák wrote: >>> I'll let you figure it out by yourself. >> >> Why would you withhold

Re: [Mesa-dev] Discussion: C++11 std::future in Mesa

2016-06-01 Thread Eero Tamminen
Hi, On 01.06.2016 18:02, Jason Ekstrand wrote: On Jun 1, 2016 7:43 AM, "Eero Tamminen" > wrote: > Startup time may not be a problem for games (some gamers may disagree), but there are also devices which have legal / certification

Re: [Mesa-dev] [PATCH v2] tgsi/scan: add uses_derivatives (v2)

2016-06-01 Thread Ilia Mirkin
On Wed, Jun 1, 2016 at 11:32 AM, Nicolai Hähnle wrote: > From: Nicolai Hähnle > > v2: > - TG4 does not calculate derivatives (Ilia) > - also handle SAMPLE* instructions (Roland) > > Cc: 12.0 > Reviewed-by: Marek

[Mesa-dev] [PATCH v2] tgsi/scan: add uses_derivatives (v2)

2016-06-01 Thread Nicolai Hähnle
From: Nicolai Hähnle v2: - TG4 does not calculate derivatives (Ilia) - also handle SAMPLE* instructions (Roland) Cc: 12.0 Reviewed-by: Marek Olšák (v1) Reviewed-by: Brian Paul (v1) -- This

Re: [Mesa-dev] Discussion: C++11 std::future in Mesa

2016-06-01 Thread Marek Olšák
On Wed, Jun 1, 2016 at 4:58 PM, Eero Tamminen wrote: > Hi, > > On 01.06.2016 16:53, Marek Olšák wrote: > >> On Wed, Jun 1, 2016 at 3:02 PM, ⚛ <0xe2.0x9a.0...@gmail.com> wrote: >> >>> On Wed, Jun 1, 2016 at 2:19 PM, Marek Olšák wrote: >>> I'll

Re: [Mesa-dev] [PATCH 1/2] tgsi/scan: add uses_derivatives

2016-06-01 Thread Roland Scheidegger
Am 01.06.2016 um 15:51 schrieb Brian Paul: > On 06/01/2016 05:28 AM, Nicolai Hähnle wrote: >> From: Nicolai Hähnle >> >> Cc: 12.0 >> --- >> src/gallium/auxiliary/tgsi/tgsi_scan.c | 26 ++ >>

[Mesa-dev] [Bug 96176] Cannot build non-intel drivers without python3.

2016-06-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=96176 Emil Velikov changed: What|Removed |Added Resolution|--- |FIXED

[Mesa-dev] [Bug 96236] dri_interface.h:404: error: redefinition of typedef ‘mesa_glinterop_device_info’

2016-06-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=96236 Emil Velikov changed: What|Removed |Added Resolution|--- |FIXED

Re: [Mesa-dev] [PATCH 10/21] i965/eu: Use current exec size instead of p->compressed in surface message generation.

2016-06-01 Thread Jason Ekstrand
On May 24, 2016 12:21 AM, "Francisco Jerez" wrote: > > This was kind of an abuse of p->compressed, dataport send message > instructions are always uncompressed. Use the current execution size > instead since p->compressed is on its way out. > --- >

Re: [Mesa-dev] Discussion: C++11 std::future in Mesa

2016-06-01 Thread Jason Ekstrand
On Jun 1, 2016 7:43 AM, "Eero Tamminen" wrote: > > Hi, > > > On 01.06.2016 16:53, Marek Olšák wrote: >> >> On Wed, Jun 1, 2016 at 3:02 PM, ⚛ <0xe2.0x9a.0...@gmail.com> wrote: >>> >>> On Wed, Jun 1, 2016 at 2:19 PM, Marek Olšák wrote: I'll

Re: [Mesa-dev] Discussion: C++11 std::future in Mesa

2016-06-01 Thread Eero Tamminen
Hi, On 01.06.2016 16:53, Marek Olšák wrote: On Wed, Jun 1, 2016 at 3:02 PM, ⚛ <0xe2.0x9a.0...@gmail.com> wrote: On Wed, Jun 1, 2016 at 2:19 PM, Marek Olšák wrote: I'll let you figure it out by yourself. Why would you withhold information if you already have it? Are you a

Re: [Mesa-dev] [PATCH] nir: allow sat on all float destination types

2016-06-01 Thread Jason Ekstrand
On May 31, 2016 11:33 PM, "Ilia Mirkin" wrote: > > On Wed, Jun 1, 2016 at 2:14 AM, Jason Ekstrand wrote: > > > > On May 31, 2016 2:50 PM, "Ilia Mirkin" wrote: > >> > >> With the introduction of fp64 and fp16 to nir, there are now

[Mesa-dev] [Bug 95374] ARK:survival of the fittest fails when GL4.3 is enabled.

2016-06-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=95374 --- Comment #6 from Eero Tamminen --- I'm not sure how close "Survival Evolved" is to "Survival of the fittest", but "ARK: Survival Evolved" game starts fine with i965 driver (which exposes GL 4.3) -> test with Intel

Re: [Mesa-dev] Discussion: C++11 std::future in Mesa

2016-06-01 Thread Markus Wick
Am 2016-06-01 15:53, schrieb Marek Olšák: On Wed, Jun 1, 2016 at 3:02 PM, ⚛ <0xe2.0x9a.0...@gmail.com> wrote: Shader compilation at game loading time is never a problem, so we can ignore that. I have to disagree here. For the dolphin emulator, we proposed a GLSL shader cache (because of

[Mesa-dev] [Bug 95374] ARK:survival of the fittest fails when GL4.3 is enabled.

2016-06-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=95374 --- Comment #5 from Ernst Sjöstrand --- I saw some instances where MESA_GLSL_VERSION_OVERRIDE=430 and actually patching mesa to return 4.3 produced different behaviors. Could that be a factor here? -- You are receiving this

[Mesa-dev] [Bug 95374] ARK:survival of the fittest fails when GL4.3 is enabled.

2016-06-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=95374 Bas Nieuwenhuizen changed: What|Removed |Added Status|NEW |RESOLVED

Re: [Mesa-dev] Discussion: C++11 std::future in Mesa

2016-06-01 Thread Brian Paul
On 06/01/2016 07:02 AM, ⚛ wrote: On Wed, Jun 1, 2016 at 2:19 PM, Marek Olšák wrote: I'll let you figure it out by yourself. Why would you withhold information if you already have it? Are you a "bad person" or something? As far as my memory goes, I have never posted the

Re: [Mesa-dev] [PATCH 1/2] tgsi/scan: add uses_derivatives

2016-06-01 Thread Ilia Mirkin
On Jun 1, 2016 7:29 AM, "Nicolai Hähnle" wrote: > > From: Nicolai Hähnle > > Cc: 12.0 > --- > src/gallium/auxiliary/tgsi/tgsi_scan.c | 26 ++ > src/gallium/auxiliary/tgsi/tgsi_scan.h | 1 +

Re: [Mesa-dev] Discussion: C++11 std::future in Mesa

2016-06-01 Thread Eero Tamminen
Hi, On 01.06.2016 16:50, Erik Faye-Lund wrote: On Wed, Jun 1, 2016 at 3:02 PM, ⚛ <0xe2.0x9a.0...@gmail.com> wrote: On Wed, Jun 1, 2016 at 2:19 PM, Marek Olšák wrote: I'll let you figure it out by yourself. Why would you withhold information if you already have it? Are you

Re: [Mesa-dev] Discussion: C++11 std::future in Mesa

2016-06-01 Thread Erik Faye-Lund
On Wed, Jun 1, 2016 at 3:02 PM, ⚛ <0xe2.0x9a.0...@gmail.com> wrote: > On Wed, Jun 1, 2016 at 2:19 PM, Marek Olšák wrote: >> I'll let you figure it out by yourself. > > Why would you withhold information if you already have it? Are you a > "bad person" or something? The problem

Re: [Mesa-dev] [PATCH] radeonsi: fix the raster config setup for 1 RB iceland chips

2016-06-01 Thread Marek Olšák
Cc: 11.1 11.2 12.0 Reviewed-by: Marek Olšák Marek On Wed, Jun 1, 2016 at 3:17 PM, Alex Deucher wrote: > I didn't realize there were 1 and 2 RB variants when this code > was originally added. > > Signed-off-by:

Re: [Mesa-dev] Discussion: C++11 std::future in Mesa

2016-06-01 Thread Marek Olšák
On Wed, Jun 1, 2016 at 3:02 PM, ⚛ <0xe2.0x9a.0...@gmail.com> wrote: > On Wed, Jun 1, 2016 at 2:19 PM, Marek Olšák wrote: >> I'll let you figure it out by yourself. > > Why would you withhold information if you already have it? Are you a > "bad person" or something? > > As far as

Re: [Mesa-dev] [PATCH 1/2] tgsi/scan: add uses_derivatives

2016-06-01 Thread Brian Paul
On 06/01/2016 05:28 AM, Nicolai Hähnle wrote: From: Nicolai Hähnle Cc: 12.0 --- src/gallium/auxiliary/tgsi/tgsi_scan.c | 26 ++ src/gallium/auxiliary/tgsi/tgsi_scan.h | 1 + 2 files changed, 27

[Mesa-dev] [PATCH] radeonsi: fix the raster config setup for 1 RB iceland chips

2016-06-01 Thread Alex Deucher
I didn't realize there were 1 and 2 RB variants when this code was originally added. Signed-off-by: Alex Deucher Cc: --- src/gallium/drivers/radeonsi/si_state.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

Re: [Mesa-dev] [PATCH 6/7] glapi: automake: ensure that we (can) clean the generated files

2016-06-01 Thread Emil Velikov
On 31 May 2016 at 21:42, Matt Turner wrote: > On Tue, May 31, 2016 at 12:03 PM, Emil Velikov > wrote: >> On 31 May 2016 at 18:54, Matt Turner wrote: >>> On Tue, May 31, 2016 at 9:26 AM, Emil Velikov

Re: [Mesa-dev] Discussion: C++11 std::future in Mesa

2016-06-01 Thread
On Wed, Jun 1, 2016 at 2:19 PM, Marek Olšák wrote: > On Fri, May 27, 2016 at 8:49 PM, ⚛ <0xe2.0x9a.0...@gmail.com> wrote: >> Hello. >> >> http://en.cppreference.com/w/cpp/thread/future >> http://en.cppreference.com/w/cpp/thread/async >> >> Assumption: Shader compilation will

Re: [Mesa-dev] Discussion: C++11 std::future in Mesa

2016-06-01 Thread
On Wed, Jun 1, 2016 at 2:19 PM, Marek Olšák wrote: > I'll let you figure it out by yourself. Why would you withhold information if you already have it? Are you a "bad person" or something? As far as my memory goes, I have never posted the sentence "I'll let you figure it out

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-06-01 Thread Marc Dietrich
Am Mittwoch, 1. Juni 2016, 12:36:15 CEST schrieb Eero Tamminen: > Hi, > > On 31.05.2016 21:43, ⚛ wrote: > > On Tue, May 31, 2016 at 8:30 PM, Aaron Watry wrote: > >> Given the header that it's failing in, I removed the --enable-glx-tls > >> flag, and then things built

[Mesa-dev] [PATCH 2/2] clover: fix getting scalar args api size

2016-06-01 Thread Serge Martin
This fix getting the size of a struct arg. vec3 types still work ok. Only buit-in args need to have power of two alignement, getTypeAllocSize reports the corect size. Cc: 12.0 --- src/gallium/state_trackers/clover/llvm/invocation.cpp | 7 +++ 1 file

[Mesa-dev] [PATCH 1/2] clover: assert struct argument is compiled usably

2016-06-01 Thread Serge Martin
From: Vedran Miletić Make sure that a struct argument did not get compiled into a pointer type with the byval attribute. If we try to handle the pointer with byval, we end up with the pointer size instead of the struct size. Struct arguments on AMD GPUs will work correctly

Re: [Mesa-dev] [PATCH 2/2] radeonsi: enable WQM in PS prolog when needed

2016-06-01 Thread Marek Olšák
For the series: Reviewed-by: Marek Olšák Marek On Wed, Jun 1, 2016 at 1:28 PM, Nicolai Hähnle wrote: > From: Nicolai Hähnle > > WQM is needed when the PS prolog computes a VGPR that is consumed by a shader > with (implicit or

Re: [Mesa-dev] Discussion: C++11 std::future in Mesa

2016-06-01 Thread Marek Olšák
On Fri, May 27, 2016 at 8:49 PM, ⚛ <0xe2.0x9a.0...@gmail.com> wrote: > Hello. > > http://en.cppreference.com/w/cpp/thread/future > http://en.cppreference.com/w/cpp/thread/async > > Assumption: Shader compilation will need run on separate thread(s). > > From a certain perspective, one of the easy

[Mesa-dev] [PATCH 2/2] radeonsi: enable WQM in PS prolog when needed

2016-06-01 Thread Nicolai Hähnle
From: Nicolai Hähnle WQM is needed when the PS prolog computes a VGPR that is consumed by a shader with (implicit or explicit) derivatives. Depends on http://reviews.llvm.org/D20839. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95130 Cc: 12.0

[Mesa-dev] [PATCH 1/2] tgsi/scan: add uses_derivatives

2016-06-01 Thread Nicolai Hähnle
From: Nicolai Hähnle Cc: 12.0 --- src/gallium/auxiliary/tgsi/tgsi_scan.c | 26 ++ src/gallium/auxiliary/tgsi/tgsi_scan.h | 1 + 2 files changed, 27 insertions(+) diff --git

Re: [Mesa-dev] [PATCH 10/21] i965/eu: Use current exec size instead of p->compressed in surface message generation.

2016-06-01 Thread Alejandro Piñeiro
Right now using INTEL_DEBUG=shader_time causes a gpu hang (at least on haswell), and after a git bisect, it started to fail after this patch. I didn't checked why it happens, just wanted to point it out so you are aware, in case it could affect other places. Note that the right now the plan is

Re: [Mesa-dev] [PATCH] i965/xfb: skip components in correct buffer.

2016-06-01 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga On Wed, 2016-06-01 at 14:13 +1000, Dave Airlie wrote: > From: Dave Airlie > > The driver was adding the skip components but always for buffer 0. > > This fixes: >

Re: [Mesa-dev] [PATCH] i965: Fix isoline reads in scalar TES.

2016-06-01 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga On Tue, 2016-05-31 at 22:45 -0700, Kenneth Graunke wrote: > Isolines aren't reversed. commit 5b2d8c2273c6f fixed this for the vec4 > TES backend, but not the scalar one. > > Found while debugging GL45-CTS.tessellation_shader. >

Re: [Mesa-dev] [PATCH 10/10] gallium/radeon: lower memory usage during texture transfers

2016-06-01 Thread Nicolai Hähnle
Reviewed-by: Nicolai Hähnle On 31.05.2016 23:42, Marek Olšák wrote: From: Marek Olšák This improves throughput by keeping TTM overhead down. Some piglit tests such as texelFetch and streaming-texture-leak will use less memory now. v2: use

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-06-01 Thread Eero Tamminen
Hi, On 31.05.2016 21:43, ⚛ wrote: On Tue, May 31, 2016 at 8:30 PM, Aaron Watry wrote: Given the header that it's failing in, I removed the --enable-glx-tls flag, and then things built successfully. mesa.spec in

[Mesa-dev] [PATCH] mesa: Add MESA_SHADER_CAPTURE_PATH for writing .shader_test files.

2016-06-01 Thread Kenneth Graunke
This writes linked shader programs to .shader_test files to $MESA_SHADER_CAPTURE_PATH in the format used by shader-db (http://cgit.freedesktop.org/mesa/shader-db). It supports both GLSL shaders and ARB programs. All stages that are linked together are written in a single .shader_test file. This

Re: [Mesa-dev] [PATCH] mesa: Enable LTO compilation

2016-06-01 Thread Michel Dänzer
On 01.06.2016 00:07, Chuck Atkins wrote: > > With gcc 5.3.1 I end up with lib{GL,OSMesa}.so @ 44M and > libswrAVX{,2}.so @ 70M. With flto turned on it drops WAY down to > lib{GL,OSMesa}.so @ 13M and libswrAVX{,2}.so @ 18M I assume those numbers are including debugging symbols? How do stripped

Re: [Mesa-dev] [PATCH] mesa/sampler: fix error codes for sampler parameters.

2016-06-01 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin Please also update piglit. I'm fairly sure there are tests expecting the old behaviour... On Wed, Jun 1, 2016 at 2:37 AM, Dave Airlie wrote: > From: Dave Airlie > > The initial ARB_sampler_objects spec had

Re: [Mesa-dev] [PATCH] glsl: define some GLES3 constants in GLSL 4.1

2016-06-01 Thread Ilia Mirkin
On Wed, Jun 1, 2016 at 2:18 AM, Dave Airlie wrote: > From: Dave Airlie > > The GLSL 4.1 spec adds: > gl_MaxVertexUniformVectors > gl_MaxFragmentUniformVectors > gl_MaxVaryingVectors > > This fixes: >

[Mesa-dev] [PATCH] mesa/sampler: fix error codes for sampler parameters.

2016-06-01 Thread Dave Airlie
From: Dave Airlie The initial ARB_sampler_objects spec had GL_INVALID_VALUE in it, however version 8 of it fixed this, and the GL specs also have the fixed value in them. Fixes: GL45-CTS.texture_border_clamp.samplerparameteri_non_gen_sampler_error Signed-off-by: Dave Airlie

Re: [Mesa-dev] [PATCH] nir: allow sat on all float destination types

2016-06-01 Thread Ilia Mirkin
On Wed, Jun 1, 2016 at 2:14 AM, Jason Ekstrand wrote: > > On May 31, 2016 2:50 PM, "Ilia Mirkin" wrote: >> >> With the introduction of fp64 and fp16 to nir, there are now a bunch of >> float types running around. A F1 2015 shader ends up with an

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

2016-06-01 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 68/68] glsl: add shader cache support for encoding double

2016-06-01 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 dce8543..4565d01 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -68,6 +68,7 @@

[Mesa-dev] [PATCH 66/68] glsl: avoid buffer overflow in cache sha creation

2016-06-01 Thread Timothy Arceri
A program may contain multiple shaders from each stage so use ralloc to avoid buffer overflow. --- src/compiler/glsl/shader_cache.cpp | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp

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

2016-06-01 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 | 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

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

2016-06-01 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 33c39f4..b340da3 100644 ---

[Mesa-dev] [PATCH 53/68] i965: check memory cache before disk cache

2016-06-01 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_state_upload.c | 4 src/mesa/drivers/dri/i965/brw_vs.c | 21 - src/mesa/drivers/dri/i965/brw_wm.c | 17 ++--- 3 files changed, 30 insertions(+), 12 deletions(-) diff --git

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

2016-06-01 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 ++-

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

2016-06-01 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

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

2016-06-01 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_shader_cache.c | 52 ++-- 1 file changed, 49 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 850e1e8..d1336d7 100644 ---

[Mesa-dev] [PATCH 56/68] i965: move binary sha1 gen into its own helper

2016-06-01 Thread Timothy Arceri
And call it from write cache as its possible that read cache hasn't been called at this point or the current sha is the wrong one so we need to make sure a fresh sha is generated before writting. --- src/mesa/drivers/dri/i965/brw_shader_cache.c | 54 ++-- 1 file changed,

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

2016-06-01 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 |

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

2016-06-01 Thread Timothy Arceri
On the off chance the program has already been assigned an id --- 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 08d43e7..5de261c 100644 ---

[Mesa-dev] [PATCH 64/68] i965: copy and restore sampler units when doing full relink

2016-06-01 Thread Timothy Arceri
If we don't find the program in the cache we need to make sure to store the current sampler units and restore them after falling back to relinking. In this change we also avoid reseting the sampler and image units stored in gl_shader back to 0 during relinking. ---

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

2016-06-01 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

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

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

[Mesa-dev] [PATCH 45/68] glsl: cache system values read bitfield

2016-06-01 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 285c600..9ee461e 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -921,6 +921,7 @@

[Mesa-dev] [PATCH 61/68] i965: move vs outputs written into a helper

2016-06-01 Thread Timothy Arceri
We will reuse this for fs key generation for the on disk shader cache. --- src/mesa/drivers/dri/i965/brw_vs.c | 72 ++ src/mesa/drivers/dri/i965/brw_vs.h | 4 +++ 2 files changed, 45 insertions(+), 31 deletions(-) diff --git

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

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

[Mesa-dev] [PATCH 63/68] i965: get scratch on cache restore

2016-06-01 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_shader_cache.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c index ac381d1..5d47122 100644 --- a/src/mesa/drivers/dri/i965/brw_shader_cache.c +++

[Mesa-dev] [PATCH 51/68] i965: add cache fallback support

2016-06-01 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_shader_cache.c | 43 ++-- 1 file changed, 41 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 d1336d7..625ad3f 100644 ---

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

2016-06-01 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 48/68] glsl: track mesa version shader cache items were created with

2016-06-01 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

[Mesa-dev] [PATCH 41/68] glsl: cache some more image metadata

2016-06-01 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 2e834b5..d3499ec 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@

[Mesa-dev] [PATCH 49/68] i965: add image param shader cache support

2016-06-01 Thread Timothy Arceri
--- src/mesa/drivers/dri/i965/brw_shader_cache.c | 60 +--- 1 file changed, 55 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c index 7945b16..850e1e8 100644 ---

[Mesa-dev] [PATCH 44/68] glsl: cache uniform values

2016-06-01 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

[Mesa-dev] [PATCH 47/68] glsl: add a cache_remove() function

2016-06-01 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 32/68] glsl: add support for caching subroutines

2016-06-01 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 120 + 1 file changed, 110 insertions(+), 10 deletions(-) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index d8f8709..35cd99c 100644 --- a/src/compiler/glsl/shader_cache.cpp +++

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

2016-06-01 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 +++--

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

2016-06-01 Thread Timothy Arceri
This initially adds support for simple uniforms and varyings. --- src/compiler/glsl/shader_cache.cpp | 117 + 1 file changed, 117 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 776292f..262596b 100644

[Mesa-dev] [PATCH 24/68] glsl: cache subroutine uniform storage value

2016-06-01 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 5863776..776292f 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -151,6 +151,8

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

2016-06-01 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

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

2016-06-01 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 16bfbaa..340d49a5 100644 ---

[Mesa-dev] [PATCH 42/68] glsl: don't cache shader if linking fails

2016-06-01 Thread Timothy Arceri
Fixes crash in piglit tests. The assumption is that linking was successful if we see the linked program in the cache. --- src/mesa/program/ir_to_mesa.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index

[Mesa-dev] [PATCH 35/68] glsl: add support for serialising image types

2016-06-01 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 9dc6b7c..217ba75 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -85,6

[Mesa-dev] [PATCH 18/68] glsl: add param to force shader recompile

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

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

2016-06-01 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

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

2016-06-01 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 217ba75..6773787 100644 --- a/src/compiler/glsl/shader_cache.cpp +++

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

2016-06-01 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 152 + 1 file changed, 152 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 61f8bc2..9dc6b7c 100644 --- a/src/compiler/glsl/shader_cache.cpp +++

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

2016-06-01 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 e517b7e..a25ab4e 100644 ---

[Mesa-dev] [PATCH 23/68] glsl: cache SSBO uniform storage values

2016-06-01 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 8e4209b..5863776 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -150,6

[Mesa-dev] [PATCH 22/68] glsl: cache more uniform storage values

2016-06-01 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 e7f1a21..8e4209b 100644 --- a/src/compiler/glsl/shader_cache.cpp +++

[Mesa-dev] [PATCH 21/68] glsl: don't support caching single vs or fs shaders

2016-06-01 Thread Timothy Arceri
We can add support for this later for now skip these programs. --- src/compiler/glsl/shader_cache.cpp | 5 + 1 file changed, 5 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 7e6e9ca..e7f1a21 100644 ---

[Mesa-dev] [PATCH 26/68] glsl: add shader cache support for samplers

2016-06-01 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 262596b..fdfd476 100644 --- a/src/compiler/glsl/shader_cache.cpp +++

[Mesa-dev] [PATCH 37/68] glsl: add support for caching atomic buffers

2016-06-01 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 6773787..f6e9fb6 100644 --- a/src/compiler/glsl/shader_cache.cpp +++

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

2016-06-01 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 53 -- 1 file changed, 45 insertions(+), 8 deletions(-) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 35cd99c..61f8bc2 100644 --- a/src/compiler/glsl/shader_cache.cpp +++

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

2016-06-01 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 31/68] glsl: add cache support for encoding subroutine type

2016-06-01 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 e5f5f48..d8f8709 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -79,6

[Mesa-dev] [PATCH 38/68] glsl: cache interpolation qualifier for frag shader

2016-06-01 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 f6e9fb6..c4ffbb7 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@

[Mesa-dev] [PATCH 40/68] glsl: cache clip distance array size

2016-06-01 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 c4ffbb7..2e834b5 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shader_cache.cpp @@ -900,6 +900,8

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

2016-06-01 Thread Timothy Arceri
From: Carl Worth 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,

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

2016-06-01 Thread Timothy Arceri
From: Carl Worth This uses the recently-added cache.c to write out the final, compiled, linked binary for a vertex and fragment shader programs. This is the initial implementation done by Carl with a few fixs. Further improvements will be made in following commits.

<    1   2   3   >