docs: add crate docs to helper crates

This commit is contained in:
chyyran 2023-01-16 23:09:07 -05:00
parent 3cdd44f5bb
commit e887b7cf35
10 changed files with 30 additions and 10 deletions

View file

@ -1,8 +1,8 @@
# librashader
![gameboy-player-crt-royale](https://user-images.githubusercontent.com/1000503/211993121-2ec1f6f0-445b-4b47-8612-291a4eab5d15.png)
![Mega Bezel SMOOTH-ADV](https://user-images.githubusercontent.com/1000503/212806508-11e6942d-ac48-4659-bd61-1e50259d92b2.png)
<small>*Mega Bezel SMOOTH-ADV on OpenGL 4.6*</small>
<small>*Mega Bezel SMOOTH-ADV on DirectX 11*</small>
librashader (*/ˈli:brəʃeɪdɚ/*) is a preprocessor, compiler, and runtime for RetroArch 'slang' shaders, rewritten in pure Rust.

View file

@ -1,3 +1,5 @@
//! Common types and conversions for librashader.
/// OpenGL common conversions.
#[cfg(feature = "opengl")]
pub mod gl;

View file

@ -1,3 +1,4 @@
//! Shader preprocessing for librashader
mod error;
mod include;
mod pragma;

View file

@ -1,3 +1,4 @@
//! Shader preset definition (`.slangp`) parser for librashader.
#![feature(drain_filter)]
mod error;

View file

@ -1,3 +1,4 @@
//! Shader reflection and cross-compilation for librashader.
#![feature(type_alias_impl_trait)]
/// Shader codegen backends.

View file

@ -1,3 +1,8 @@
//! librashader Direct3D 11 runtime
//!
//! This crate should not be used directly.
//! See [`librashader::runtime::d3d11`](https://docs.rs/librashader/latest/librashader/runtime/d3d11/index.html) instead.
#![feature(type_alias_impl_trait)]
#![feature(let_chains)]
#[cfg(test)]

View file

@ -1,3 +1,8 @@
//! librashader OpenGL runtime
//!
//! This crate should not be used directly.
//! See [`librashader::runtime::gl`](https://docs.rs/librashader/latest/librashader/runtime/gl/index.html) instead.
#![feature(strict_provenance)]
#![feature(type_alias_impl_trait)]
#![feature(let_chains)]

View file

@ -1,3 +1,8 @@
//! librashader Vulkan runtime
//!
//! This crate should not be used directly.
//! See [`librashader::runtime::vk`](https://docs.rs/librashader/latest/librashader/runtime/vk/index.html) instead.
#![feature(type_alias_impl_trait)]
#![feature(let_chains)]
#![feature(strict_provenance)]

View file

@ -1,5 +1,10 @@
#![feature(array_chunks)]
//! Helpers and shared logic for librashader runtime implementations.
//!
//! 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)]
/// Scaling helpers.
pub mod scaling;

View file

@ -15,7 +15,7 @@
//!
//! ## Runtimes
//! Currently available runtimes are Vulkan 1.3+, OpenGL 3.3+ and 4.6 (with DSA), and Direct3D 11.
//! Work on the Direct3D 12 runtimes are in progress. The Vulkan runtime requires [`VK_KHR_dynamic_rendering`](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_dynamic_rendering.html).
//! Work on the Direct3D 12 runtime is in progress. The Vulkan runtime requires [`VK_KHR_dynamic_rendering`](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_dynamic_rendering.html).
//!
//! | **API** | **Status** | **`librashader` feature** |
//! |-------------|------------|---------------------------|
@ -29,7 +29,7 @@
//! | Metal | ❌ | |
//!
//! ## C API
//! For documentation on the librashader C API, see [librashader_capi](https://docs.rs/librashader-capi/latest/librashader_capi/),
//! For documentation on the librashader C API, see [librashader-capi](https://docs.rs/librashader-capi/latest/librashader_capi/),
//! or [`librashader.h`](https://github.com/SnowflakePowered/librashader/blob/master/include/librashader.h).
#[cfg(feature = "presets")]
@ -102,11 +102,6 @@ pub mod reflect {
pub use librashader_reflect::reflect::cross::CompiledProgram;
}
pub use librashader_reflect::reflect::semantics::BindingMeta;
/// Helpers to deal with image loading.
pub mod image {
pub use librashader_runtime::image::*;
}
}
/// Shader runtimes to execute a filter chain on a GPU surface.