SPV: Implement Vulkan 1.1 features and extensions.
This commit is contained in:
parent
b2ae1d0521
commit
66011cb2c2
121 changed files with 51726 additions and 7500 deletions
|
|
@ -1,6 +1,7 @@
|
|||
//
|
||||
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
|
||||
// Copyright (C) 2012-2013 LunarG, Inc.
|
||||
// Copyright (C) 2017 ARM Limited.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
|
|
@ -46,17 +47,15 @@ enum TBasicType {
|
|||
EbtVoid,
|
||||
EbtFloat,
|
||||
EbtDouble,
|
||||
#ifdef AMD_EXTENSIONS
|
||||
EbtFloat16,
|
||||
#endif
|
||||
EbtInt8,
|
||||
EbtUint8,
|
||||
EbtInt16,
|
||||
EbtUint16,
|
||||
EbtInt,
|
||||
EbtUint,
|
||||
EbtInt64,
|
||||
EbtUint64,
|
||||
#ifdef AMD_EXTENSIONS
|
||||
EbtInt16,
|
||||
EbtUint16,
|
||||
#endif
|
||||
EbtBool,
|
||||
EbtAtomicUint,
|
||||
EbtSampler,
|
||||
|
|
@ -141,6 +140,8 @@ enum TBuiltInVariable {
|
|||
EbvLocalInvocationId,
|
||||
EbvGlobalInvocationId,
|
||||
EbvLocalInvocationIndex,
|
||||
EbvNumSubgroups,
|
||||
EbvSubgroupID,
|
||||
EbvSubGroupSize,
|
||||
EbvSubGroupInvocation,
|
||||
EbvSubGroupEqMask,
|
||||
|
|
@ -148,6 +149,13 @@ enum TBuiltInVariable {
|
|||
EbvSubGroupGtMask,
|
||||
EbvSubGroupLeMask,
|
||||
EbvSubGroupLtMask,
|
||||
EbvSubgroupSize2,
|
||||
EbvSubgroupInvocation2,
|
||||
EbvSubgroupEqMask2,
|
||||
EbvSubgroupGeMask2,
|
||||
EbvSubgroupGtMask2,
|
||||
EbvSubgroupLeMask2,
|
||||
EbvSubgroupLtMask2,
|
||||
EbvVertexId,
|
||||
EbvInstanceId,
|
||||
EbvVertexIndex,
|
||||
|
|
@ -373,7 +381,7 @@ enum TPrecisionQualifier {
|
|||
|
||||
__inline const char* GetPrecisionQualifierString(TPrecisionQualifier p)
|
||||
{
|
||||
switch(p) {
|
||||
switch (p) {
|
||||
case EpqNone: return ""; break;
|
||||
case EpqLow: return "lowp"; break;
|
||||
case EpqMedium: return "mediump"; break;
|
||||
|
|
@ -382,6 +390,75 @@ __inline const char* GetPrecisionQualifierString(TPrecisionQualifier p)
|
|||
}
|
||||
}
|
||||
|
||||
__inline bool isTypeSignedInt(TBasicType type)
|
||||
{
|
||||
switch (type) {
|
||||
case EbtInt8:
|
||||
case EbtInt16:
|
||||
case EbtInt:
|
||||
case EbtInt64:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
__inline bool isTypeUnsignedInt(TBasicType type)
|
||||
{
|
||||
switch (type) {
|
||||
case EbtUint8:
|
||||
case EbtUint16:
|
||||
case EbtUint:
|
||||
case EbtUint64:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
__inline bool isTypeInt(TBasicType type)
|
||||
{
|
||||
return isTypeSignedInt(type) || isTypeUnsignedInt(type);
|
||||
}
|
||||
|
||||
__inline bool isTypeFloat(TBasicType type)
|
||||
{
|
||||
switch (type) {
|
||||
case EbtFloat:
|
||||
case EbtDouble:
|
||||
case EbtFloat16:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
__inline int getTypeRank(TBasicType type) {
|
||||
int res = -1;
|
||||
switch(type) {
|
||||
case EbtInt8:
|
||||
case EbtUint8:
|
||||
res = 0;
|
||||
break;
|
||||
case EbtInt16:
|
||||
case EbtUint16:
|
||||
res = 1;
|
||||
break;
|
||||
case EbtInt:
|
||||
case EbtUint:
|
||||
res = 2;
|
||||
break;
|
||||
case EbtInt64:
|
||||
case EbtUint64:
|
||||
res = 3;
|
||||
break;
|
||||
default:
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
} // end namespace glslang
|
||||
|
||||
#endif // _BASICTYPES_INCLUDED_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue