Skip to content

Conversation

@linyaa-kiwi
Copy link
Contributor

vkMapMemory failed because the memory lacked
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT. Require that bit.

Drop the requirement for VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT because (a)
it is unneeded and (b) it may intefere with finding a type that supports
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT.

Fail if protected mode is requested on the cmdline because host-visible
protected memory is useless and contradictory.

If multiple VkMemoryPropertyFlags were required, the function checked if
*any* flag was supported instead of checking for *all* flags.
vkMapMemory failed because the memory lacked
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT. Require that bit.

Drop the requirement for VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT because (a)
it is unneeded and (b) it may intefere with finding a type that supports
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT.

Fail if protected mode is requested on the cmdline because host-visible
protected memory is useless and contradictory.

With these fixes, find_image_memory() is now independent of images. So
rename it choose_memory_type_index().
It's merely a special case of choose_memory_type_index().
@linyaa-kiwi
Copy link
Contributor Author

cc @dawnhan1111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant