mesa/src
Kenneth Graunke 99df02ca26 i965: Don't re-layout varyings for separate shader programs.
Previously, our VUE map code always assigned slots to varyings
sequentially, in one contiguous block.

This was a bad fit for separate shaders - the GS input layout depended
or the VS output layout, so if we swapped out vertex shaders, we might
have to recompile the GS on the fly - which rather defeats the point of
using separate shader objects.  (Tessellation would suffer from this
as well - we could have to recompile the HS, DS, and GS.)

Instead, this patch makes the VUE map for separate shaders use a fixed
layout, based on the input/output variable's location field.  (This is
either specified by layout(location = ...) or assigned by the linker.)
Corresponding inputs/outputs will match up by location; if there's a
mismatch, we're allowed to have undefined behavior.

This may be less efficient - depending what locations were chosen, we
may have empty padding slots in the VUE.  But applications presumably
use small consecutive integers for locations, so it hopefully won't be
much worse in practice.

3% of Dota 2 Reborn shaders are hurt, but only by 2 instructions.
This seems like a small price to pay for avoiding recompiles.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
2015-09-26 11:59:56 -07:00
..
egl wayland: Add copyright notice for wayland-egl.c 2015-09-24 10:51:10 -07:00
gallium radeonsi: add scratch buffer to the buffer list when it's re-allocated 2015-09-26 01:51:05 +02:00
gbm gbm: convert gbm bo format to fourcc format on dma-buf import 2015-09-15 12:27:45 +01:00
getopt
glsl glsl: calculate component size for arrays of arrays when varying packing disabled 2015-09-26 22:48:49 +10:00
glx glxl/tests: Use X11_INCLUDES instead of X11_CFLAGS 2015-09-07 10:43:32 +01:00
gtest mesa: Enable subdir-objects globally. 2015-06-26 12:55:25 +01:00
hgl glapi/hgl: Drop extern "C" as it was added to glapi 2015-05-13 15:26:29 -04:00
loader loader: use HAVE_LIBDRM instead of ! __NOT_HAVE_DRM_H 2015-07-22 16:35:25 +01:00
mapi glapi: add ARB_shader_storage_block_buffer_object 2015-09-25 08:39:23 +02:00
mesa i965: Don't re-layout varyings for separate shader programs. 2015-09-26 11:59:56 -07:00
util util: automake: rework the format_srgb.c rule 2015-09-09 12:48:09 +01:00
Makefile.am glsl: shader-enum to name debug fxns 2015-09-16 10:04:13 -04:00
SConscript scons: rework the EGL build 2015-07-22 16:35:27 +01:00