Support in/out for stage inputs/outputs, tied to being desktop version 150 or ES 300.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20077 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
1b12b9c575
commit
f59bfa07e0
3
Test/pre150.frag
Normal file
3
Test/pre150.frag
Normal file
@ -0,0 +1,3 @@
|
||||
varying vec4 v;
|
||||
in vec4 i;
|
||||
out vec4 o;
|
@ -1,4 +1,4 @@
|
||||
#version 110
|
||||
#version 150
|
||||
|
||||
#extension GL_3DL_array_objects : enable
|
||||
|
||||
|
@ -6,3 +6,4 @@ versionsClean.frag
|
||||
versionsClean.vert
|
||||
versionsErrors.frag
|
||||
versionsErrors.vert
|
||||
pre150.frag
|
||||
|
@ -623,14 +623,19 @@ bool TParseContext::globalQualifierFixAndErrorCheck(int line, TQualifier& qualif
|
||||
{
|
||||
switch (qualifier) {
|
||||
case EvqIn:
|
||||
profileRequires(line, ENoProfile, 130, 0, "in for stage inputs");
|
||||
profileRequires(line, EEsProfile, 300, 0, "in for stage inputs");
|
||||
qualifier = EvqVaryingIn;
|
||||
return false;
|
||||
break;
|
||||
case EvqOut:
|
||||
profileRequires(line, ENoProfile, 130, 0, "out for stage outputs");
|
||||
profileRequires(line, EEsProfile, 300, 0, "out for stage outputs");
|
||||
qualifier = EvqVaryingOut;
|
||||
return false;
|
||||
break;
|
||||
case EvqInOut:
|
||||
qualifier = EvqVaryingIn;
|
||||
error(line, "cannot use both 'in' and 'out' at global scope", "", "");
|
||||
error(line, "cannot use 'inout' at global scope", "", "");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ void TParseContext::profileRequires(int line, EProfile callingProfile, int minVe
|
||||
// one that takes a single extension
|
||||
void TParseContext::profileRequires(int line, EProfile callingProfile, int minVersion, const char* extension, const char *featureDesc)
|
||||
{
|
||||
profileRequires(line, callingProfile, minVersion, 1, &extension, featureDesc);
|
||||
profileRequires(line, callingProfile, minVersion, extension ? 1 : 0, &extension, featureDesc);
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -1417,6 +1417,9 @@ single_declaration
|
||||
: fully_specified_type {
|
||||
$$.type = $1;
|
||||
$$.intermAggregate = 0;
|
||||
|
||||
if (parseContext.globalQualifierFixAndErrorCheck($1.line, $1.qualifier))
|
||||
parseContext.recover();
|
||||
}
|
||||
| fully_specified_type IDENTIFIER {
|
||||
$$.intermAggregate = 0;
|
||||
@ -1437,6 +1440,10 @@ single_declaration
|
||||
}
|
||||
| fully_specified_type IDENTIFIER array_specifier {
|
||||
$$.intermAggregate = 0;
|
||||
|
||||
if (parseContext.globalQualifierFixAndErrorCheck($1.line, $1.qualifier))
|
||||
parseContext.recover();
|
||||
|
||||
if (parseContext.structQualifierErrorCheck($2.line, $1))
|
||||
parseContext.recover();
|
||||
|
||||
|
@ -213,7 +213,8 @@ enum TDebugOptions {
|
||||
EDebugOpIntermediate = 0x001,
|
||||
EDebugOpAssembly = 0x002,
|
||||
EDebugOpObjectCode = 0x004,
|
||||
EDebugOpLinkMaps = 0x008
|
||||
EDebugOpLinkMaps = 0x008,
|
||||
EDebugSuppressInfolog = 0x010
|
||||
};
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user