doc: document naga reflect
This commit is contained in:
parent
3b9514ad38
commit
977975f4c7
|
@ -40,12 +40,9 @@
|
|||
//! ```
|
||||
//!
|
||||
//! ## What's with all the traits?
|
||||
//! librashader-reflect is designed to be compiler-agnostic. In the future, we will allow usage of
|
||||
//! [naga](https://docs.rs/naga/latest/naga/index.html), a pure-Rust shader compiler, when it has
|
||||
//! matured enough to support [the features librashader needs](https://github.com/gfx-rs/naga/issues/1012).
|
||||
//!
|
||||
//! In the meanwhile, the only supported compilation type is [GlslangCompilation](crate::front::SpirvCompilation),
|
||||
//! which does transpilation via [glslang](https://github.com/KhronosGroup/glslang) and [SPIRV-Cross](https://github.com/KhronosGroup/SPIRV-Cross).
|
||||
//! librashader-reflect is designed to be compiler-agnostic. [naga](https://docs.rs/naga/latest/naga/index.html),
|
||||
//! a pure-Rust shader compiler, as well as SPIRV-Cross via [SpirvCompilation](crate::front::SpirvCompilation)
|
||||
//! is supported.
|
||||
#![feature(impl_trait_in_assoc_type)]
|
||||
#![feature(let_chains)]
|
||||
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
#[doc(hidden)]
|
||||
pub mod glsl;
|
||||
|
||||
#[doc(hidden)]
|
||||
pub mod hlsl;
|
||||
|
||||
#[doc(hidden)]
|
||||
pub mod msl;
|
||||
|
||||
use crate::error::{SemanticsErrorKind, ShaderReflectError};
|
||||
|
@ -20,6 +25,8 @@ use spirv_cross::ErrorCode;
|
|||
use crate::reflect::helper::{SemanticErrorBlame, TextureData, UboData};
|
||||
|
||||
/// Reflect shaders under SPIRV-Cross semantics.
|
||||
///
|
||||
/// SPIRV-Cross supports GLSL, HLSL, SPIR-V, and MSL targets.
|
||||
#[derive(Debug)]
|
||||
pub struct SpirvCross;
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ pub mod presets;
|
|||
|
||||
mod helper;
|
||||
|
||||
/// Reflection via naga.
|
||||
#[cfg(feature = "naga")]
|
||||
pub mod naga;
|
||||
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
#[doc(hidden)]
|
||||
pub mod msl;
|
||||
|
||||
#[doc(hidden)]
|
||||
pub mod spirv;
|
||||
|
||||
#[doc(hidden)]
|
||||
pub mod wgsl;
|
||||
|
||||
use crate::error::{SemanticsErrorKind, ShaderReflectError};
|
||||
|
@ -28,6 +33,8 @@ use crate::reflect::{align_uniform_size, ReflectShader, ShaderReflection};
|
|||
///
|
||||
/// The Naga reflector will lower combined image samplers to split,
|
||||
/// with the same bind point on descriptor group 1.
|
||||
///
|
||||
/// Naga supports WGSL, SPIR-V, and MSL targets.
|
||||
#[derive(Debug)]
|
||||
pub struct Naga;
|
||||
#[derive(Debug)]
|
||||
|
|
Loading…
Reference in a new issue