From b118451e301d734e3e783b3acdf871f3f6ea851c Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Wed, 6 Nov 2024 01:47:26 +0800 Subject: Move switch statement bodies to their own lines (#5493) * Move switch statement bodies to their own lines * format --------- Co-authored-by: Yong He --- source/slang/slang-compiler-options.cpp | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'source/slang/slang-compiler-options.cpp') diff --git a/source/slang/slang-compiler-options.cpp b/source/slang/slang-compiler-options.cpp index 4350bcf0d..84a22535a 100644 --- a/source/slang/slang-compiler-options.cpp +++ b/source/slang/slang-compiler-options.cpp @@ -82,11 +82,20 @@ void CompilerOptionSet::writeCommandLineArgs(Session* globalSession, StringBuild v.unpackInt3(kind, set, shift); switch ((HLSLToVulkanLayoutOptions::Kind)(kind)) { - case HLSLToVulkanLayoutOptions::Kind::UnorderedAccess: sb << " -fvk-u-shift"; break; - case HLSLToVulkanLayoutOptions::Kind::Sampler: sb << " -fvk-s-shift"; break; - case HLSLToVulkanLayoutOptions::Kind::ShaderResource: sb << " -fvk-t-shift"; break; - case HLSLToVulkanLayoutOptions::Kind::ConstantBuffer: sb << " -fvk-b-shift"; break; - default: continue; + case HLSLToVulkanLayoutOptions::Kind::UnorderedAccess: + sb << " -fvk-u-shift"; + break; + case HLSLToVulkanLayoutOptions::Kind::Sampler: + sb << " -fvk-s-shift"; + break; + case HLSLToVulkanLayoutOptions::Kind::ShaderResource: + sb << " -fvk-t-shift"; + break; + case HLSLToVulkanLayoutOptions::Kind::ConstantBuffer: + sb << " -fvk-b-shift"; + break; + default: + continue; } sb << " " << shift << " " << set; } @@ -176,7 +185,8 @@ bool CompilerOptionSet::allowDuplicate(CompilerOptionName name) case CompilerOptionName::Capability: case CompilerOptionName::DownstreamArgs: case CompilerOptionName::VulkanBindShift: - case CompilerOptionName::VulkanBindShiftAll: return true; + case CompilerOptionName::VulkanBindShiftAll: + return true; } return false; } @@ -186,7 +196,8 @@ CompilerOptionValue Slang::CompilerOptionSet::getDefault(CompilerOptionName name { case CompilerOptionName::Optimization: return CompilerOptionValue::fromEnum(OptimizationLevel::Default); - default: return CompilerOptionValue(); + default: + return CompilerOptionValue(); } } -- cgit v1.2.3