mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2025-05-24 21:49:15 +00:00
Correct if in mapping example
We want to know if the memory is mappable, which means that the memory properties should include the `VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT`.
This commit is contained in:
parent
aaa1a56167
commit
67824c5b00
1 changed files with 1 additions and 1 deletions
|
@ -478,7 +478,7 @@ vmaCreateBuffer(allocator, &bufCreateInfo, &allocCreateInfo, &buf, &alloc, &allo
|
||||||
|
|
||||||
VkMemoryPropertyFlags memFlags;
|
VkMemoryPropertyFlags memFlags;
|
||||||
vmaGetMemoryTypeProperties(allocator, allocInfo.memoryType, &memFlags);
|
vmaGetMemoryTypeProperties(allocator, allocInfo.memoryType, &memFlags);
|
||||||
if((memFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) == 0)
|
if((memFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) != 0)
|
||||||
{
|
{
|
||||||
// Allocation ended up in mappable memory. You can map it and access it directly.
|
// Allocation ended up in mappable memory. You can map it and access it directly.
|
||||||
void* mappedData;
|
void* mappedData;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue