Closed nerditation closed 7 months ago
I just add the implementation, some examples and documentation are definitely needed, but I hesitate to make changes to the docs because I can't phrase it properly. feel free to make edit or suggest. thanks.
also, I tried to make it compatible to existing caller code, but more testing is needed to confirm.
because I had just used the ash backend before, I overlooked the "mock" backend. I also forgot the MemoryBlock
public api.
sections are added to the ash and erupt examples.
just found out, the example snippets inside the backend crate level documentation (i.e. the doc-comments in gpu-alloc-ash/src/lib.rs
and gpu-alloc-erupt/src/lib.rs
) is the exact same code in the "examples" crate. should we replicate the change in the "examples" crate for the docs, or should we instead replace the code snippet in the doc with a link to the "examples" crate?
I see the gpu-alloc-basic-example
crate is not published, so the link would have to be pointing to the github repo instead of crates.io
or docs.rs
?
sorry for the long delay, I've moved away since last time I dealt with GPU related project. is this change still relevant? shall we finish it? @zakarumych
How am I failed to see this?
Looks good to me.
previously caller need to explicitly wrap the backend type (ash::Device or erupt::DeviceLoader), which is verbose and tedious:
by change the generic parameter type to
impl AsRef<MD>
whereMD: MemoryDevice<M>
, and by addingimpl
s for the appropriate backend wrapper types, the call site is much more concise: