mesa: reset linked_stages bitmask when re-linking
authorTimothy Arceri <timothy.arceri@collabora.com>
Wed, 30 Nov 2016 21:52:20 +0000 (08:52 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Wed, 30 Nov 2016 23:24:16 +0000 (10:24 +1100)
commit966567aa1296f99b16baec1ce92d64a8b3533d25
treeaad8e5c66fbe0b9b93737cf7c880c569c9e08eaf
parent45eef9af03639a409ef54b136bb4902b9825864b
mesa: reset linked_stages bitmask when re-linking

34953f8907fdd added this bitmask but it wasn't being reset when
a program was relinked. If a stage was removed from the new
program then it could case a crash as we expect the linked shader
for that stage to not be null.

Fixes crashes in:
ESEXT-CTS.tessellation_shader.single.xfb_captures_data_from_correct_stage
ES31-CTS.core.tessellation_shader.single.xfb_captures_data_from_correct_stage

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98917
src/mesa/main/shaderobj.c