2 unstable releases

0.2.0-beta.1+irconverter-2.0.4 Sep 26, 2024
0.1.0+irconverter-1.1 Jul 16, 2024

#929 in Graphics APIs

Download history 5/week @ 2024-08-17 1/week @ 2024-08-24 18/week @ 2024-08-31 3/week @ 2024-09-07 38/week @ 2024-09-14 143/week @ 2024-09-21 108/week @ 2024-09-28 9/week @ 2024-10-05 5/week @ 2024-10-12

198 downloads per month

Apache-2.0

27KB
566 lines

🤘 Saxaboom runtime

Actions Status Latest version Documentation Apache Contributor Covenant

Banner

saxaboom-runtime provides the runtime repr(C) definitions for structures and interop with the metal crate needed to make use of the metallib shaders generated by saxaboom (bindings for Metal shader converter).

Usage

After compiling your DXIL shaders to metallib using saxaboom, follow these steps in your render backend.

Add this to your Cargo.toml:

[dependencies]
saxaboom-runtime = "0.2.0-beta.1"

Example to create a descriptor to a buffer:

use saxaboom_runtime::ffi::IRDescriptorTableEntry;

let gpu_address = 0; // TODO: Read from metal::Buffer::gpu_address()
let metadata = IRDescriptorTableEntry::buffer_metadata(todo!("Fill saxaboom_runtime::BufferView"));
let buffer_descriptor = IRDescriptorTableEntry::buffer(gpu_address, metadata);

Dependencies

~4.5MB
~39K SLoC