glsl: fix slot_end calculations and simplify reserved_slots check
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 5 Nov 2016 01:01:18 +0000 (21:01 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Thu, 10 Nov 2016 01:25:15 +0000 (20:25 -0500)
commit885c78801785701fdca0217a7b0f992f26115ee4
tree7e0be956ad77ef458cf952be961250e9cf4a7d61
parent828faaef40f9bd50cb75c2cde0d9393bc3fb6695
glsl: fix slot_end calculations and simplify reserved_slots check

The previous code was confused about whether slot_end was inclusive or
exclusive. Make it so that it is inclusive consistently, and use it for
setting the new location. This also avoids discrepancies in how
num_components is calculated vs the more manual approach taken for the
former reserved_slots check.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
src/compiler/glsl/link_varyings.cpp