Crates.io | saxaboom-runtime |
lib.rs | saxaboom-runtime |
version | 0.2.0-beta.1+irconverter-2.0.4 |
source | src |
created_at | 2024-07-16 09:09:59.437915 |
updated_at | 2024-09-26 13:21:51.815309 |
description | Runtime definitions for Metal Shader Converter |
homepage | https://traverseresearch.nl |
repository | https://github.com/Traverse-Research/saxaboom |
max_upload_size | |
id | 1304837 |
size | 37,589 |
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).
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);