Skip to content

Commit 848751b

Browse files
committed
vk: fix generateMipmaps level
The level counting was off by one. FIXES=400710879
1 parent 4ede119 commit 848751b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

filament/backend/src/vulkan/VulkanDriver.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -1262,10 +1262,9 @@ void VulkanDriver::generateMipmaps(Handle<HwTexture> th) {
12621262
mBlitter.blit(VK_FILTER_LINEAR, dst, dstOffsets, src, srcOffsets);
12631263
}
12641264

1265-
level++;
12661265
srcw = dstw;
12671266
srch = dsth;
1268-
} while ((srcw > 1 || srch > 1) && level < t->levels);
1267+
} while ((srcw > 1 || srch > 1) && ++level < t->levels - 1);
12691268
}
12701269

12711270
void VulkanDriver::compilePrograms(CompilerPriorityQueue priority,

0 commit comments

Comments
 (0)