From e351e5c565b90abe316ebe5ed2a2134ecd2788b0 Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Wed, 18 Apr 2018 16:31:08 +0200 Subject: [PATCH] Use convert_to_string for lod clamp. --- spirv_msl.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spirv_msl.cpp b/spirv_msl.cpp index dbd07e5..3b72343 100644 --- a/spirv_msl.cpp +++ b/spirv_msl.cpp @@ -239,7 +239,10 @@ void CompilerMSL::emit_entry_point_declarations() if (s.anisotropy_enable) args.push_back(join("max_anisotropy(", s.max_anisotropy, ")")); if (s.lod_clamp_enable) - args.push_back(join("lod_clamp(", s.lod_clamp_min, ", ", s.lod_clamp_max, ")")); + { + args.push_back( + join("lod_clamp(", convert_to_string(s.lod_clamp_min), ", ", convert_to_string(s.lod_clamp_max), ")")); + } statement("constexpr sampler ", type.basetype == SPIRType::SampledImage ? to_sampler_expression(samp.first) : to_name(samp.first),