Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CpuBufferPool array allocator #962

Closed
penguin42 opened this issue May 27, 2018 · 0 comments · Fixed by #2127
Closed

CpuBufferPool array allocator #962

penguin42 opened this issue May 27, 2018 · 0 comments · Fixed by #2127

Comments

@penguin42
Copy link
Contributor

Hi,
I've got a:
buffer::device_local::DeviceLocalBuffer::<[u8]>::array(vdevice.clone(), voxelsizevoxelsizevoxelsize,...

I'd like to dump, and I was hoping to use a CpuBufferPool for that, but it seems to be missing an ::array() allocator, it looks like it'll only take a fixed type for allocations, for example:

174 | let cpubuf = buffer::cpu_pool::CpuBufferPool::<[u8]>::download(self.vdevice.clone());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in bulbvulk::vulkano::buffer::CpuBufferPool<[u8]>
|
= note: the method download exists but the following trait bounds were not satisfied:
[u8] : std::marker::Sized

error[E0277]: the trait bound [u8]: std::marker::Sized is not satisfied

I think it would be good to be able to allocate a CpuBufferPool in the same way that DeviceLocalBuffer lets you.
(Actually an even nicer thing would be to be able to pass a reference to my DeviceLocalBuffer and to create a CpuBufferPool of exactly the right size/type)
I guess I'll use a CpuAccessibleBuffer but that has the scary warning it might disappear.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant