This commit is contained in:
Bill Hollings 2017-03-17 11:16:47 -04:00
commit 52a5597161
2 changed files with 11 additions and 1 deletions

View File

@ -55,6 +55,16 @@ public:
#define SPIRV_CROSS_THROW(x) throw CompilerError(x)
#endif
#if __cplusplus >= 201402l
#define SPIRV_CROSS_DEPRECATED(reason) [[deprecated(reason)]]
#elif defined(__GNUC__)
#define SPIRV_CROSS_DEPRECATED(reason) __attribute__((deprecated))
#elif defined(_MSC_VER)
#define SPIRV_CROSS_DEPRECATED(reason) __declspec(deprecated(reason))
#else
#define SPIRV_CROSS_DEPRECATED(reason)
#endif
namespace inner
{
template <typename T>

View File

@ -210,7 +210,7 @@ public:
virtual size_t get_declared_struct_member_size(const SPIRType &struct_type, uint32_t index) const;
// Legacy GLSL compatibility method. Deprecated in favor of CompilerGLSL::flatten_buffer_block
void flatten_interface_block(uint32_t id);
SPIRV_CROSS_DEPRECATED("Please use flatten_buffer_block instead.") void flatten_interface_block(uint32_t id);
// Returns a set of all global variables which are statically accessed
// by the control flow graph from the current entry point.