Use allocation size returned by image memory requirements for font image (Fixes #217)
This commit is contained in:
parent
a104110b30
commit
81fc142053
2 changed files with 3 additions and 2 deletions
|
|
@ -234,6 +234,7 @@ public:
|
|||
|
||||
uint8_t *data;
|
||||
VK_CHECK_RESULT(vkMapMemory(vulkanDevice->logicalDevice, stagingBuffer.memory, 0, allocInfo.allocationSize, 0, (void **)&data));
|
||||
// Size of the font texture is WIDTH * HEIGHT * 1 byte (only one channel)
|
||||
memcpy(data, &font24pixels[0][0], STB_FONT_WIDTH * STB_FONT_HEIGHT);
|
||||
vkUnmapMemory(vulkanDevice->logicalDevice, stagingBuffer.memory);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue