Updated spirv-cross.
This commit is contained in:
parent
e605c022f2
commit
3023da9354
18
3rdparty/spirv-cross/main.cpp
vendored
18
3rdparty/spirv-cross/main.cpp
vendored
@ -35,10 +35,6 @@
|
||||
#include "gitversion.h"
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4996)
|
||||
#endif
|
||||
|
||||
using namespace spv;
|
||||
using namespace SPIRV_CROSS_NAMESPACE;
|
||||
using namespace std;
|
||||
@ -190,6 +186,14 @@ struct CLIParser
|
||||
bool ended_state = false;
|
||||
};
|
||||
|
||||
#if defined(__clang__) || defined(__GNUC__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#elif defined(_MSC_VER)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4996)
|
||||
#endif
|
||||
|
||||
static vector<uint32_t> read_spirv_file(const char *path)
|
||||
{
|
||||
FILE *file = fopen(path, "rb");
|
||||
@ -225,6 +229,12 @@ static bool write_string_to_file(const char *path, const char *string)
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined(__clang__) || defined(__GNUC__)
|
||||
#pragma GCC diagnostic pop
|
||||
#elif defined(_MSC_VER)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
static void print_resources(const Compiler &compiler, const char *tag, const SmallVector<Resource> &resources)
|
||||
{
|
||||
fprintf(stderr, "%s\n", tag);
|
||||
|
13
3rdparty/spirv-cross/spirv_common.hpp
vendored
13
3rdparty/spirv-cross/spirv_common.hpp
vendored
@ -209,9 +209,12 @@ inline std::string convert_to_string(const T &t)
|
||||
#define SPIRV_CROSS_FLT_FMT "%.32g"
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// sprintf warning.
|
||||
// We cannot rely on snprintf existing because, ..., MSVC.
|
||||
// Disable sprintf and strcat warnings.
|
||||
// We cannot rely on snprintf and family existing because, ..., MSVC.
|
||||
#if defined(__clang__) || defined(__GNUC__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#elif defined(_MSC_VER)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4996)
|
||||
#endif
|
||||
@ -259,7 +262,9 @@ inline std::string convert_to_string(double t, char locale_radix_point)
|
||||
return buf;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if defined(__clang__) || defined(__GNUC__)
|
||||
#pragma GCC diagnostic pop
|
||||
#elif defined(_MSC_VER)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
|
5
3rdparty/spirv-cross/spirv_glsl.cpp
vendored
5
3rdparty/spirv-cross/spirv_glsl.cpp
vendored
@ -8849,8 +8849,9 @@ void CompilerGLSL::emit_instruction(const Instruction &instruction)
|
||||
if (composite_type.basetype == SPIRType::Struct || !composite_type.array.empty())
|
||||
allow_base_expression = false;
|
||||
|
||||
// Packed expressions cannot be split up.
|
||||
if (has_extended_decoration(ops[2], SPIRVCrossDecorationPhysicalTypePacked))
|
||||
// Packed expressions or physical ID mapped expressions cannot be split up.
|
||||
if (has_extended_decoration(ops[2], SPIRVCrossDecorationPhysicalTypePacked) ||
|
||||
has_extended_decoration(ops[2], SPIRVCrossDecorationPhysicalTypeID))
|
||||
allow_base_expression = false;
|
||||
|
||||
// Cannot use base expression for row-major matrix row-extraction since we need to interleave access pattern
|
||||
|
Loading…
x
Reference in New Issue
Block a user