diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm b/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm index 366b72798..f5edd5a9a 100644 --- a/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm +++ b/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm @@ -4534,7 +4534,7 @@ static uint32_t mvkGetEntryProperty(io_registry_entry_t entry, CFStringRef prope uint32_t mask = viewMask; uint32_t startView = 0, viewCount = 0; if ( !_physicalDevice->canUseInstancingForMultiview() ) { - for (uint32_t i = 0; mask != 0; ++i) { + while (mask != 0) { mask = mvkGetNextViewMaskGroup(mask, &startView, &viewCount); while (passIdx-- > 0 && viewCount-- > 0) { startView++;