This commit is contained in:
LibretroAdmin 2022-07-29 15:01:06 +02:00
parent 11340c3c9c
commit a933b74b1e
4 changed files with 19 additions and 44 deletions

View File

@ -390,6 +390,19 @@ __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) {
@ -403,6 +416,11 @@ __inline bool isTypeUnsignedInt(TBasicType type)
}
}
__inline bool isTypeInt(TBasicType type)
{
return isTypeSignedInt(type) || isTypeUnsignedInt(type);
}
__inline bool isTypeFloat(TBasicType type)
{
switch (type) {

View File

@ -71,13 +71,7 @@ namespace glslang {
class TAllocation {
public:
TAllocation(size_t size, unsigned char* mem, TAllocation* prev = 0) :
size(size), mem(mem), prevAlloc(prev) {
// Allocations are bracketed:
// [allocationHeader][initialGuardBlock][userData][finalGuardBlock]
// This would be cleaner with if (guardBlockSize)..., but that
// makes the compiler print warnings about 0 length memsets,
// even with the if() protecting them.
}
size(size), mem(mem) { }
// Return total size needed to accommodate user buffer of 'size',
// plus our tracking data.
@ -98,7 +92,6 @@ private:
size_t size; // size of the user data area
unsigned char* mem; // beginning of our allocation (pts to header)
TAllocation* prevAlloc; // prior allocation in the chain
const static unsigned char guardBlockBeginVal;
const static unsigned char guardBlockEndVal;

View File

@ -51,24 +51,6 @@
namespace glslang {
static __inline bool isTypeSignedInt(TBasicType type)
{
switch (type) {
case EbtInt8:
case EbtInt16:
case EbtInt:
case EbtInt64:
return true;
default:
return false;
}
}
static __inline bool isTypeInt(TBasicType type)
{
return isTypeSignedInt(type) || isTypeUnsignedInt(type);
}
static __inline int getTypeRank(TBasicType type)
{
int res = -1;

View File

@ -2676,24 +2676,6 @@ void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& q
invariantCheck(loc, qualifier);
}
static __inline bool isTypeSignedInt(TBasicType type)
{
switch (type) {
case EbtInt8:
case EbtInt16:
case EbtInt:
case EbtInt64:
return true;
default:
return false;
}
}
static __inline bool isTypeInt(TBasicType type)
{
return isTypeSignedInt(type) || isTypeUnsignedInt(type);
}
//
// Check a full qualifier and type (no variable yet) at global level.
//