mesa/src/compiler
Jason Ekstrand b86dba8a0e nir: Embed the shader_info in the nir_shader again
Commit e1af20f18a changed the shader_info
from being embedded into being just a pointer.  The idea was that
sharing the shader_info between NIR and GLSL would be easier if it were
a pointer pointing to the same shader_info struct.  This, however, has
caused a few problems:

 1) There are many things which generate NIR without GLSL.  This means
    we have to support both NIR shaders which come from GLSL and ones
    that don't and need to have an info elsewhere.

 2) The solution to (1) raises all sorts of ownership issues which have
    to be resolved with ralloc_parent checks.

 3) Ever since 00620782c9, we've been
    using nir_gather_info to fill out the final shader_info.  Thanks to
    cloning and the above ownership issues, the nir_shader::info may not
    point back to the gl_shader anymore and so we have to do a copy of
    the shader_info from NIR back to GLSL anyway.

All of these issues go away if we just embed the shader_info in the
nir_shader.  There's a little downside of having to copy it back after
calling nir_gather_info but, as explained above, we have to do that
anyway.

Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-05-09 15:07:47 -07:00
..
glsl nir: Embed the shader_info in the nir_shader again 2017-05-09 15:07:47 -07:00
nir nir: Embed the shader_info in the nir_shader again 2017-05-09 15:07:47 -07:00
spirv nir: Embed the shader_info in the nir_shader again 2017-05-09 15:07:47 -07:00
.gitignore nir/spirv: Remove a duplicate spirv2nir from .gitignore 2016-10-04 07:43:15 -07:00
Android.glsl.gen.mk Android: clean-up trailing '\' in make variables 2017-03-22 17:52:06 +00: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: clean-up trailing '\' in make variables 2017-03-22 17:52:06 +00:00
builtin_type_macros.h glsl: Add basic ARB_gpu_shader_int64 types 2017-01-20 15:41:23 -08:00
glsl_types.cpp glsl: Restrict functions to not return arrays or SOAs in GLSL 1.00. 2017-05-08 12:15:49 -07:00
glsl_types.h glsl: Restrict functions to not return arrays or SOAs in GLSL 1.00. 2017-05-08 12:15:49 -07:00
Makefile.am compiler: avoid warning about redefinition of PYTHON_GEN 2016-10-26 14:54:26 +01:00
Makefile.glsl.am glsl: automake: export abs_builddir for the tests 2017-03-28 15:31:22 +01:00
Makefile.nir.am nir: automake: add the README to the tarball 2017-02-24 17:36:45 +00:00
Makefile.sources nir: add pass to lower atomic counters to SSBO 2017-05-04 13:48:06 -04:00
nir_types.cpp nir: add a C wrapper for glsl_type::get_interface_instance() 2017-05-04 13:48:06 -04:00
nir_types.h nir: add a C wrapper for glsl_type::get_interface_instance() 2017-05-04 13:48:06 -04: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 a system value and varying for ViewIndex 2017-05-03 11:25:46 -07:00
shader_enums.h compiler: Add a system value and varying for ViewIndex 2017-05-03 11:25:46 -07:00
shader_info.h compiler: Merge shader_info's tcs and tes structs. 2017-01-10 13:21:21 -08:00