Revert "Make all fragment shader out variables require location layout qualifier"
Causes a warning on Windows:
compiler\translator\ValidateOutputs.cpp(37): warning C4804: '>' : unsafe use of type 'bool' in operation
BUG=angleproject:1070
This reverts commit 140941d066c11238ba4f2f15647fb2d65ae56faf.
Change-Id: Ieed42cdda22f17c6e15c38ee1c059184869e6919
Reviewed-on: https://chromium-review.googlesource.com/286820
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/ValidateOutputs.cpp b/src/compiler/translator/ValidateOutputs.cpp
index daa903a..614d790 100644
--- a/src/compiler/translator/ValidateOutputs.cpp
+++ b/src/compiler/translator/ValidateOutputs.cpp
@@ -14,7 +14,7 @@
mSink(sink),
mMaxDrawBuffers(maxDrawBuffers),
mNumErrors(0),
- mUnspecifiedOutputLocationCount(0)
+ mHasUnspecifiedOutputLocation(false)
{
}
@@ -32,15 +32,14 @@
{
const TType &type = symbol->getType();
const int location = type.getLayoutQualifier().location;
- const bool isUnspecifiedOutputLocation = location == -1;
- if (mUnspecifiedOutputLocationCount > 0 || (isUnspecifiedOutputLocation && !mOutputMap.empty()))
+ if (mHasUnspecifiedOutputLocation)
{
error(symbol->getLine(), "must explicitly specify all locations when using multiple fragment outputs", name.c_str());
}
- else if (isUnspecifiedOutputLocation)
+ else if (location == -1)
{
- ++mUnspecifiedOutputLocationCount;
+ mHasUnspecifiedOutputLocation = true;
}
else
{