support GL_EXT_texture_array extention.
This commit is contained in:
parent
c4d34471c4
commit
07e8220d4e
7 changed files with 235 additions and 1 deletions
|
|
@ -1496,6 +1496,12 @@ int TScanContext::tokenizeIdentifier()
|
|||
case USAMPLERCUBE:
|
||||
case USAMPLER2DARRAY:
|
||||
afterType = true;
|
||||
if (keyword == SAMPLER2DARRAY || keyword == SAMPLER2DARRAYSHADOW) {
|
||||
if (!parseContext.isEsProfile() &&
|
||||
(parseContext.extensionTurnedOn(E_GL_EXT_texture_array) || parseContext.symbolTable.atBuiltInLevel())) {
|
||||
return keyword;
|
||||
}
|
||||
}
|
||||
return nonreservedKeyword(300, 130);
|
||||
|
||||
case SAMPLER3D:
|
||||
|
|
@ -1539,6 +1545,12 @@ int TScanContext::tokenizeIdentifier()
|
|||
case USAMPLER1D:
|
||||
case USAMPLER1DARRAY:
|
||||
afterType = true;
|
||||
if (keyword == SAMPLER1DARRAYSHADOW) {
|
||||
if (!parseContext.isEsProfile() &&
|
||||
(parseContext.extensionTurnedOn(E_GL_EXT_texture_array) || parseContext.symbolTable.atBuiltInLevel())) {
|
||||
return keyword;
|
||||
}
|
||||
}
|
||||
return es30ReservedFromGLSL(130);
|
||||
case ISAMPLER2DRECT:
|
||||
case USAMPLER2DRECT:
|
||||
|
|
@ -1608,7 +1620,9 @@ int TScanContext::tokenizeIdentifier()
|
|||
if (parseContext.isEsProfile() && parseContext.version == 300)
|
||||
reservedWord();
|
||||
else if ((parseContext.isEsProfile() && parseContext.version < 300) ||
|
||||
(!parseContext.isEsProfile() && parseContext.version < 130))
|
||||
((!parseContext.isEsProfile() && parseContext.version < 130) &&
|
||||
!parseContext.symbolTable.atBuiltInLevel() &&
|
||||
!parseContext.extensionTurnedOn(E_GL_EXT_texture_array)))
|
||||
return identifierOrType();
|
||||
return keyword;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue