-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It's impossible to bind to a host memory which is not coherent. #85
Comments
As far as I'm aware the main reason is that this requires users of the
That spec rule does not disallow a visible, non-coherent memory type to exist (this quote seems to at least partially answer your first question). In any case |
Well, as I learned today, the existence of host coherent memory doesn't guarantee that it's possible to bind to such memory. In other words, it's not enough to check that the memory exists and |
@nikitablack That's interesting. We always assumed that since there must always be a host visible and coherent memory type we could rely on using that. With not being possible to bind, do you mean you can´t bind it to a |
I was also sure that having a host coherent memory means I can safely use it for any type of object. It's a host memory after all, I can place whatever I want there. But in a recent discussion on a channel, a person showed that he was not able to find a memory type index for an image object with But the point here is that the Spec doesn't give any guarantees in this regard. Unfortunately, I can't find the correct wording in the Spec. Update: by not being able to bind I mean not being able to find an appropriate memory type index, sorry for the confusion. |
I found this in
As you can see, there's a limitation for certain kinds of objects. I understand that this would be an extremely specific use case and if you say that it's not worth changing the library because of features that nobody uses, it's perfectly understandable, feel free to close the issue. |
Hi.
Maybe I'm wrong but when I look into the
Allocator
implementation I see the following in theAllocator::allocate
method:MemoryLocation::CpuToGpu
was specified the function tries to find a memory type index for the preferred bitsvk::MemoryPropertyFlags::HOST_VISIBLE | vk::MemoryPropertyFlags::HOST_COHERENT | vk::MemoryPropertyFlags::HOST_CACHED
.vk::MemoryPropertyFlags::HOST_VISIBLE | vk::MemoryPropertyFlags::HOST_COHERENT
.Err(AllocationError::NoCompatibleMemoryTypeFound)
.So there's no chance to allocate a host visible, non-coherent memory.
Also, in
Allocator::new
, there's no need to check forhost_visible_not_coherent
. From the Spec11.2.1. Device Memory Properties
:The text was updated successfully, but these errors were encountered: