Validate fragment shader outputs and produce a compile error on missing or conflicting assignments.

TRAC #22704

Signed-off-by: Geoff Lang
Signed-off-by: Nicolas Capens
Authored-by: Jamie Madill
diff --git a/src/compiler/ParseHelper.cpp b/src/compiler/ParseHelper.cpp
index a30bd27..31af70d 100644
--- a/src/compiler/ParseHelper.cpp
+++ b/src/compiler/ParseHelper.cpp
@@ -2320,17 +2320,16 @@
     }
     else
     {
+        // must check that location is non-negative
         if (intValue < 0)
         {
-            error(intValueLine, "out of range", intValueString.c_str(), "value must be non-negative and < MAX_DRAW_BUFFERS");
+            error(intValueLine, "out of range:", intValueString.c_str(), "location must be non-negative");
             recover();
         }
         else
         {
             qualifier.location = intValue;
         }
-
-        // TODO: must check that location is < MAX_DRAW_BUFFERS
     }
 
     return qualifier;