reflect: make reflect errors non-exhaustive
This commit is contained in:
parent
9e2c914e57
commit
9cad2b9128
|
@ -54,6 +54,7 @@ Please report an issue if you run into a shader that works in RetroArch, but not
|
||||||
* Sampler objects are used rather than `glTexParameter`.
|
* Sampler objects are used rather than `glTexParameter`.
|
||||||
* Sampler inputs and outputs are not renamed. This is useful for debugging shaders in RenderDoc.
|
* Sampler inputs and outputs are not renamed. This is useful for debugging shaders in RenderDoc.
|
||||||
* UBO and Push Constant Buffer sizes are padded to 16-byte boundaries.
|
* UBO and Push Constant Buffer sizes are padded to 16-byte boundaries.
|
||||||
|
*
|
||||||
* Direct3D 11
|
* Direct3D 11
|
||||||
* The staging buffer is not kept around when loading static textures (LUTs).
|
* The staging buffer is not kept around when loading static textures (LUTs).
|
||||||
* HDR10 support is not part of the shader runtime and is not supported.
|
* HDR10 support is not part of the shader runtime and is not supported.
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
use crate::reflect::semantics::MemberOffset;
|
use crate::reflect::semantics::MemberOffset;
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
|
||||||
|
#[non_exhaustive]
|
||||||
#[derive(Error, Debug)]
|
#[derive(Error, Debug)]
|
||||||
pub enum ShaderCompileError {
|
pub enum ShaderCompileError {
|
||||||
#[cfg(feature = "unstable-rust-pipeline")]
|
#[cfg(feature = "unstable-rust-pipeline")]
|
||||||
|
@ -32,6 +33,7 @@ pub enum SemanticsErrorKind {
|
||||||
InvalidTypeForSemantic(String),
|
InvalidTypeForSemantic(String),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[non_exhaustive]
|
||||||
#[derive(Error, Debug)]
|
#[derive(Error, Debug)]
|
||||||
pub enum ShaderReflectError {
|
pub enum ShaderReflectError {
|
||||||
#[cfg(feature = "unstable-rust-pipeline")]
|
#[cfg(feature = "unstable-rust-pipeline")]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use gl::types::GLint;
|
use gl::types::GLint;
|
||||||
use librashader_reflect::reflect::semantics::{BindingStage, MemberOffset};
|
use librashader_reflect::reflect::semantics::BindingStage;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum VariableLocation {
|
pub enum VariableLocation {
|
||||||
|
@ -22,14 +22,6 @@ pub struct UniformLocation<T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl UniformLocation<GLint> {
|
impl UniformLocation<GLint> {
|
||||||
// pub fn is_fragment_valid(&self) -> bool {
|
|
||||||
// self.fragment >= 0
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// pub fn is_vertex_valid(&self) -> bool {
|
|
||||||
// self.vertex >= 0
|
|
||||||
// }
|
|
||||||
|
|
||||||
pub fn is_valid(&self, stage: BindingStage) -> bool {
|
pub fn is_valid(&self, stage: BindingStage) -> bool {
|
||||||
let mut validity = false;
|
let mut validity = false;
|
||||||
if stage.contains(BindingStage::FRAGMENT) {
|
if stage.contains(BindingStage::FRAGMENT) {
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
|
//! Re-exports for usage of librashader in consuming libraries.
|
||||||
|
//!
|
||||||
|
//! Runtime implementations should depend directly on constituent crates.
|
||||||
pub mod presets {
|
pub mod presets {
|
||||||
pub use librashader_presets::*;
|
pub use librashader_presets::*;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue