2022-12-01 14:50:57 +11:00
|
|
|
//! Helpers and shared logic for librashader runtime implementations.
|
2023-01-17 15:09:07 +11:00
|
|
|
//!
|
|
|
|
//! Most of this is code internal to librashader runtime implementations and is not
|
|
|
|
//! intended for general use unless writing a librashader runtime.
|
|
|
|
//!
|
|
|
|
//! This crate is exempt from semantic versioning of the librashader API.
|
|
|
|
#![feature(array_chunks)]
|
2022-12-01 14:50:57 +11:00
|
|
|
|
|
|
|
/// Scaling helpers.
|
2022-11-30 17:38:05 +11:00
|
|
|
pub mod scaling;
|
2022-12-01 14:50:57 +11:00
|
|
|
|
|
|
|
/// Uniform binding helpers.
|
2022-11-29 16:23:48 +11:00
|
|
|
pub mod uniforms;
|
2022-12-01 14:50:57 +11:00
|
|
|
|
|
|
|
/// Parameter reflection helpers and traits.
|
|
|
|
pub mod parameters;
|
|
|
|
|
2022-12-02 09:11:42 +11:00
|
|
|
/// Image handling helpers.
|
|
|
|
pub mod image;
|
2022-12-06 17:01:21 +11:00
|
|
|
|
|
|
|
/// Ringbuffer helpers
|
|
|
|
pub mod ringbuffer;
|
2023-01-15 19:01:23 +11:00
|
|
|
|
|
|
|
/// Generic implementation of semantics binding.
|
|
|
|
pub mod binding;
|
2023-01-19 16:37:37 +11:00
|
|
|
|
|
|
|
/// Used to declare a `ShaderPassMeta` type for the given target shader language and compilation type.
|
|
|
|
#[macro_export]
|
|
|
|
macro_rules! decl_shader_pass_meta {
|
|
|
|
(type $ty_name:ident = <$target:ty, $compilation:ty>) => {
|
|
|
|
type $ty_name =
|
|
|
|
librashader_reflect::reflect::presets::ShaderPassMeta<
|
|
|
|
impl librashader_reflect::back::CompileShader<
|
|
|
|
$target,
|
|
|
|
Options = <$target as librashader_reflect::back::FromCompilation<
|
|
|
|
$compilation,
|
|
|
|
>>::Options,
|
|
|
|
Context = <$target as librashader_reflect::back::FromCompilation<
|
|
|
|
$compilation,
|
|
|
|
>>::Context,
|
|
|
|
> + librashader_reflect::reflect::ReflectShader,
|
|
|
|
>;
|
|
|
|
};
|
|
|
|
}
|