Allow gl_FragColor and gl_FragData in non-forward-compatible contexts for non-ES versions 150 - 410. Also add deprecation message for attribute/varying for core profile.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20714 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-02-27 19:02:52 +00:00
parent df807514b6
commit ef8ae2e345
5 changed files with 31 additions and 3 deletions

View file

@ -44,6 +44,7 @@
#include "Initialize.h"
const int FirstProfileVersion = 150;
const bool ForwardCompatibility = false;
TBuiltIns::TBuiltIns()
{
@ -1284,7 +1285,7 @@ void IdentifyBuiltIns(int version, EProfile profile, EShLanguage language, TSymb
symbolTable.insert(*new TVariable(NewPoolTString("gl_PointCoord"), TType(EbtFloat, EvqPointCoord, pq, 2)));
}
if (version < FirstProfileVersion || profile == ECompatibilityProfile) {
if (version < FirstProfileVersion || profile == ECompatibilityProfile || (! ForwardCompatibility && profile != EEsProfile && version < 420)) {
pq = profile == EEsProfile ? EpqMedium : EpqNone;
symbolTable.insert(*new TVariable(NewPoolTString("gl_FragColor"), TType(EbtFloat, EvqFragColor, pq, 4)));
}
@ -1413,7 +1414,7 @@ void IdentifyBuiltIns(int version, EProfile profile, EShLanguage language, TSymb
case EShLangFragment:
// Set up gl_FragData based on current array size.
if (version < FirstProfileVersion || profile == ECompatibilityProfile) {
if (version < FirstProfileVersion || profile == ECompatibilityProfile || (! ForwardCompatibility && profile != EEsProfile && version < 420)) {
TPrecisionQualifier pq = profile == EEsProfile ? EpqMedium : EpqNone;
TType fragData(EbtFloat, EvqFragColor, 4);
TArraySizes arraySizes = NewPoolTArraySizes();