Merge pull request #750 from dgkoch/rename_KHX_to_EXT
Rename KHX_multiview/device_group to EXT_multiview/device to match the released specs
diff --git a/Test/hlsl.struct.frag b/Test/hlsl.struct.frag
index e602c9e..0017b7b 100644
--- a/Test/hlsl.struct.frag
+++ b/Test/hlsl.struct.frag
@@ -12,7 +12,7 @@
myS s1;
-static struct {
+static class {
float4 i;
} s2;
@@ -32,7 +32,7 @@
float4 PixelShaderFunction(float4 input, IN_S s) : COLOR0
{
- struct FS {
+ class FS {
bool3 b3;
} s3;
diff --git a/glslang/Include/revision.h b/glslang/Include/revision.h
index e9fc7fe..e197823 100644
--- a/glslang/Include/revision.h
+++ b/glslang/Include/revision.h
@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run).
-#define GLSLANG_REVISION "Overload400-PrecQual.1871"
-#define GLSLANG_DATE "02-Mar-2017"
+#define GLSLANG_REVISION "Overload400-PrecQual.1874"
+#define GLSLANG_DATE "03-Mar-2017"
diff --git a/hlsl/hlslGrammar.cpp b/hlsl/hlslGrammar.cpp
index 86a3267..a5bccc4 100755
--- a/hlsl/hlslGrammar.cpp
+++ b/hlsl/hlslGrammar.cpp
@@ -1259,6 +1259,7 @@
return acceptStructBufferType(type);
break;
+ case EHTokClass:
case EHTokStruct:
case EHTokCBuffer:
case EHTokTBuffer:
@@ -1732,6 +1733,7 @@
//
// struct_type
// : STRUCT
+// | CLASS
// | CBUFFER
// | TBUFFER
//
@@ -1747,8 +1749,9 @@
// TBUFFER
else if (acceptTokenClass(EHTokTBuffer))
storageQualifier = EvqBuffer;
+ // CLASS
// STRUCT
- else if (! acceptTokenClass(EHTokStruct))
+ else if (! acceptTokenClass(EHTokClass) && ! acceptTokenClass(EHTokStruct))
return false;
// IDENTIFIER
diff --git a/hlsl/hlslScanContext.cpp b/hlsl/hlslScanContext.cpp
index 907ccd1..a80ee93 100755
--- a/hlsl/hlslScanContext.cpp
+++ b/hlsl/hlslScanContext.cpp
@@ -327,6 +327,7 @@
(*KeywordMap)["RWStructuredBuffer"] = EHTokRWStructuredBuffer;
(*KeywordMap)["StructuredBuffer"] = EHTokStructuredBuffer;
+ (*KeywordMap)["class"] = EHTokClass;
(*KeywordMap)["struct"] = EHTokStruct;
(*KeywordMap)["cbuffer"] = EHTokCBuffer;
(*KeywordMap)["tbuffer"] = EHTokTBuffer;
@@ -354,7 +355,6 @@
ReservedSet->insert("auto");
ReservedSet->insert("catch");
ReservedSet->insert("char");
- ReservedSet->insert("class");
ReservedSet->insert("const_cast");
ReservedSet->insert("enum");
ReservedSet->insert("explicit");
@@ -740,6 +740,7 @@
return keyword;
// variable, user type, ...
+ case EHTokClass:
case EHTokStruct:
case EHTokTypedef:
case EHTokCBuffer:
diff --git a/hlsl/hlslTokens.h b/hlsl/hlslTokens.h
index 824aa8c..1c8f528 100755
--- a/hlsl/hlslTokens.h
+++ b/hlsl/hlslTokens.h
@@ -268,6 +268,7 @@
// variable, user type, ...
EHTokIdentifier,
EHTokTypeName,
+ EHTokClass,
EHTokStruct,
EHTokCBuffer,
EHTokTBuffer,