Skip to content

Commit

Permalink
[aot] Fixed vulkan texture usage export (#6519)
Browse files Browse the repository at this point in the history
`alloc_info.usage` is the usage of memory allocation, to inform VMA how
we gonna use the memory (for example, is it host accessible?) While
`image_info.usage` is the one that should be exported.
  • Loading branch information
PENGUINLIONG authored Nov 4, 2022
1 parent 90d9619 commit 83a41d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion taichi/rhi/vulkan/vulkan_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ IVkImage create_image(VkDevice device,
image->depth = image_info->extent.depth;
image->mip_levels = image_info->mipLevels;
image->array_layers = image_info->arrayLayers;
image->usage = alloc_info->usage;
image->usage = image_info->usage;

VkResult res = vmaCreateImage(allocator, image_info, alloc_info,
&image->image, &image->allocation, nullptr);
Expand Down

0 comments on commit 83a41d8

Please sign in to comment.