Support ESSL 3.00 EXT_blend_func_extended shaders

This adds support for the index layout qualifier that's used in
EXT_blend_func_extended to set whether a fragment output should be
bound to the primary or secondary blend source color.

Output locations are now validated correctly so that two outputs can
have the same location as long as they have a different index. Some
tests are fixed to allow this.

BUG=angleproject:1085
TEST=angle_unittests

Change-Id: I1de3ad1406398952287791eca367562bed59d380
Reviewed-on: https://chromium-review.googlesource.com/1245982
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/compiler/translator/CollectVariables.cpp b/src/compiler/translator/CollectVariables.cpp
index f7fbd60..aa00fdb 100644
--- a/src/compiler/translator/CollectVariables.cpp
+++ b/src/compiler/translator/CollectVariables.cpp
@@ -648,6 +648,7 @@
     setCommonVariableProperties(type, variable.variable(), &outputVariable);
 
     outputVariable.location = type.getLayoutQualifier().location;
+    outputVariable.index    = type.getLayoutQualifier().index;
     return outputVariable;
 }