From 749be8038977b7b4e61fe8f3f1d496b4e8631c1f Mon Sep 17 00:00:00 2001 From: "Roy.li" Date: Tue, 22 Mar 2022 15:23:47 +0800 Subject: [PATCH] Use types have same widths in loop condition. In case comparisons between types of different widths in a loop condition caused the loop to behave unexpectedly. --- spirv_msl.cpp | 2 +- spirv_msl.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spirv_msl.cpp b/spirv_msl.cpp index 75551b46..c7ea9340 100644 --- a/spirv_msl.cpp +++ b/spirv_msl.cpp @@ -4951,7 +4951,7 @@ void CompilerMSL::emit_custom_functions() for (uint32_t variant = 0; variant < 12; variant++) { - uint32_t dimensions = spv_func - SPVFuncImplArrayCopyMultidimBase; + uint8_t dimensions = spv_func - SPVFuncImplArrayCopyMultidimBase; string tmp = "template