Is Vulkan's VkMemoryHeapFlagBits missing values?

ぐ巨炮叔叔 提交于 2019-12-05 11:01:35

No. It is perfectly valid for VkMemoryHeap::flags to be 0. A particular flag is either present or absent; it's not an enumeration where the value can attain one of a small number of different possibilities. Usually, flags are independent of one another.

That's how bitflags work; they represent boolean conditions. A particular flag is either present or absent. If a flag is present, then the object attains the meaning that the flag defines. If it is absent, then the object doesn't have that meaning.

A heap with VK_MEMORY_HEAP_DEVICE_LOCAL_BIT means exactly what the specification says it means: "the heap corresponds to device local memory". A heap without that flag set means that heap does not "correspond to device local memory".

The specification requires that at least one heap have this flag set. But that's all.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!