mirror of https://github.com/bkaradzic/bgfx
Updated glslang.
This commit is contained in:
parent
1c44c92e84
commit
11a1669c3f
|
@ -1373,7 +1373,7 @@ bool Builder::containsType(Id typeId, spv::Op typeOp, unsigned int width) const
|
||||||
}
|
}
|
||||||
|
|
||||||
// return true if the type is a pointer to PhysicalStorageBufferEXT or an
|
// return true if the type is a pointer to PhysicalStorageBufferEXT or an
|
||||||
// array of such pointers. These require restrict/aliased decorations.
|
// contains such a pointer. These require restrict/aliased decorations.
|
||||||
bool Builder::containsPhysicalStorageBufferOrArray(Id typeId) const
|
bool Builder::containsPhysicalStorageBufferOrArray(Id typeId) const
|
||||||
{
|
{
|
||||||
const Instruction& instr = *module.getInstruction(typeId);
|
const Instruction& instr = *module.getInstruction(typeId);
|
||||||
|
@ -1385,6 +1385,12 @@ bool Builder::containsPhysicalStorageBufferOrArray(Id typeId) const
|
||||||
return getTypeStorageClass(typeId) == StorageClassPhysicalStorageBufferEXT;
|
return getTypeStorageClass(typeId) == StorageClassPhysicalStorageBufferEXT;
|
||||||
case OpTypeArray:
|
case OpTypeArray:
|
||||||
return containsPhysicalStorageBufferOrArray(getContainedTypeId(typeId));
|
return containsPhysicalStorageBufferOrArray(getContainedTypeId(typeId));
|
||||||
|
case OpTypeStruct:
|
||||||
|
for (int m = 0; m < instr.getNumOperands(); ++m) {
|
||||||
|
if (containsPhysicalStorageBufferOrArray(instr.getIdOperand(m)))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#define GLSLANG_BUILD_INFO
|
#define GLSLANG_BUILD_INFO
|
||||||
|
|
||||||
#define GLSLANG_VERSION_MAJOR 12
|
#define GLSLANG_VERSION_MAJOR 12
|
||||||
#define GLSLANG_VERSION_MINOR 1
|
#define GLSLANG_VERSION_MINOR 2
|
||||||
#define GLSLANG_VERSION_PATCH 0
|
#define GLSLANG_VERSION_PATCH 0
|
||||||
#define GLSLANG_VERSION_FLAVOR ""
|
#define GLSLANG_VERSION_FLAVOR ""
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
#else
|
#else
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#endif
|
#endif
|
||||||
|
#include <cstdint>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
@ -68,7 +69,7 @@ std::string to_string(const T& val) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) || (defined(MINGW_HAS_SECURE_API) && MINGW_HAS_SECURE_API)
|
#if defined(MINGW_HAS_SECURE_API) && MINGW_HAS_SECURE_API
|
||||||
#include <basetsd.h>
|
#include <basetsd.h>
|
||||||
#ifndef snprintf
|
#ifndef snprintf
|
||||||
#define snprintf sprintf_s
|
#define snprintf sprintf_s
|
||||||
|
@ -84,22 +85,6 @@ std::string to_string(const T& val) {
|
||||||
#define UINT_PTR uintptr_t
|
#define UINT_PTR uintptr_t
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER) && _MSC_VER < 1800
|
|
||||||
#include <stdlib.h>
|
|
||||||
inline long long int strtoll (const char* str, char** endptr, int base)
|
|
||||||
{
|
|
||||||
return _strtoi64(str, endptr, base);
|
|
||||||
}
|
|
||||||
inline unsigned long long int strtoull (const char* str, char** endptr, int base)
|
|
||||||
{
|
|
||||||
return _strtoui64(str, endptr, base);
|
|
||||||
}
|
|
||||||
inline long long int atoll (const char* str)
|
|
||||||
{
|
|
||||||
return strtoll(str, NULL, 10);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
#define strdup _strdup
|
#define strdup _strdup
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue