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

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

[Mesa-dev] [PATCH 20/68] glsl: include bindings when creating sha1 for metadata

2016-06-01 Thread Timothy Arceri
These bindings change the resulting binary so they are just as important as the shader source. --- src/compiler/glsl/shader_cache.cpp | 21 + 1 file changed, 21 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index

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

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

[Mesa-dev] [PATCH 10/68] glsl: add initial implementation of shader cache

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

[Mesa-dev] [PATCH 14/68] i965: stop leaking memory on cache restore

2016-06-01 Thread Timothy Arceri
Also replace some fallbacks with asserts. --- src/mesa/drivers/dri/i965/brw_shader_cache.c | 39 ++-- 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c index

[Mesa-dev] [PATCH 09/68] i965: add new sha1 field to context struct

2016-06-01 Thread Timothy Arceri
From: Carl Worth Signed-off-by: Timothy Arceri --- src/mesa/drivers/dri/i965/brw_context.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index

[Mesa-dev] [PATCH 16/68] i965: don't crash when there is no shader and there are uniforms

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

[Mesa-dev] [PATCH 19/68] glsl: skip shader cache unless program is a vs+fs

2016-06-01 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 74a4428..8b50ff6 100644 --- a/src/compiler/glsl/shader_cache.cpp +++

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

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

[Mesa-dev] [PATCH 15/68] glsl: call _mesa_reference_program rather than bumping ref manually

2016-06-01 Thread Timothy Arceri
--- src/compiler/glsl/shader_cache.cpp | 5 +++-- src/compiler/glsl/standalone_scaffolding.cpp | 8 src/compiler/glsl/standalone_scaffolding.h | 4 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/shader_cache.cpp

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

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

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

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

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

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

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

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

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

2016-06-01 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/68] glsl: Prepare standalone compiler to be able to use parameter lists

2016-06-01 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-dev] [PATCH 04/68] glsl: Switch to disable-by-default for the GLSL shader cache

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

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

2016-06-01 Thread Timothy Arceri
V2: - rebased on master - add support for encoding doubles - create shaders correctly (call _mesa_HashFindFreeKeyBlock(ctx->Shared->ShaderObjects, 1) to get a name) stops a crash when delete shader is called. - renamed skip_cache params to is_cache_fallback, and fix related bug when disabling

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

2016-06-01 Thread Dave Airlie
From: Dave Airlie The GLSL 4.1 spec adds: gl_MaxVertexUniformVectors gl_MaxFragmentUniformVectors gl_MaxVaryingVectors This fixes: GL45-CTS.gtf31.GL3Tests.uniform_buffer_object.uniform_buffer_object_build_in_constants Cc: "12.0 11.2"

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

2016-06-01 Thread Jason Ekstrand
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 i2f.sat > operation, which has a nir_type_float32 destination. Allow sat on all > the

<    1   2   3