mesa/src/compiler
Nicolai Hähnle 0d383a79a8 glsl/lower_output_reads: fix geometry shader output handling with conditional emit
Consider a geometry shader that contains code like this:

   some_out = expr;

   if (cond) {
      ...
      EmitVertex();
   } else {
      ...
      EmitVertex();
   }

Both branches should see the correct value of some_out.

Since this is a rather subtle and rare case, I'm submitting a piglit test
for this as well.

GLSL says that the values of output variables are undefined after
EmitVertex(). With this change, the values will now be defined and
unmodified. This may reduce optimization opportunities in the probably
quite rare case where subsequent compiler passes cannot prove that the
value of the output variable is overwritten.

Cc: 13.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-11-21 08:21:31 +01:00
..
glsl glsl/lower_output_reads: fix geometry shader output handling with conditional emit 2016-11-21 08:21:31 +01:00
nir st/mesa/glsl/nir/i965: make use of new gl_shader_program_data in gl_shader_program 2016-11-19 15:45:46 +11:00
spirv nir/spirv: Fix handling of gl_PrimitiveId 2016-11-16 20:07:23 -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: add rules to generate ir_expression*.h header files 2016-09-06 15:58:55 +01: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 subpass image type (v2) 2016-09-16 15:16:31 +10:00
glsl_types.cpp glsl: Fix reading of uninitialized memory 2016-10-31 11:53:38 +01:00
glsl_types.h glsl: initialize glsl_struct_field properly 2016-10-31 11:53:38 +01:00
Makefile.am compiler: avoid warning about redefinition of PYTHON_GEN 2016-10-26 14:54:26 +01:00
Makefile.glsl.am util: import cache.c/h from glsl 2016-11-15 20:22:28 +01:00
Makefile.nir.am compiler: avoid warning about redefinition of PYTHON_GEN 2016-10-26 14:54:26 +01:00
Makefile.sources util: import cache.c/h from glsl 2016-11-15 20:22:28 +01:00
nir_types.cpp nir: Add a C wrapper for glsl_type::is_array_of_arrays(). 2016-11-19 12:30:26 -08:00
nir_types.h nir: Add a C wrapper for glsl_type::is_array_of_arrays(). 2016-11-19 12:30:26 -08: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 printable values for cull distance varyings. 2016-10-04 10:15:23 +10:00
shader_enums.h mesa/compiler: move MAX_VARYING to shader_enums.h 2016-11-11 09:17:07 +11:00
shader_info.h compiler: Store the clip/cull distance array sizes in shader_info. 2016-11-19 12:30:25 -08:00