diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 6a28a1c1c0ccfa1bec08d59aa37a3020024300a9..95b507b13e5a09e8a4e6a351b72cb3ef84640ef6 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -3638,7 +3638,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO if (builder.getImageTypeFormat(builder.getImageType(operands.front())) == spv::ImageFormatUnknown) builder.addCapability(spv::CapabilityStorageImageReadWithoutFormat); - std::vector<spv::Id> result = { builder.createOp(spv::OpImageRead, resultType(), operands) }; + std::vector<spv::Id> result( 1, builder.createOp(spv::OpImageRead, resultType(), operands) ); builder.setPrecision(result[0], precision); // If needed, add a conversion constructor to the proper size. @@ -3926,9 +3926,9 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO } } - std::vector<spv::Id> result = { + std::vector<spv::Id> result( 1, builder.createTextureCall(precision, resultType(), sparse, cracked.fetch, cracked.proj, cracked.gather, noImplicitLod, params) - }; + ); if (components != node->getType().getVectorSize()) result[0] = builder.createConstructor(precision, result, convertGlslangToSpvType(node->getType())); diff --git a/glslang/Include/Common.h b/glslang/Include/Common.h index f2fb10bf33171c538a7bba7e14f7c430ee6937c7..5fe0f270552c6127394a796922843f60f8a49055 100644 --- a/glslang/Include/Common.h +++ b/glslang/Include/Common.h @@ -67,18 +67,19 @@ std::string to_string(const T& val) { #endif #if defined(_MSC_VER) && _MSC_VER < 1800 -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); -} + #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) diff --git a/glslang/MachineIndependent/Intermediate.cpp b/glslang/MachineIndependent/Intermediate.cpp index 9e5beaca9a787f7a1f97f1f8620521f74379c6d1..0333e5d01f87c5265d5bc640c9b49e4d57b89d29 100644 --- a/glslang/MachineIndependent/Intermediate.cpp +++ b/glslang/MachineIndependent/Intermediate.cpp @@ -47,6 +47,7 @@ #include <cfloat> #include <utility> +#include <tuple> namespace glslang {