Fixed bug in mipmap streaming code.
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, macos-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled

Debug font rendering is now working again.
This commit is contained in:
2026-03-23 23:06:50 -07:00
parent 9d5d269feb
commit b73290ffd6

View File

@@ -106,7 +106,7 @@ bool KRTexture2D::createGPUTexture(int targetLod)
std::vector<VkBufferImageCopy> regions;
regions.resize(mip_count, VkBufferImageCopy{});
int bufferOffset = 0;
for (int mip = min_mip; mip < min_mip + mip_count - 1; mip++) {
for (int mip = min_mip; mip < min_mip + mip_count; mip++) {
VkBufferImageCopy& region = regions[mip];
region.bufferOffset = bufferOffset;
region.bufferRowLength = 0;
@@ -123,7 +123,6 @@ bool KRTexture2D::createGPUTexture(int targetLod)
(unsigned int)dimensions.y,
(unsigned int)dimensions.z
};
regions.push_back(region);
bufferOffset += getMemRequiredForLod(mip);
}