All Projects → Traverse-Research → Gpu Allocator

Traverse-Research / Gpu Allocator

🦀 Memory allocator written in pure Rust for GPU memory in Vulkan and in the future DirectX 12

Programming Languages

rust
11053 projects

Labels

Projects that are alternatives of or similar to Gpu Allocator

Vulkan Tutorial
This is a series of tutorials on Vulkan, include all example projects which step by step.
Stars: ✭ 56 (-33.33%)
Mutual labels:  vulkan
3d Game Shaders For Beginners
🎮 A step-by-step guide to implementing SSAO, depth of field, lighting, normal mapping, and more for your 3D game.
Stars: ✭ 11,698 (+13826.19%)
Mutual labels:  vulkan
Flycube
Graphics API wrapper is written in C++ on top of Directx 12 and Vulkan. Provides main features including ray tracing.
Stars: ✭ 78 (-7.14%)
Mutual labels:  vulkan
Vulkan2drenderer
Easy to use 2D rendering engine using Vulkan API as backend.
Stars: ✭ 60 (-28.57%)
Mutual labels:  vulkan
Vulkanmemoryallocator
Easy to integrate Vulkan memory allocation library
Stars: ✭ 1,136 (+1252.38%)
Mutual labels:  vulkan
Gears Vk
Powerful low-level C++20 rendering framework for Vulkan 1.2, including Real-Time Ray Tracing (RTX) support, built atop Auto-Vk.
Stars: ✭ 71 (-15.48%)
Mutual labels:  vulkan
Spear
SPEAR is a integrated domain specific language translating C++17 to SPIR-V at host runtime
Stars: ✭ 45 (-46.43%)
Mutual labels:  vulkan
Spvgentwo
SpvGenTwo is a SPIR-V building and parsing library written in plain C++17 without any dependencies. No STL or other 3rd-Party library needed.
Stars: ✭ 74 (-11.9%)
Mutual labels:  vulkan
Shaderconductor
ShaderConductor is a tool designed for cross-compiling HLSL to other shading languages
Stars: ✭ 1,146 (+1264.29%)
Mutual labels:  vulkan
Dota 2 Vulkan
Tracker for issues specific to the Vulkan version of Dota 2 on Windows, Linux, and macOS
Stars: ✭ 77 (-8.33%)
Mutual labels:  vulkan
Nebula Trifid
Nebula Trifid
Stars: ✭ 62 (-26.19%)
Mutual labels:  vulkan
Gl vs vk
Comparison of OpenGL and Vulkan API in terms of performance.
Stars: ✭ 65 (-22.62%)
Mutual labels:  vulkan
Vkk
VK², Kotlin Wrapper for Vulkan: code expressiveness and safety meet graphic power
Stars: ✭ 72 (-14.29%)
Mutual labels:  vulkan
Dain Vulkan Gui
AI-Powered video interpolater (eg. 30fps -> 60fps) for Vulkan devices. Based on dain-ncnn-vulkan and ffmpeg
Stars: ✭ 58 (-30.95%)
Mutual labels:  vulkan
Scrapengine
A very simple real-time Vulkan 3D game engine
Stars: ✭ 80 (-4.76%)
Mutual labels:  vulkan
Ncnn Android Styletransfer
The style transfer android example
Stars: ✭ 54 (-35.71%)
Mutual labels:  vulkan
Tristeon3d
A 3D Engine built by two Game Engineering students.
Stars: ✭ 68 (-19.05%)
Mutual labels:  vulkan
Rust Game Development Frameworks
List of curated frameworks by the **Game Development in Rust** community.
Stars: ✭ 81 (-3.57%)
Mutual labels:  vulkan
Vkmark
Vulkan benchmark
Stars: ✭ 80 (-4.76%)
Mutual labels:  vulkan
Gpcs4
A Playstation 4 emulator just begin
Stars: ✭ 1,186 (+1311.9%)
Mutual labels:  vulkan

📒 gpu-allocator

Actions Status Docs LICENSE LICENSE Contributor Covenant Latest version

Banner

[dependencies]
gpu-allocator = "0.6.0"

Setting up the allocator for Vulkan

use ash::version::{DeviceV1_0, EntryV1_0, InstanceV1_0};
use ash::vk;

let mut allocator = VulkanAllocator::new(&VulkanAllocatorCreateDesc {
    instance,
    device,
    physical_device,
    debug_settings: Default::default(),
});

Vulkan allocation example

// Setup vulkan info
let vk_info = vk::BufferCreateInfo::builder()
    .size(512)
    .usage(vk::BufferUsageFlags::STORAGE_BUFFER);

let buffer = unsafe { device.create_buffer(&vk_info, None) }?;
let requirements = unsafe { device.get_buffer_memory_requirements(buffer) };


let allocation = allocator
    .allocate(&AllocationCreateDesc {
        name: "Example allocation",
        requirements,
        location: MemoryLocation::CpuToGpu,
        linear: true, // Buffers are always linear
    })?;

// Bind memory to the buffer
unsafe { device.bind_buffer_memory(buffer, allocation.memory(), allocation.offset())? };

// Cleanup
allocator.free(allocation)?;
unsafe { device.destroy_buffer(buffer, None) };

License

Licensed under either of

at your option.

Alternative libraries

Contribution

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].