SPV: Implement Vulkan 1.1 features and extensions.
This commit is contained in:
@@ -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_
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
//
|
||||
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
|
||||
// Copyright (C) 2013 LunarG, Inc.
|
||||
// Copyright (C) 2017 ARM Limited.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@@ -48,6 +49,30 @@ public:
|
||||
|
||||
TConstUnion() : iConst(0), type(EbtInt) { }
|
||||
|
||||
void setI8Const(signed char i)
|
||||
{
|
||||
i8Const = i;
|
||||
type = EbtInt8;
|
||||
}
|
||||
|
||||
void setU8Const(unsigned char u)
|
||||
{
|
||||
u8Const = u;
|
||||
type = EbtUint8;
|
||||
}
|
||||
|
||||
void setI16Const(signed short i)
|
||||
{
|
||||
i16Const = i;
|
||||
type = EbtInt16;
|
||||
}
|
||||
|
||||
void setU16Const(unsigned short u)
|
||||
{
|
||||
u16Const = u;
|
||||
type = EbtUint16;
|
||||
}
|
||||
|
||||
void setIConst(int i)
|
||||
{
|
||||
iConst = i;
|
||||
@@ -90,6 +115,10 @@ public:
|
||||
type = EbtString;
|
||||
}
|
||||
|
||||
signed char getI8Const() const { return i8Const; }
|
||||
unsigned char getU8Const() const { return u8Const; }
|
||||
signed short getI16Const() const { return i16Const; }
|
||||
unsigned short getU16Const() const { return u16Const; }
|
||||
int getIConst() const { return iConst; }
|
||||
unsigned int getUConst() const { return uConst; }
|
||||
long long getI64Const() const { return i64Const; }
|
||||
@@ -98,6 +127,38 @@ public:
|
||||
bool getBConst() const { return bConst; }
|
||||
const TString* getSConst() const { return sConst; }
|
||||
|
||||
bool operator==(const signed char i) const
|
||||
{
|
||||
if (i == i8Const)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool operator==(const unsigned char u) const
|
||||
{
|
||||
if (u == u8Const)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool operator==(const signed short i) const
|
||||
{
|
||||
if (i == i16Const)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool operator==(const unsigned short u) const
|
||||
{
|
||||
if (u == u16Const)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool operator==(const int i) const
|
||||
{
|
||||
if (i == iConst)
|
||||
@@ -152,6 +213,26 @@ public:
|
||||
return false;
|
||||
|
||||
switch (type) {
|
||||
case EbtInt16:
|
||||
if (constant.i16Const == i16Const)
|
||||
return true;
|
||||
|
||||
break;
|
||||
case EbtUint16:
|
||||
if (constant.u16Const == u16Const)
|
||||
return true;
|
||||
|
||||
break;
|
||||
case EbtInt8:
|
||||
if (constant.i8Const == i8Const)
|
||||
return true;
|
||||
|
||||
break;
|
||||
case EbtUint8:
|
||||
if (constant.u8Const == u8Const)
|
||||
return true;
|
||||
|
||||
break;
|
||||
case EbtInt:
|
||||
if (constant.iConst == iConst)
|
||||
return true;
|
||||
@@ -189,6 +270,26 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
bool operator!=(const signed char i) const
|
||||
{
|
||||
return !operator==(i);
|
||||
}
|
||||
|
||||
bool operator!=(const unsigned char u) const
|
||||
{
|
||||
return !operator==(u);
|
||||
}
|
||||
|
||||
bool operator!=(const signed short i) const
|
||||
{
|
||||
return !operator==(i);
|
||||
}
|
||||
|
||||
bool operator!=(const unsigned short u) const
|
||||
{
|
||||
return !operator==(u);
|
||||
}
|
||||
|
||||
bool operator!=(const int i) const
|
||||
{
|
||||
return !operator==(i);
|
||||
@@ -228,6 +329,26 @@ public:
|
||||
{
|
||||
assert(type == constant.type);
|
||||
switch (type) {
|
||||
case EbtInt8:
|
||||
if (i8Const > constant.i8Const)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
case EbtUint8:
|
||||
if (u8Const > constant.u8Const)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
case EbtInt16:
|
||||
if (i16Const > constant.i16Const)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
case EbtUint16:
|
||||
if (u16Const > constant.u16Const)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
case EbtInt:
|
||||
if (iConst > constant.iConst)
|
||||
return true;
|
||||
@@ -263,6 +384,26 @@ public:
|
||||
{
|
||||
assert(type == constant.type);
|
||||
switch (type) {
|
||||
case EbtInt8:
|
||||
if (i8Const < constant.i8Const)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
case EbtUint8:
|
||||
if (u8Const < constant.u8Const)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
case EbtInt16:
|
||||
if (i16Const < constant.i16Const)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
case EbtUint16:
|
||||
if (u16Const < constant.u16Const)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
case EbtInt:
|
||||
if (iConst < constant.iConst)
|
||||
return true;
|
||||
@@ -299,9 +440,13 @@ public:
|
||||
TConstUnion returnValue;
|
||||
assert(type == constant.type);
|
||||
switch (type) {
|
||||
case EbtInt: returnValue.setIConst(iConst + constant.iConst); break;
|
||||
case EbtInt64: returnValue.setI64Const(i64Const + constant.i64Const); break;
|
||||
case EbtUint: returnValue.setUConst(uConst + constant.uConst); break;
|
||||
case EbtInt8: returnValue.setI8Const(i8Const + constant.i8Const); break;
|
||||
case EbtInt16: returnValue.setI16Const(i16Const + constant.i16Const); break;
|
||||
case EbtInt: returnValue.setIConst(iConst + constant.iConst); break;
|
||||
case EbtInt64: returnValue.setI64Const(i64Const + constant.i64Const); break;
|
||||
case EbtUint8: returnValue.setU8Const(u8Const + constant.u8Const); break;
|
||||
case EbtUint16: returnValue.setU16Const(u16Const + constant.u16Const); break;
|
||||
case EbtUint: returnValue.setUConst(uConst + constant.uConst); break;
|
||||
case EbtUint64: returnValue.setU64Const(u64Const + constant.u64Const); break;
|
||||
case EbtDouble: returnValue.setDConst(dConst + constant.dConst); break;
|
||||
default: assert(false && "Default missing");
|
||||
@@ -315,9 +460,13 @@ public:
|
||||
TConstUnion returnValue;
|
||||
assert(type == constant.type);
|
||||
switch (type) {
|
||||
case EbtInt: returnValue.setIConst(iConst - constant.iConst); break;
|
||||
case EbtInt64: returnValue.setI64Const(i64Const - constant.i64Const); break;
|
||||
case EbtUint: returnValue.setUConst(uConst - constant.uConst); break;
|
||||
case EbtInt8: returnValue.setI8Const(i8Const - constant.i8Const); break;
|
||||
case EbtInt16: returnValue.setI16Const(i16Const - constant.i16Const); break;
|
||||
case EbtInt: returnValue.setIConst(iConst - constant.iConst); break;
|
||||
case EbtInt64: returnValue.setI64Const(i64Const - constant.i64Const); break;
|
||||
case EbtUint8: returnValue.setU8Const(u8Const - constant.u8Const); break;
|
||||
case EbtUint16: returnValue.setU16Const(u16Const - constant.u16Const); break;
|
||||
case EbtUint: returnValue.setUConst(uConst - constant.uConst); break;
|
||||
case EbtUint64: returnValue.setU64Const(u64Const - constant.u64Const); break;
|
||||
case EbtDouble: returnValue.setDConst(dConst - constant.dConst); break;
|
||||
default: assert(false && "Default missing");
|
||||
@@ -331,9 +480,13 @@ public:
|
||||
TConstUnion returnValue;
|
||||
assert(type == constant.type);
|
||||
switch (type) {
|
||||
case EbtInt: returnValue.setIConst(iConst * constant.iConst); break;
|
||||
case EbtInt64: returnValue.setI64Const(i64Const * constant.i64Const); break;
|
||||
case EbtUint: returnValue.setUConst(uConst * constant.uConst); break;
|
||||
case EbtInt8: returnValue.setI8Const(i8Const * constant.i8Const); break;
|
||||
case EbtInt16: returnValue.setI16Const(i16Const * constant.i16Const); break;
|
||||
case EbtInt: returnValue.setIConst(iConst * constant.iConst); break;
|
||||
case EbtInt64: returnValue.setI64Const(i64Const * constant.i64Const); break;
|
||||
case EbtUint8: returnValue.setU8Const(u8Const * constant.u8Const); break;
|
||||
case EbtUint16: returnValue.setU16Const(u16Const * constant.u16Const); break;
|
||||
case EbtUint: returnValue.setUConst(uConst * constant.uConst); break;
|
||||
case EbtUint64: returnValue.setU64Const(u64Const * constant.u64Const); break;
|
||||
case EbtDouble: returnValue.setDConst(dConst * constant.dConst); break;
|
||||
default: assert(false && "Default missing");
|
||||
@@ -347,9 +500,13 @@ public:
|
||||
TConstUnion returnValue;
|
||||
assert(type == constant.type);
|
||||
switch (type) {
|
||||
case EbtInt: returnValue.setIConst(iConst % constant.iConst); break;
|
||||
case EbtInt64: returnValue.setI64Const(i64Const % constant.i64Const); break;
|
||||
case EbtUint: returnValue.setUConst(uConst % constant.uConst); break;
|
||||
case EbtInt8: returnValue.setI8Const(i8Const % constant.i8Const); break;
|
||||
case EbtInt16: returnValue.setI8Const(i8Const % constant.i16Const); break;
|
||||
case EbtInt: returnValue.setIConst(iConst % constant.iConst); break;
|
||||
case EbtInt64: returnValue.setI64Const(i64Const % constant.i64Const); break;
|
||||
case EbtUint8: returnValue.setU8Const(u8Const % constant.u8Const); break;
|
||||
case EbtUint16: returnValue.setU16Const(u16Const % constant.u16Const); break;
|
||||
case EbtUint: returnValue.setUConst(uConst % constant.uConst); break;
|
||||
case EbtUint64: returnValue.setU64Const(u64Const % constant.u64Const); break;
|
||||
default: assert(false && "Default missing");
|
||||
}
|
||||
@@ -361,8 +518,64 @@ public:
|
||||
{
|
||||
TConstUnion returnValue;
|
||||
switch (type) {
|
||||
case EbtInt8:
|
||||
switch (constant.type) {
|
||||
case EbtInt8: returnValue.setI8Const(i8Const >> constant.i8Const); break;
|
||||
case EbtUint8: returnValue.setI8Const(i8Const >> constant.u8Const); break;
|
||||
case EbtInt16: returnValue.setI8Const(i8Const >> constant.i16Const); break;
|
||||
case EbtUint16: returnValue.setI8Const(i8Const >> constant.u16Const); break;
|
||||
case EbtInt: returnValue.setI8Const(i8Const >> constant.iConst); break;
|
||||
case EbtUint: returnValue.setI8Const(i8Const >> constant.uConst); break;
|
||||
case EbtInt64: returnValue.setI8Const(i8Const >> constant.i64Const); break;
|
||||
case EbtUint64: returnValue.setI8Const(i8Const >> constant.u64Const); break;
|
||||
default: assert(false && "Default missing");
|
||||
}
|
||||
break;
|
||||
case EbtUint8:
|
||||
switch (constant.type) {
|
||||
case EbtInt8: returnValue.setU8Const(u8Const >> constant.i8Const); break;
|
||||
case EbtUint8: returnValue.setU8Const(u8Const >> constant.u8Const); break;
|
||||
case EbtInt16: returnValue.setU8Const(u8Const >> constant.i16Const); break;
|
||||
case EbtUint16: returnValue.setU8Const(u8Const >> constant.u16Const); break;
|
||||
case EbtInt: returnValue.setU8Const(u8Const >> constant.iConst); break;
|
||||
case EbtUint: returnValue.setU8Const(u8Const >> constant.uConst); break;
|
||||
case EbtInt64: returnValue.setU8Const(u8Const >> constant.i64Const); break;
|
||||
case EbtUint64: returnValue.setU8Const(u8Const >> constant.u64Const); break;
|
||||
default: assert(false && "Default missing");
|
||||
}
|
||||
break;
|
||||
case EbtInt16:
|
||||
switch (constant.type) {
|
||||
case EbtInt8: returnValue.setI16Const(i16Const >> constant.i8Const); break;
|
||||
case EbtUint8: returnValue.setI16Const(i16Const >> constant.u8Const); break;
|
||||
case EbtInt16: returnValue.setI16Const(i16Const >> constant.i16Const); break;
|
||||
case EbtUint16: returnValue.setI16Const(i16Const >> constant.u16Const); break;
|
||||
case EbtInt: returnValue.setI16Const(i16Const >> constant.iConst); break;
|
||||
case EbtUint: returnValue.setI16Const(i16Const >> constant.uConst); break;
|
||||
case EbtInt64: returnValue.setI16Const(i16Const >> constant.i64Const); break;
|
||||
case EbtUint64: returnValue.setI16Const(i16Const >> constant.u64Const); break;
|
||||
default: assert(false && "Default missing");
|
||||
}
|
||||
break;
|
||||
case EbtUint16:
|
||||
switch (constant.type) {
|
||||
case EbtInt8: returnValue.setU16Const(u16Const >> constant.i8Const); break;
|
||||
case EbtUint8: returnValue.setU16Const(u16Const >> constant.u8Const); break;
|
||||
case EbtInt16: returnValue.setU16Const(u16Const >> constant.i16Const); break;
|
||||
case EbtUint16: returnValue.setU16Const(u16Const >> constant.u16Const); break;
|
||||
case EbtInt: returnValue.setU16Const(u16Const >> constant.iConst); break;
|
||||
case EbtUint: returnValue.setU16Const(u16Const >> constant.uConst); break;
|
||||
case EbtInt64: returnValue.setU16Const(u16Const >> constant.i64Const); break;
|
||||
case EbtUint64: returnValue.setU16Const(u16Const >> constant.u64Const); break;
|
||||
default: assert(false && "Default missing");
|
||||
}
|
||||
break;
|
||||
case EbtInt:
|
||||
switch (constant.type) {
|
||||
case EbtInt8: returnValue.setIConst(iConst >> constant.i8Const); break;
|
||||
case EbtUint8: returnValue.setIConst(iConst >> constant.u8Const); break;
|
||||
case EbtInt16: returnValue.setIConst(iConst >> constant.i16Const); break;
|
||||
case EbtUint16: returnValue.setIConst(iConst >> constant.u16Const); break;
|
||||
case EbtInt: returnValue.setIConst(iConst >> constant.iConst); break;
|
||||
case EbtUint: returnValue.setIConst(iConst >> constant.uConst); break;
|
||||
case EbtInt64: returnValue.setIConst(iConst >> constant.i64Const); break;
|
||||
@@ -372,6 +585,10 @@ public:
|
||||
break;
|
||||
case EbtUint:
|
||||
switch (constant.type) {
|
||||
case EbtInt8: returnValue.setUConst(uConst >> constant.i8Const); break;
|
||||
case EbtUint8: returnValue.setUConst(uConst >> constant.u8Const); break;
|
||||
case EbtInt16: returnValue.setUConst(uConst >> constant.i16Const); break;
|
||||
case EbtUint16: returnValue.setUConst(uConst >> constant.u16Const); break;
|
||||
case EbtInt: returnValue.setUConst(uConst >> constant.iConst); break;
|
||||
case EbtUint: returnValue.setUConst(uConst >> constant.uConst); break;
|
||||
case EbtInt64: returnValue.setUConst(uConst >> constant.i64Const); break;
|
||||
@@ -381,6 +598,10 @@ public:
|
||||
break;
|
||||
case EbtInt64:
|
||||
switch (constant.type) {
|
||||
case EbtInt8: returnValue.setI64Const(i64Const >> constant.i8Const); break;
|
||||
case EbtUint8: returnValue.setI64Const(i64Const >> constant.u8Const); break;
|
||||
case EbtInt16: returnValue.setI64Const(i64Const >> constant.i16Const); break;
|
||||
case EbtUint16: returnValue.setI64Const(i64Const >> constant.u16Const); break;
|
||||
case EbtInt: returnValue.setI64Const(i64Const >> constant.iConst); break;
|
||||
case EbtUint: returnValue.setI64Const(i64Const >> constant.uConst); break;
|
||||
case EbtInt64: returnValue.setI64Const(i64Const >> constant.i64Const); break;
|
||||
@@ -390,6 +611,10 @@ public:
|
||||
break;
|
||||
case EbtUint64:
|
||||
switch (constant.type) {
|
||||
case EbtInt8: returnValue.setU64Const(u64Const >> constant.i8Const); break;
|
||||
case EbtUint8: returnValue.setU64Const(u64Const >> constant.u8Const); break;
|
||||
case EbtInt16: returnValue.setU64Const(u64Const >> constant.i16Const); break;
|
||||
case EbtUint16: returnValue.setU64Const(u64Const >> constant.u16Const); break;
|
||||
case EbtInt: returnValue.setU64Const(u64Const >> constant.iConst); break;
|
||||
case EbtUint: returnValue.setU64Const(u64Const >> constant.uConst); break;
|
||||
case EbtInt64: returnValue.setU64Const(u64Const >> constant.i64Const); break;
|
||||
@@ -407,8 +632,64 @@ public:
|
||||
{
|
||||
TConstUnion returnValue;
|
||||
switch (type) {
|
||||
case EbtInt8:
|
||||
switch (constant.type) {
|
||||
case EbtInt8: returnValue.setI8Const(i8Const << constant.i8Const); break;
|
||||
case EbtUint8: returnValue.setI8Const(i8Const << constant.u8Const); break;
|
||||
case EbtInt16: returnValue.setI8Const(i8Const << constant.i16Const); break;
|
||||
case EbtUint16: returnValue.setI8Const(i8Const << constant.u16Const); break;
|
||||
case EbtInt: returnValue.setI8Const(i8Const << constant.iConst); break;
|
||||
case EbtUint: returnValue.setI8Const(i8Const << constant.uConst); break;
|
||||
case EbtInt64: returnValue.setI8Const(i8Const << constant.i64Const); break;
|
||||
case EbtUint64: returnValue.setI8Const(i8Const << constant.u64Const); break;
|
||||
default: assert(false && "Default missing");
|
||||
}
|
||||
break;
|
||||
case EbtUint8:
|
||||
switch (constant.type) {
|
||||
case EbtInt8: returnValue.setU8Const(u8Const << constant.i8Const); break;
|
||||
case EbtUint8: returnValue.setU8Const(u8Const << constant.u8Const); break;
|
||||
case EbtInt16: returnValue.setU8Const(u8Const << constant.i16Const); break;
|
||||
case EbtUint16: returnValue.setU8Const(u8Const << constant.u16Const); break;
|
||||
case EbtInt: returnValue.setU8Const(u8Const << constant.iConst); break;
|
||||
case EbtUint: returnValue.setU8Const(u8Const << constant.uConst); break;
|
||||
case EbtInt64: returnValue.setU8Const(u8Const << constant.i64Const); break;
|
||||
case EbtUint64: returnValue.setU8Const(u8Const << constant.u64Const); break;
|
||||
default: assert(false && "Default missing");
|
||||
}
|
||||
break;
|
||||
case EbtInt16:
|
||||
switch (constant.type) {
|
||||
case EbtInt8: returnValue.setI16Const(i16Const << constant.i8Const); break;
|
||||
case EbtUint8: returnValue.setI16Const(i16Const << constant.u8Const); break;
|
||||
case EbtInt16: returnValue.setI16Const(i16Const << constant.i16Const); break;
|
||||
case EbtUint16: returnValue.setI16Const(i16Const << constant.u16Const); break;
|
||||
case EbtInt: returnValue.setI16Const(i16Const << constant.iConst); break;
|
||||
case EbtUint: returnValue.setI16Const(i16Const << constant.uConst); break;
|
||||
case EbtInt64: returnValue.setI16Const(i16Const << constant.i64Const); break;
|
||||
case EbtUint64: returnValue.setI16Const(i16Const << constant.u64Const); break;
|
||||
default: assert(false && "Default missing");
|
||||
}
|
||||
break;
|
||||
case EbtUint16:
|
||||
switch (constant.type) {
|
||||
case EbtInt8: returnValue.setU16Const(u16Const << constant.i8Const); break;
|
||||
case EbtUint8: returnValue.setU16Const(u16Const << constant.u8Const); break;
|
||||
case EbtInt16: returnValue.setU16Const(u16Const << constant.i16Const); break;
|
||||
case EbtUint16: returnValue.setU16Const(u16Const << constant.u16Const); break;
|
||||
case EbtInt: returnValue.setU16Const(u16Const << constant.iConst); break;
|
||||
case EbtUint: returnValue.setU16Const(u16Const << constant.uConst); break;
|
||||
case EbtInt64: returnValue.setU16Const(u16Const << constant.i64Const); break;
|
||||
case EbtUint64: returnValue.setU16Const(u16Const << constant.u64Const); break;
|
||||
default: assert(false && "Default missing");
|
||||
}
|
||||
break;
|
||||
case EbtInt:
|
||||
switch (constant.type) {
|
||||
case EbtInt8: returnValue.setIConst(iConst << constant.i8Const); break;
|
||||
case EbtUint8: returnValue.setIConst(iConst << constant.u8Const); break;
|
||||
case EbtInt16: returnValue.setIConst(iConst << constant.i16Const); break;
|
||||
case EbtUint16: returnValue.setIConst(iConst << constant.u16Const); break;
|
||||
case EbtInt: returnValue.setIConst(iConst << constant.iConst); break;
|
||||
case EbtUint: returnValue.setIConst(iConst << constant.uConst); break;
|
||||
case EbtInt64: returnValue.setIConst(iConst << constant.i64Const); break;
|
||||
@@ -418,6 +699,10 @@ public:
|
||||
break;
|
||||
case EbtUint:
|
||||
switch (constant.type) {
|
||||
case EbtInt8: returnValue.setUConst(uConst << constant.i8Const); break;
|
||||
case EbtUint8: returnValue.setUConst(uConst << constant.u8Const); break;
|
||||
case EbtInt16: returnValue.setUConst(uConst << constant.i16Const); break;
|
||||
case EbtUint16: returnValue.setUConst(uConst << constant.u16Const); break;
|
||||
case EbtInt: returnValue.setUConst(uConst << constant.iConst); break;
|
||||
case EbtUint: returnValue.setUConst(uConst << constant.uConst); break;
|
||||
case EbtInt64: returnValue.setUConst(uConst << constant.i64Const); break;
|
||||
@@ -425,8 +710,12 @@ public:
|
||||
default: assert(false && "Default missing");
|
||||
}
|
||||
break;
|
||||
case EbtInt64:
|
||||
case EbtInt64:
|
||||
switch (constant.type) {
|
||||
case EbtInt8: returnValue.setI64Const(i64Const << constant.i8Const); break;
|
||||
case EbtUint8: returnValue.setI64Const(i64Const << constant.u8Const); break;
|
||||
case EbtInt16: returnValue.setI64Const(i64Const << constant.i16Const); break;
|
||||
case EbtUint16: returnValue.setI64Const(i64Const << constant.u16Const); break;
|
||||
case EbtInt: returnValue.setI64Const(i64Const << constant.iConst); break;
|
||||
case EbtUint: returnValue.setI64Const(i64Const << constant.uConst); break;
|
||||
case EbtInt64: returnValue.setI64Const(i64Const << constant.i64Const); break;
|
||||
@@ -436,6 +725,10 @@ public:
|
||||
break;
|
||||
case EbtUint64:
|
||||
switch (constant.type) {
|
||||
case EbtInt8: returnValue.setU64Const(u64Const << constant.i8Const); break;
|
||||
case EbtUint8: returnValue.setU64Const(u64Const << constant.u8Const); break;
|
||||
case EbtInt16: returnValue.setU64Const(u64Const << constant.i16Const); break;
|
||||
case EbtUint16: returnValue.setU64Const(u64Const << constant.u16Const); break;
|
||||
case EbtInt: returnValue.setU64Const(u64Const << constant.iConst); break;
|
||||
case EbtUint: returnValue.setU64Const(u64Const << constant.uConst); break;
|
||||
case EbtInt64: returnValue.setU64Const(u64Const << constant.i64Const); break;
|
||||
@@ -454,8 +747,12 @@ public:
|
||||
TConstUnion returnValue;
|
||||
assert(type == constant.type);
|
||||
switch (type) {
|
||||
case EbtInt: returnValue.setIConst(iConst & constant.iConst); break;
|
||||
case EbtUint: returnValue.setUConst(uConst & constant.uConst); break;
|
||||
case EbtInt8: returnValue.setI8Const(i8Const & constant.i8Const); break;
|
||||
case EbtUint8: returnValue.setU8Const(u8Const & constant.u8Const); break;
|
||||
case EbtInt16: returnValue.setI16Const(i16Const & constant.i16Const); break;
|
||||
case EbtUint16: returnValue.setU16Const(u16Const & constant.u16Const); break;
|
||||
case EbtInt: returnValue.setIConst(iConst & constant.iConst); break;
|
||||
case EbtUint: returnValue.setUConst(uConst & constant.uConst); break;
|
||||
case EbtInt64: returnValue.setI64Const(i64Const & constant.i64Const); break;
|
||||
case EbtUint64: returnValue.setU64Const(u64Const & constant.u64Const); break;
|
||||
default: assert(false && "Default missing");
|
||||
@@ -469,8 +766,12 @@ public:
|
||||
TConstUnion returnValue;
|
||||
assert(type == constant.type);
|
||||
switch (type) {
|
||||
case EbtInt: returnValue.setIConst(iConst | constant.iConst); break;
|
||||
case EbtUint: returnValue.setUConst(uConst | constant.uConst); break;
|
||||
case EbtInt8: returnValue.setI8Const(i8Const | constant.i8Const); break;
|
||||
case EbtUint8: returnValue.setU8Const(u8Const | constant.u8Const); break;
|
||||
case EbtInt16: returnValue.setI16Const(i16Const | constant.i16Const); break;
|
||||
case EbtUint16: returnValue.setU16Const(u16Const | constant.u16Const); break;
|
||||
case EbtInt: returnValue.setIConst(iConst | constant.iConst); break;
|
||||
case EbtUint: returnValue.setUConst(uConst | constant.uConst); break;
|
||||
case EbtInt64: returnValue.setI64Const(i64Const | constant.i64Const); break;
|
||||
case EbtUint64: returnValue.setU64Const(u64Const | constant.u64Const); break;
|
||||
default: assert(false && "Default missing");
|
||||
@@ -484,8 +785,12 @@ public:
|
||||
TConstUnion returnValue;
|
||||
assert(type == constant.type);
|
||||
switch (type) {
|
||||
case EbtInt: returnValue.setIConst(iConst ^ constant.iConst); break;
|
||||
case EbtUint: returnValue.setUConst(uConst ^ constant.uConst); break;
|
||||
case EbtInt8: returnValue.setI8Const(i8Const ^ constant.i8Const); break;
|
||||
case EbtUint8: returnValue.setU8Const(u8Const ^ constant.u8Const); break;
|
||||
case EbtInt16: returnValue.setI16Const(i16Const ^ constant.i16Const); break;
|
||||
case EbtUint16: returnValue.setU16Const(u16Const ^ constant.u16Const); break;
|
||||
case EbtInt: returnValue.setIConst(iConst ^ constant.iConst); break;
|
||||
case EbtUint: returnValue.setUConst(uConst ^ constant.uConst); break;
|
||||
case EbtInt64: returnValue.setI64Const(i64Const ^ constant.i64Const); break;
|
||||
case EbtUint64: returnValue.setU64Const(u64Const ^ constant.u64Const); break;
|
||||
default: assert(false && "Default missing");
|
||||
@@ -498,8 +803,12 @@ public:
|
||||
{
|
||||
TConstUnion returnValue;
|
||||
switch (type) {
|
||||
case EbtInt: returnValue.setIConst(~iConst); break;
|
||||
case EbtUint: returnValue.setUConst(~uConst); break;
|
||||
case EbtInt8: returnValue.setI8Const(~i8Const); break;
|
||||
case EbtUint8: returnValue.setU8Const(~u8Const); break;
|
||||
case EbtInt16: returnValue.setI16Const(~i16Const); break;
|
||||
case EbtUint16: returnValue.setU16Const(~u16Const); break;
|
||||
case EbtInt: returnValue.setIConst(~iConst); break;
|
||||
case EbtUint: returnValue.setUConst(~uConst); break;
|
||||
case EbtInt64: returnValue.setI64Const(~i64Const); break;
|
||||
case EbtUint64: returnValue.setU64Const(~u64Const); break;
|
||||
default: assert(false && "Default missing");
|
||||
@@ -536,6 +845,10 @@ public:
|
||||
|
||||
private:
|
||||
union {
|
||||
signed char i8Const; // used for i8vec, scalar int8s
|
||||
unsigned char u8Const; // used for u8vec, scalar uint8s
|
||||
signed short i16Const; // used for i16vec, scalar int16s
|
||||
unsigned short u16Const; // used for u16vec, scalar uint16s
|
||||
int iConst; // used for ivec, scalar ints
|
||||
unsigned int uConst; // used for uvec, scalar uints
|
||||
long long i64Const; // used for i64vec, scalar int64s
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
|
||||
// Copyright (C) 2012-2016 LunarG, Inc.
|
||||
// Copyright (C) 2015-2016 Google, Inc.
|
||||
// Copyright (C) 2017 ARM Limited.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@@ -204,12 +205,18 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case EbtFloat: break;
|
||||
case EbtFloat: break;
|
||||
#ifdef AMD_EXTENSIONS
|
||||
case EbtFloat16: s.append("f16"); break;
|
||||
#endif
|
||||
case EbtInt: s.append("i"); break;
|
||||
case EbtUint: s.append("u"); break;
|
||||
case EbtInt8: s.append("i8"); break;
|
||||
case EbtUint16: s.append("u8"); break;
|
||||
case EbtInt16: s.append("i16"); break;
|
||||
case EbtUint8: s.append("u16"); break;
|
||||
case EbtInt: s.append("i"); break;
|
||||
case EbtUint: s.append("u"); break;
|
||||
case EbtInt64: s.append("i64"); break;
|
||||
case EbtUint64: s.append("u64"); break;
|
||||
default: break; // some compilers want this
|
||||
}
|
||||
if (image) {
|
||||
@@ -1373,22 +1380,18 @@ public:
|
||||
virtual bool isImplicitlySizedArray() const { return isArray() && getOuterArraySize() == UnsizedArraySize && qualifier.storage != EvqBuffer; }
|
||||
virtual bool isRuntimeSizedArray() const { return isArray() && getOuterArraySize() == UnsizedArraySize && qualifier.storage == EvqBuffer; }
|
||||
virtual bool isStruct() const { return structure != nullptr; }
|
||||
#ifdef AMD_EXTENSIONS
|
||||
virtual bool isFloatingDomain() const { return basicType == EbtFloat || basicType == EbtDouble || basicType == EbtFloat16; }
|
||||
#else
|
||||
virtual bool isFloatingDomain() const { return basicType == EbtFloat || basicType == EbtDouble; }
|
||||
#endif
|
||||
virtual bool isIntegerDomain() const
|
||||
{
|
||||
switch (basicType) {
|
||||
case EbtInt8:
|
||||
case EbtUint8:
|
||||
case EbtInt16:
|
||||
case EbtUint16:
|
||||
case EbtInt:
|
||||
case EbtUint:
|
||||
case EbtInt64:
|
||||
case EbtUint64:
|
||||
#ifdef AMD_EXTENSIONS
|
||||
case EbtInt16:
|
||||
case EbtUint16:
|
||||
#endif
|
||||
case EbtAtomicUint:
|
||||
return true;
|
||||
default:
|
||||
@@ -1404,7 +1407,7 @@ public:
|
||||
virtual bool isSubpass() const { return basicType == EbtSampler && getSampler().isSubpass(); }
|
||||
|
||||
// return true if this type contains any subtype which satisfies the given predicate.
|
||||
template <typename P>
|
||||
template <typename P>
|
||||
bool contains(P predicate) const
|
||||
{
|
||||
if (predicate(this))
|
||||
@@ -1457,17 +1460,15 @@ public:
|
||||
case EbtVoid:
|
||||
case EbtFloat:
|
||||
case EbtDouble:
|
||||
#ifdef AMD_EXTENSIONS
|
||||
case EbtFloat16:
|
||||
#endif
|
||||
case EbtInt8:
|
||||
case EbtUint8:
|
||||
case EbtInt16:
|
||||
case EbtUint16:
|
||||
case EbtInt:
|
||||
case EbtUint:
|
||||
case EbtInt64:
|
||||
case EbtUint64:
|
||||
#ifdef AMD_EXTENSIONS
|
||||
case EbtInt16:
|
||||
case EbtUint16:
|
||||
#endif
|
||||
case EbtBool:
|
||||
return true;
|
||||
default:
|
||||
@@ -1544,17 +1545,15 @@ public:
|
||||
case EbtVoid: return "void";
|
||||
case EbtFloat: return "float";
|
||||
case EbtDouble: return "double";
|
||||
#ifdef AMD_EXTENSIONS
|
||||
case EbtFloat16: return "float16_t";
|
||||
#endif
|
||||
case EbtInt8: return "int8_t";
|
||||
case EbtUint8: return "uint8_t";
|
||||
case EbtInt16: return "int16_t";
|
||||
case EbtUint16: return "uint16_t";
|
||||
case EbtInt: return "int";
|
||||
case EbtUint: return "uint";
|
||||
case EbtInt64: return "int64_t";
|
||||
case EbtUint64: return "uint64_t";
|
||||
#ifdef AMD_EXTENSIONS
|
||||
case EbtInt16: return "int16_t";
|
||||
case EbtUint16: return "uint16_t";
|
||||
#endif
|
||||
case EbtBool: return "bool";
|
||||
case EbtAtomicUint: return "atomic_uint";
|
||||
case EbtSampler: return "sampler/image";
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
//
|
||||
// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
|
||||
// Copyright (C) 2012-2016 LunarG, Inc.
|
||||
// Copyright (C) 2017 ARM Limited.
|
||||
//
|
||||
// All rights reserved.
|
||||
//
|
||||
@@ -84,100 +85,189 @@ enum TOperator {
|
||||
EOpPreIncrement,
|
||||
EOpPreDecrement,
|
||||
|
||||
// (u)int* -> bool
|
||||
EOpConvInt8ToBool,
|
||||
EOpConvUint8ToBool,
|
||||
EOpConvInt16ToBool,
|
||||
EOpConvUint16ToBool,
|
||||
EOpConvIntToBool,
|
||||
EOpConvUintToBool,
|
||||
EOpConvFloatToBool,
|
||||
EOpConvDoubleToBool,
|
||||
EOpConvInt64ToBool,
|
||||
EOpConvUint64ToBool,
|
||||
EOpConvBoolToFloat,
|
||||
EOpConvIntToFloat,
|
||||
EOpConvUintToFloat,
|
||||
EOpConvDoubleToFloat,
|
||||
EOpConvInt64ToFloat,
|
||||
EOpConvUint64ToFloat,
|
||||
EOpConvUintToInt,
|
||||
EOpConvFloatToInt,
|
||||
EOpConvBoolToInt,
|
||||
EOpConvDoubleToInt,
|
||||
EOpConvInt64ToInt,
|
||||
EOpConvUint64ToInt,
|
||||
EOpConvIntToUint,
|
||||
EOpConvFloatToUint,
|
||||
EOpConvBoolToUint,
|
||||
EOpConvDoubleToUint,
|
||||
EOpConvInt64ToUint,
|
||||
EOpConvUint64ToUint,
|
||||
EOpConvIntToDouble,
|
||||
EOpConvUintToDouble,
|
||||
EOpConvFloatToDouble,
|
||||
EOpConvBoolToDouble,
|
||||
EOpConvInt64ToDouble,
|
||||
EOpConvUint64ToDouble,
|
||||
EOpConvBoolToInt64,
|
||||
EOpConvIntToInt64,
|
||||
EOpConvUintToInt64,
|
||||
EOpConvFloatToInt64,
|
||||
EOpConvDoubleToInt64,
|
||||
EOpConvUint64ToInt64,
|
||||
EOpConvBoolToUint64,
|
||||
EOpConvIntToUint64,
|
||||
EOpConvUintToUint64,
|
||||
EOpConvFloatToUint64,
|
||||
EOpConvDoubleToUint64,
|
||||
EOpConvInt64ToUint64,
|
||||
#ifdef AMD_EXTENSIONS
|
||||
EOpConvBoolToFloat16,
|
||||
EOpConvIntToFloat16,
|
||||
EOpConvUintToFloat16,
|
||||
EOpConvFloatToFloat16,
|
||||
EOpConvDoubleToFloat16,
|
||||
EOpConvInt64ToFloat16,
|
||||
EOpConvUint64ToFloat16,
|
||||
EOpConvFloat16ToBool,
|
||||
EOpConvFloat16ToInt,
|
||||
EOpConvFloat16ToUint,
|
||||
EOpConvFloat16ToFloat,
|
||||
EOpConvFloat16ToDouble,
|
||||
EOpConvFloat16ToInt64,
|
||||
EOpConvFloat16ToUint64,
|
||||
|
||||
// float* -> bool
|
||||
EOpConvFloat16ToBool,
|
||||
EOpConvFloatToBool,
|
||||
EOpConvDoubleToBool,
|
||||
|
||||
// bool -> (u)int*
|
||||
EOpConvBoolToInt8,
|
||||
EOpConvBoolToUint8,
|
||||
EOpConvBoolToInt16,
|
||||
EOpConvIntToInt16,
|
||||
EOpConvUintToInt16,
|
||||
EOpConvFloatToInt16,
|
||||
EOpConvDoubleToInt16,
|
||||
EOpConvFloat16ToInt16,
|
||||
EOpConvInt64ToInt16,
|
||||
EOpConvUint64ToInt16,
|
||||
EOpConvUint16ToInt16,
|
||||
EOpConvInt16ToBool,
|
||||
EOpConvBoolToUint16,
|
||||
EOpConvBoolToInt,
|
||||
EOpConvBoolToUint,
|
||||
EOpConvBoolToInt64,
|
||||
EOpConvBoolToUint64,
|
||||
|
||||
// bool -> float*
|
||||
EOpConvBoolToFloat16,
|
||||
EOpConvBoolToFloat,
|
||||
EOpConvBoolToDouble,
|
||||
|
||||
// int8_t -> (u)int*
|
||||
EOpConvInt8ToInt16,
|
||||
EOpConvInt8ToInt,
|
||||
EOpConvInt8ToInt64,
|
||||
EOpConvInt8ToUint8,
|
||||
EOpConvInt8ToUint16,
|
||||
EOpConvInt8ToUint,
|
||||
EOpConvInt8ToUint64,
|
||||
|
||||
// uint8_t -> (u)int*
|
||||
EOpConvUint8ToInt8,
|
||||
EOpConvUint8ToInt16,
|
||||
EOpConvUint8ToInt,
|
||||
EOpConvUint8ToInt64,
|
||||
EOpConvUint8ToUint16,
|
||||
EOpConvUint8ToUint,
|
||||
EOpConvUint8ToUint64,
|
||||
|
||||
// int8_t -> float*
|
||||
EOpConvInt8ToFloat16,
|
||||
EOpConvInt8ToFloat,
|
||||
EOpConvInt8ToDouble,
|
||||
|
||||
// uint8_t -> float*
|
||||
EOpConvUint8ToFloat16,
|
||||
EOpConvUint8ToFloat,
|
||||
EOpConvUint8ToDouble,
|
||||
|
||||
// int16_t -> (u)int*
|
||||
EOpConvInt16ToInt8,
|
||||
EOpConvInt16ToInt,
|
||||
EOpConvInt16ToUint,
|
||||
EOpConvInt16ToFloat,
|
||||
EOpConvInt16ToDouble,
|
||||
EOpConvInt16ToFloat16,
|
||||
EOpConvInt16ToInt64,
|
||||
EOpConvInt16ToUint8,
|
||||
EOpConvInt16ToUint16,
|
||||
EOpConvInt16ToUint,
|
||||
EOpConvInt16ToUint64,
|
||||
|
||||
EOpConvBoolToUint16,
|
||||
EOpConvIntToUint16,
|
||||
EOpConvUintToUint16,
|
||||
EOpConvFloatToUint16,
|
||||
EOpConvDoubleToUint16,
|
||||
EOpConvFloat16ToUint16,
|
||||
EOpConvInt64ToUint16,
|
||||
EOpConvUint64ToUint16,
|
||||
EOpConvInt16ToUint16,
|
||||
EOpConvUint16ToBool,
|
||||
// uint16_t -> (u)int*
|
||||
EOpConvUint16ToInt8,
|
||||
EOpConvUint16ToInt16,
|
||||
EOpConvUint16ToInt,
|
||||
EOpConvUint16ToInt64,
|
||||
EOpConvUint16ToUint8,
|
||||
EOpConvUint16ToUint,
|
||||
EOpConvUint16ToUint64,
|
||||
|
||||
// int16_t -> float*
|
||||
EOpConvInt16ToFloat16,
|
||||
EOpConvInt16ToFloat,
|
||||
EOpConvInt16ToDouble,
|
||||
|
||||
// uint16_t -> float*
|
||||
EOpConvUint16ToFloat16,
|
||||
EOpConvUint16ToFloat,
|
||||
EOpConvUint16ToDouble,
|
||||
EOpConvUint16ToFloat16,
|
||||
EOpConvUint16ToInt64,
|
||||
EOpConvUint16ToUint64,
|
||||
#endif
|
||||
|
||||
// int32_t -> (u)int*
|
||||
EOpConvIntToInt8,
|
||||
EOpConvIntToInt16,
|
||||
EOpConvIntToInt64,
|
||||
EOpConvIntToUint8,
|
||||
EOpConvIntToUint16,
|
||||
EOpConvIntToUint,
|
||||
EOpConvIntToUint64,
|
||||
|
||||
// uint32_t -> (u)int*
|
||||
EOpConvUintToInt8,
|
||||
EOpConvUintToInt16,
|
||||
EOpConvUintToInt,
|
||||
EOpConvUintToInt64,
|
||||
EOpConvUintToUint8,
|
||||
EOpConvUintToUint16,
|
||||
EOpConvUintToUint64,
|
||||
|
||||
// int32_t -> float*
|
||||
EOpConvIntToFloat16,
|
||||
EOpConvIntToFloat,
|
||||
EOpConvIntToDouble,
|
||||
|
||||
// uint32_t -> float*
|
||||
EOpConvUintToFloat16,
|
||||
EOpConvUintToFloat,
|
||||
EOpConvUintToDouble,
|
||||
|
||||
// int64_t -> (u)int*
|
||||
EOpConvInt64ToInt8,
|
||||
EOpConvInt64ToInt16,
|
||||
EOpConvInt64ToInt,
|
||||
EOpConvInt64ToUint8,
|
||||
EOpConvInt64ToUint16,
|
||||
EOpConvInt64ToUint,
|
||||
EOpConvInt64ToUint64,
|
||||
|
||||
// uint64_t -> (u)int*
|
||||
EOpConvUint64ToInt8,
|
||||
EOpConvUint64ToInt16,
|
||||
EOpConvUint64ToInt,
|
||||
EOpConvUint64ToInt64,
|
||||
EOpConvUint64ToUint8,
|
||||
EOpConvUint64ToUint16,
|
||||
EOpConvUint64ToUint,
|
||||
|
||||
// int64_t -> float*
|
||||
EOpConvInt64ToFloat16,
|
||||
EOpConvInt64ToFloat,
|
||||
EOpConvInt64ToDouble,
|
||||
|
||||
// uint64_t -> float*
|
||||
EOpConvUint64ToFloat16,
|
||||
EOpConvUint64ToFloat,
|
||||
EOpConvUint64ToDouble,
|
||||
|
||||
// float16_t -> (u)int*
|
||||
EOpConvFloat16ToInt8,
|
||||
EOpConvFloat16ToInt16,
|
||||
EOpConvFloat16ToInt,
|
||||
EOpConvFloat16ToInt64,
|
||||
EOpConvFloat16ToUint8,
|
||||
EOpConvFloat16ToUint16,
|
||||
EOpConvFloat16ToUint,
|
||||
EOpConvFloat16ToUint64,
|
||||
|
||||
// float16_t -> float*
|
||||
EOpConvFloat16ToFloat,
|
||||
EOpConvFloat16ToDouble,
|
||||
|
||||
// float -> (u)int*
|
||||
EOpConvFloatToInt8,
|
||||
EOpConvFloatToInt16,
|
||||
EOpConvFloatToInt,
|
||||
EOpConvFloatToInt64,
|
||||
EOpConvFloatToUint8,
|
||||
EOpConvFloatToUint16,
|
||||
EOpConvFloatToUint,
|
||||
EOpConvFloatToUint64,
|
||||
|
||||
// float -> float*
|
||||
EOpConvFloatToFloat16,
|
||||
EOpConvFloatToDouble,
|
||||
|
||||
// float64 _t-> (u)int*
|
||||
EOpConvDoubleToInt8,
|
||||
EOpConvDoubleToInt16,
|
||||
EOpConvDoubleToInt,
|
||||
EOpConvDoubleToInt64,
|
||||
EOpConvDoubleToUint8,
|
||||
EOpConvDoubleToUint16,
|
||||
EOpConvDoubleToUint,
|
||||
EOpConvDoubleToUint64,
|
||||
|
||||
// float64_t -> float*
|
||||
EOpConvDoubleToFloat16,
|
||||
EOpConvDoubleToFloat,
|
||||
|
||||
//
|
||||
// binary operations
|
||||
@@ -280,12 +370,10 @@ enum TOperator {
|
||||
EOpDoubleBitsToUint64,
|
||||
EOpInt64BitsToDouble,
|
||||
EOpUint64BitsToDouble,
|
||||
#ifdef AMD_EXTENSIONS
|
||||
EOpFloat16BitsToInt16,
|
||||
EOpFloat16BitsToUint16,
|
||||
EOpInt16BitsToFloat16,
|
||||
EOpUint16BitsToFloat16,
|
||||
#endif
|
||||
EOpPackSnorm2x16,
|
||||
EOpUnpackSnorm2x16,
|
||||
EOpPackUnorm2x16,
|
||||
@@ -302,7 +390,6 @@ enum TOperator {
|
||||
EOpUnpackInt2x32,
|
||||
EOpPackUint2x32,
|
||||
EOpUnpackUint2x32,
|
||||
#ifdef AMD_EXTENSIONS
|
||||
EOpPackFloat2x16,
|
||||
EOpUnpackFloat2x16,
|
||||
EOpPackInt2x16,
|
||||
@@ -313,7 +400,12 @@ enum TOperator {
|
||||
EOpUnpackInt4x16,
|
||||
EOpPackUint4x16,
|
||||
EOpUnpackUint4x16,
|
||||
#endif
|
||||
EOpPack16,
|
||||
EOpPack32,
|
||||
EOpPack64,
|
||||
EOpUnpack32,
|
||||
EOpUnpack16,
|
||||
EOpUnpack8,
|
||||
|
||||
EOpLength,
|
||||
EOpDistance,
|
||||
@@ -379,6 +471,64 @@ enum TOperator {
|
||||
EOpAllInvocations,
|
||||
EOpAllInvocationsEqual,
|
||||
|
||||
EOpSubgroupGuardStart,
|
||||
EOpSubgroupBarrier,
|
||||
EOpSubgroupMemoryBarrier,
|
||||
EOpSubgroupMemoryBarrierBuffer,
|
||||
EOpSubgroupMemoryBarrierImage,
|
||||
EOpSubgroupMemoryBarrierShared, // compute only
|
||||
EOpSubgroupElect,
|
||||
EOpSubgroupAll,
|
||||
EOpSubgroupAny,
|
||||
EOpSubgroupAllEqual,
|
||||
EOpSubgroupBroadcast,
|
||||
EOpSubgroupBroadcastFirst,
|
||||
EOpSubgroupBallot,
|
||||
EOpSubgroupInverseBallot,
|
||||
EOpSubgroupBallotBitExtract,
|
||||
EOpSubgroupBallotBitCount,
|
||||
EOpSubgroupBallotInclusiveBitCount,
|
||||
EOpSubgroupBallotExclusiveBitCount,
|
||||
EOpSubgroupBallotFindLSB,
|
||||
EOpSubgroupBallotFindMSB,
|
||||
EOpSubgroupShuffle,
|
||||
EOpSubgroupShuffleXor,
|
||||
EOpSubgroupShuffleUp,
|
||||
EOpSubgroupShuffleDown,
|
||||
EOpSubgroupAdd,
|
||||
EOpSubgroupMul,
|
||||
EOpSubgroupMin,
|
||||
EOpSubgroupMax,
|
||||
EOpSubgroupAnd,
|
||||
EOpSubgroupOr,
|
||||
EOpSubgroupXor,
|
||||
EOpSubgroupInclusiveAdd,
|
||||
EOpSubgroupInclusiveMul,
|
||||
EOpSubgroupInclusiveMin,
|
||||
EOpSubgroupInclusiveMax,
|
||||
EOpSubgroupInclusiveAnd,
|
||||
EOpSubgroupInclusiveOr,
|
||||
EOpSubgroupInclusiveXor,
|
||||
EOpSubgroupExclusiveAdd,
|
||||
EOpSubgroupExclusiveMul,
|
||||
EOpSubgroupExclusiveMin,
|
||||
EOpSubgroupExclusiveMax,
|
||||
EOpSubgroupExclusiveAnd,
|
||||
EOpSubgroupExclusiveOr,
|
||||
EOpSubgroupExclusiveXor,
|
||||
EOpSubgroupClusteredAdd,
|
||||
EOpSubgroupClusteredMul,
|
||||
EOpSubgroupClusteredMin,
|
||||
EOpSubgroupClusteredMax,
|
||||
EOpSubgroupClusteredAnd,
|
||||
EOpSubgroupClusteredOr,
|
||||
EOpSubgroupClusteredXor,
|
||||
EOpSubgroupQuadBroadcast,
|
||||
EOpSubgroupQuadSwapHorizontal,
|
||||
EOpSubgroupQuadSwapVertical,
|
||||
EOpSubgroupQuadSwapDiagonal,
|
||||
EOpSubgroupGuardStop,
|
||||
|
||||
#ifdef AMD_EXTENSIONS
|
||||
EOpMinInvocations,
|
||||
EOpMaxInvocations,
|
||||
@@ -451,32 +601,36 @@ enum TOperator {
|
||||
EOpConstructGuardStart,
|
||||
EOpConstructInt, // these first scalar forms also identify what implicit conversion is needed
|
||||
EOpConstructUint,
|
||||
EOpConstructInt64,
|
||||
EOpConstructUint64,
|
||||
#ifdef AMD_EXTENSIONS
|
||||
EOpConstructInt8,
|
||||
EOpConstructUint8,
|
||||
EOpConstructInt16,
|
||||
EOpConstructUint16,
|
||||
#endif
|
||||
EOpConstructInt64,
|
||||
EOpConstructUint64,
|
||||
EOpConstructBool,
|
||||
EOpConstructFloat,
|
||||
EOpConstructDouble,
|
||||
#ifdef AMD_EXTENSIONS
|
||||
EOpConstructFloat16,
|
||||
#endif
|
||||
EOpConstructVec2,
|
||||
EOpConstructVec3,
|
||||
EOpConstructVec4,
|
||||
EOpConstructDVec2,
|
||||
EOpConstructDVec3,
|
||||
EOpConstructDVec4,
|
||||
#ifdef AMD_EXTENSIONS
|
||||
EOpConstructF16Vec2,
|
||||
EOpConstructF16Vec3,
|
||||
EOpConstructF16Vec4,
|
||||
#endif
|
||||
EOpConstructBVec2,
|
||||
EOpConstructBVec3,
|
||||
EOpConstructBVec4,
|
||||
EOpConstructI8Vec2,
|
||||
EOpConstructI8Vec3,
|
||||
EOpConstructI8Vec4,
|
||||
EOpConstructU8Vec2,
|
||||
EOpConstructU8Vec3,
|
||||
EOpConstructU8Vec4,
|
||||
EOpConstructI16Vec2,
|
||||
EOpConstructI16Vec3,
|
||||
EOpConstructI16Vec4,
|
||||
EOpConstructU16Vec2,
|
||||
EOpConstructU16Vec3,
|
||||
EOpConstructU16Vec4,
|
||||
EOpConstructIVec2,
|
||||
EOpConstructIVec3,
|
||||
EOpConstructIVec4,
|
||||
@@ -489,14 +643,6 @@ enum TOperator {
|
||||
EOpConstructU64Vec2,
|
||||
EOpConstructU64Vec3,
|
||||
EOpConstructU64Vec4,
|
||||
#ifdef AMD_EXTENSIONS
|
||||
EOpConstructI16Vec2,
|
||||
EOpConstructI16Vec3,
|
||||
EOpConstructI16Vec4,
|
||||
EOpConstructU16Vec2,
|
||||
EOpConstructU16Vec3,
|
||||
EOpConstructU16Vec4,
|
||||
#endif
|
||||
EOpConstructMat2x2,
|
||||
EOpConstructMat2x3,
|
||||
EOpConstructMat2x4,
|
||||
@@ -542,7 +688,10 @@ enum TOperator {
|
||||
EOpConstructBMat4x2,
|
||||
EOpConstructBMat4x3,
|
||||
EOpConstructBMat4x4,
|
||||
#ifdef AMD_EXTENSIONS
|
||||
EOpConstructFloat16,
|
||||
EOpConstructF16Vec2,
|
||||
EOpConstructF16Vec3,
|
||||
EOpConstructF16Vec4,
|
||||
EOpConstructF16Mat2x2,
|
||||
EOpConstructF16Mat2x3,
|
||||
EOpConstructF16Mat2x4,
|
||||
@@ -552,7 +701,6 @@ enum TOperator {
|
||||
EOpConstructF16Mat4x2,
|
||||
EOpConstructF16Mat4x3,
|
||||
EOpConstructF16Mat4x4,
|
||||
#endif
|
||||
EOpConstructStruct,
|
||||
EOpConstructTextureSampler,
|
||||
EOpConstructGuardEnd,
|
||||
@@ -777,6 +925,12 @@ enum TOperator {
|
||||
|
||||
// matrix
|
||||
EOpMatrixSwizzle, // select multiple matrix components (non-column)
|
||||
|
||||
// SM6 wave ops
|
||||
EOpWaveGetLaneCount, // Will decompose to gl_SubgroupSize.
|
||||
EOpWaveGetLaneIndex, // Will decompose to gl_SubgroupInvocationID.
|
||||
EOpWaveActiveCountBits, // Will decompose to subgroupBallotBitCount(subgroupBallot()).
|
||||
EOpWavePrefixCountBits, // Will decompose to subgroupBallotInclusiveBitCount(subgroupBallot()).
|
||||
};
|
||||
|
||||
class TIntermTraverser;
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// This header is generated by the make-revision script.
|
||||
|
||||
#define GLSLANG_PATCH_LEVEL 2583
|
||||
#define GLSLANG_PATCH_LEVEL 2593
|
||||
|
||||
Reference in New Issue
Block a user