mesa/src/compiler
Lionel Landwerlin f81ede4699 glsl: builtin: always return clones of the builtins
Builtins are created once and allocated using their own private ralloc
context. When reparenting IR that includes builtins, we might be steal
bits of builtins. This is problematic because these builtins might now
be freed when the shader that includes then last is disposed. This
might also lead to inconsistent ralloc trees/lists if shaders are
created on multiple threads.

Rather than including builtins directly into a shader's IR, we should
include clones of them in the ralloc context of the shader that
requires them. This fixes double free issues we've been seeing when
running shader-db on a big multicore (72 threads) server.

v2: Also rename _mesa_glsl_find_builtin_function_by_name() to better
    reflect how this function is used. (Ken)

v3: Rename ctx to mem_ctx (Ken)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-03-09 08:30:36 +00:00
..
glsl glsl: builtin: always return clones of the builtins 2017-03-09 08:30:36 +00:00
nir nir/int64: Properly handle imod/irem 2017-03-03 13:59:27 -08:00
spirv spirv: Silence unused variable warnings in release mode 2017-03-07 15:22:16 -08:00
.gitignore nir/spirv: Remove a duplicate spirv2nir from .gitignore 2016-10-04 07:43:15 -07:00
Android.glsl.gen.mk Android: glsl: add rules to generate ir_expression*.h header files 2016-09-06 15:58:55 +01:00
Android.glsl.mk android: glsl: build shader cache sources 2017-02-20 16:30:37 +00:00
Android.mk Android: glsl: add rules to generate ir_expression*.h header files 2016-09-06 15:58:55 +01:00
Android.nir.gen.mk compiler: android: flesh out nir into separate makefile 2016-04-11 19:08:23 +01:00
Android.nir.mk android: add SPIRV_FILES to libmesa_nir 2016-11-11 07:59:29 +02:00
builtin_type_macros.h glsl: Add basic ARB_gpu_shader_int64 types 2017-01-20 15:41:23 -08:00
glsl_types.cpp compiler: Free types in _mesa_glsl_release_types() rather than autofree. 2017-02-27 15:46:12 -08:00
glsl_types.h glsl: Add basic ARB_gpu_shader_int64 types 2017-01-20 15:41:23 -08:00
Makefile.am compiler: avoid warning about redefinition of PYTHON_GEN 2016-10-26 14:54:26 +01:00
Makefile.glsl.am glsl: add initial implementation of shader cache 2017-02-17 11:18:42 +11:00
Makefile.nir.am nir: automake: add the README to the tarball 2017-02-24 17:36:45 +00:00
Makefile.sources nir: Add a simple int64 lowering pass 2017-03-01 17:00:20 -08:00
nir_types.cpp nir/types: add C accessors for 64-bit integer types. 2017-02-16 14:10:45 +10:00
nir_types.h nir/types: add C accessors for 64-bit integer types. 2017-02-16 14:10:45 +10:00
SConscript glsl: Generate ir_expression_operation.h from Python 2016-08-30 16:28:00 -07:00
SConscript.glsl mesa: Remove prog_hash_table.c 2016-09-12 10:48:35 +10:00
SConscript.nir glsl: Generate ir_expression_operation.h from Python 2016-08-30 16:28:00 -07:00
shader_enums.c compiler: add missing enums for debug 2017-02-01 15:08:30 +00:00
shader_enums.h mesa: Introduce a compiler enum for tessellation spacing. 2017-01-07 22:22:28 -08:00
shader_info.h compiler: Merge shader_info's tcs and tes structs. 2017-01-10 13:21:21 -08:00