Merge pull request #385 from steve-lunarg/inout-qualifiers

HLSL: add in/out/inout qualifiers
This commit is contained in:
John Kessenich
2016-07-13 15:42:48 -06:00
committed by GitHub
6 changed files with 264 additions and 0 deletions

View File

@@ -478,6 +478,15 @@ void HlslGrammar::acceptQualifier(TQualifier& qualifier)
case EHTokPrecise:
qualifier.noContraction = true;
break;
case EHTokIn:
qualifier.storage = EvqIn;
break;
case EHTokOut:
qualifier.storage = EvqOut;
break;
case EHTokInOut:
qualifier.storage = EvqInOut;
break;
default:
return;
}

View File

@@ -114,6 +114,9 @@ void HlslScanContext::fillInKeywordMap()
(*KeywordMap)["row_major"] = EHTokRowMajor;
(*KeywordMap)["column_major"] = EHTokColumnMajor;
(*KeywordMap)["packoffset"] = EHTokPackOffset;
(*KeywordMap)["in"] = EHTokIn;
(*KeywordMap)["out"] = EHTokOut;
(*KeywordMap)["inout"] = EHTokInOut;
(*KeywordMap)["Buffer"] = EHTokBuffer;
(*KeywordMap)["vector"] = EHTokVector;
@@ -449,6 +452,9 @@ EHlslTokenClass HlslScanContext::tokenizeIdentifier()
case EHTokRowMajor:
case EHTokColumnMajor:
case EHTokPackOffset:
case EHTokIn:
case EHTokOut:
case EHTokInOut:
return keyword;
// template types

View File

@@ -61,6 +61,9 @@ enum EHlslTokenClass {
EHTokRowMajor,
EHTokColumnMajor,
EHTokPackOffset,
EHTokIn,
EHTokOut,
EHTokInOut,
// template types
EHTokBuffer,