From 7d2c02ba79e836c87c0a4433c21ac7c82fe92d15 Mon Sep 17 00:00:00 2001 From: Przemek Date: Fri, 20 Oct 2023 13:38:34 +0200 Subject: [PATCH] Disabled global operator generation for HLSL --- tools/buildHeaders/header.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/buildHeaders/header.cpp b/tools/buildHeaders/header.cpp index 4ee358b5d..2e20132e9 100644 --- a/tools/buildHeaders/header.cpp +++ b/tools/buildHeaders/header.cpp @@ -578,6 +578,7 @@ namespace { void printMaskOperators(std::ostream& out, const std::string& specifiers) const { const Json::Value& enums = spvRoot["spv"]["enum"]; + out << "#ifndef __HLSL_VERSION\n"; out << "// Overload bitwise operators for mask bit combining\n\n"; for (auto opClass = enums.begin(); opClass != enums.end(); ++opClass) { @@ -601,6 +602,7 @@ namespace { typeName << "(~unsigned(a)); }\n"; } } + out << "#endif\n"; } private: void printPrologue(std::ostream& out) const override {