aea440f194
When naga is more mature (i.e. with support for COMBINED_IMAGE_SAMPLER), `naga::Module` handles everything we need with a more ergonomic API
33 lines
747 B
Rust
33 lines
747 B
Rust
use crate::error::{SemanticsErrorKind, ShaderReflectError};
|
|
|
|
pub struct UboData {
|
|
// id: u32,
|
|
// descriptor_set: u32,
|
|
pub binding: u32,
|
|
pub size: u32,
|
|
}
|
|
|
|
pub struct TextureData<'a> {
|
|
// id: u32,
|
|
// descriptor_set: u32,
|
|
pub name: &'a str,
|
|
pub binding: u32,
|
|
}
|
|
|
|
// todo: might want to take these crate helpers out.
|
|
|
|
#[derive(Copy, Clone)]
|
|
pub enum SemanticErrorBlame {
|
|
Vertex,
|
|
Fragment,
|
|
}
|
|
|
|
impl SemanticErrorBlame {
|
|
pub fn error(self, kind: SemanticsErrorKind) -> ShaderReflectError {
|
|
match self {
|
|
SemanticErrorBlame::Vertex => ShaderReflectError::VertexSemanticError(kind),
|
|
SemanticErrorBlame::Fragment => ShaderReflectError::FragmentSemanticError(kind),
|
|
}
|
|
}
|
|
}
|