Debian Codegraph @

third_party/rust/gpu-descriptor/README.md

raw
1 # gpu-descriptor
2
3 [![crates](https://img.shields.io/crates/v/gpu-descriptor.svg?style=for-the-badge&label=gpu-descriptor)](https://crates.io/crates/gpu-descriptor)
4 [![docs](https://img.shields.io/badge/docs.rs-gpu--descriptor-66c2a5?style=for-the-badge&labelColor=555555&logoColor=white)](https://docs.rs/gpu-descriptor)
5 [![actions](https://img.shields.io/github/workflow/status/zakarumych/gpu-descriptor/badge/master?style=for-the-badge)](https://github.com/zakarumych/gpu-descriptor/actions?query=workflow%3ARust)
6 [![MIT/Apache](https://img.shields.io/badge/license-MIT%2FApache-blue.svg?style=for-the-badge)](COPYING)
7 ![loc](https://img.shields.io/tokei/lines/github/zakarumych/gpu-descriptor?style=for-the-badge)
8
9
10 Library for Vulkan-like APIs to allocated descriptor sets
11 from descriptor pools fast, with least overhead and zero fragmentation.
12
13 Straightforward usage:
14 ```rust
15 use gpu_descriptor::DescriptorAllocator;
16
17 let mut allocator = DescriptorAllocator::new(max_update_after_bind_descriptors_in_all_pools); // Limit as dictated by API for selected hardware
18
19 let result = allocator.allocate(
20 device, // Implementation of `gpu_descriptor::DescriptorDevice`. Comes from plugins.
21 layout, // Descriptor set layout recognized by device's type.
22 flags, // Flags specified when layout was created.
23 layout_descriptor_count, // Descriptors count in the layout.
24 count, // count of sets to allocated.
25 );
26 ```
27
28
29 ## License
30
31 Licensed under either of
32
33 * Apache License, Version 2.0, ([license/APACHE](license/APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
34 * MIT license ([license/MIT](license/MIT) or http://opensource.org/licenses/MIT)
35
36 at your option.
37
38 ## Contributions
39
40 Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
41
42 ## Support me on Patreon
43
44 [![Support me on Patreon](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dzakarum%26type%3Dpatrons&style=for-the-badge)](https://patreon.com/zakarum)