Skip to content

Commit 9271f70

Browse files
committed
Fix SPIRV-Tools headers warning
1 parent 9ebbadb commit 9271f70

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Graphics/ShaderTools/src/SPIRVTools.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@
2727
#include "SPIRVTools.hpp"
2828
#include "DebugUtilities.hpp"
2929

30+
// Temporarily disable warning C4127: conditional expression is constant
31+
// This warning is triggered by SPIRV-Tools headers in ThirdParty
32+
#ifdef _MSC_VER
33+
#pragma warning(push)
34+
#pragma warning(disable : 4127)
35+
#endif
36+
3037
#include "spirv-tools/optimizer.hpp"
3138

3239
// SPIRV-Tools internal headers for custom pass implementation
@@ -35,6 +42,11 @@
3542
#include "source/opt/type_manager.h"
3643
#include "source/opt/decoration_manager.h"
3744

45+
// Restore warning settings
46+
#ifdef _MSC_VER
47+
# pragma warning(pop)
48+
#endif
49+
3850
namespace Diligent
3951
{
4052

0 commit comments

Comments
 (0)