BufferAPIHintBits questions
tksuoran opened this issue · 5 comments
tksuoran commented
- Why is
BufferAPIHintBits::Ring
buffer specific to Metal? Functionality similar toRing
could be implemented on top ofIBuffer
API, so I wonder, are there some benefits of having it directly inIBuffer
? But why only Metal? - Is
BufferAPIHintBits::Bone
used for anything? I did one super quick search in igl repo and I did not find any uses.
tksuoran commented
Looks like igl::vulkan::Buffer::upload()
at least references Ring buffer. So I guess references to metal BufferAPIHintBits
is outdated, and Ring can be used with other APIs as well?
corporateshark commented
Yes, IGL/Vulkan supports the BufferAPIHintBits::Ring
flag. IGL/OpenGL does not support this flag and does not require it.
BufferAPIHintBits::Bone
is for internal use. Thanks for pointing this out.
tksuoran commented
It would be great if the documentation comments would be updated:
enum BufferAPIHintBits : uint8_t {
Atomic = 1 << 0,
UniformBlock = 1 << 1, // Enforces UBO for OpenGL
Query = 1 << 2,
Bone = 1 << 3,
Ring = 1 << 4, // Metal: Ring buffers with memory for each swapchain image
NoCopy = 1 << 5, // Metal: The buffer should re-use previously allocated memory.
};
corporateshark commented
I would make a fix for this one. Many thanks for reporting.
corporateshark commented