nir: remove dead glsl variables before lowering io.
authorDave Airlie <airlied@redhat.com>
Fri, 20 May 2016 20:48:05 +0000 (06:48 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 20 May 2016 22:56:45 +0000 (08:56 +1000)
commit0970c563d6e4a30ab0852ef664dc97a995997f88
treead14d2668f267bc1fba82f12bd3d6d03f94cec32
parentde45da6a8c3091de400adc468682779abc989109
nir: remove dead glsl variables before lowering io.

For cull distance GLSL will let unsized unused arrays get
into the backend, we should nuke those straight away, to
save caring about them later.

This fixes:
arb_separate_shader_objects/linker/large-number-of-unused-varyings
as a side effect (even without culling changes).

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/mesa/drivers/dri/i965/brw_nir.c