Skip to content

Commit

Permalink
fix: add HOST_COHERENT memoryProperty when allocate memory for `VkI…
Browse files Browse the repository at this point in the history
…mage` (googlesamples#88)
  • Loading branch information
th1nk3r-ing committed May 25, 2023
1 parent d0f1360 commit 8ee9242
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tutorial06_texture/app/src/main/cpp/VulkanMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ VkResult LoadTextureFromFile(const char* filePath,
vkGetImageMemoryRequirements(device.device_, tex_obj->image, &mem_reqs);
mem_alloc.allocationSize = mem_reqs.size;
VK_CHECK(AllocateMemoryTypeFromProperties(mem_reqs.memoryTypeBits,
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT,
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,
&mem_alloc.memoryTypeIndex));
CALL_VK(vkAllocateMemory(device.device_, &mem_alloc, nullptr, &tex_obj->mem));
CALL_VK(vkBindImageMemory(device.device_, tex_obj->image, tex_obj->mem, 0));
Expand Down

0 comments on commit 8ee9242

Please sign in to comment.