diff --git a/tools/shaderc/shaderc_metal.cpp b/tools/shaderc/shaderc_metal.cpp index 7c8b88797..2ea835b2a 100644 --- a/tools/shaderc/shaderc_metal.cpp +++ b/tools/shaderc/shaderc_metal.cpp @@ -729,8 +729,8 @@ namespace bgfx { namespace metal if (index != std::string::npos) { bool found = false; - - for (int32_t ii = 0; ii < BX_COUNTOF(s_samplerTypes); ++ii) + + for (uint32_t ii = 0; ii < BX_COUNTOF(s_samplerTypes); ++ii) { if (!bx::findIdentifierMatch(strLine.c_str(), s_samplerTypes[ii]).isEmpty()) { @@ -738,7 +738,7 @@ namespace bgfx { namespace metal break; } } - + if (!found) { for (int32_t ii = 0, num = program->getNumLiveUniformVariables(); ii < num; ++ii) diff --git a/tools/shaderc/shaderc_spirv.cpp b/tools/shaderc/shaderc_spirv.cpp index d5d3bb630..c1227f44f 100644 --- a/tools/shaderc/shaderc_spirv.cpp +++ b/tools/shaderc/shaderc_spirv.cpp @@ -783,7 +783,7 @@ namespace bgfx { namespace spirv { bool found = false; - for (int32_t ii = 0; ii < BX_COUNTOF(s_samplerTypes); ++ii) + for (uint32_t ii = 0; ii < BX_COUNTOF(s_samplerTypes); ++ii) { if (!bx::findIdentifierMatch(strLine.c_str(), s_samplerTypes[ii]).isEmpty()) { @@ -791,7 +791,7 @@ namespace bgfx { namespace spirv break; } } - + if (!found) { for (int32_t ii = 0, num = program->getNumLiveUniformVariables(); ii < num; ++ii)