reflect: rename SpirV to SPIRV

This commit is contained in:
chyyran 2023-01-13 23:59:16 -05:00
parent f49c78912b
commit 403ed5ed13
4 changed files with 11 additions and 11 deletions

View file

@ -5,7 +5,7 @@ use librashader::reflect::image::{Image, UVDirection, RGBA8};
use librashader::reflect::semantics::{ use librashader::reflect::semantics::{
Semantic, ShaderSemantics, TextureSemantics, UniformSemantic, UniqueSemantics, Semantic, ShaderSemantics, TextureSemantics, UniformSemantic, UniqueSemantics,
}; };
use librashader::reflect::targets::SpirV; use librashader::reflect::targets::SPIRV;
use librashader::reflect::{ use librashader::reflect::{
CompileShader, CompilerBackend, FromCompilation, GlslangCompilation, ReflectShader, CompileShader, CompilerBackend, FromCompilation, GlslangCompilation, ReflectShader,
ShaderCompilerOutput, ShaderReflection, ShaderCompilerOutput, ShaderReflection,
@ -51,7 +51,7 @@ impl FilterReflection {
let source: ShaderSource = ShaderSource::load(&shader.name)?; let source: ShaderSource = ShaderSource::load(&shader.name)?;
let spirv = GlslangCompilation::compile(&source)?; let spirv = GlslangCompilation::compile(&source)?;
let mut reflect = SpirV::from_compilation(spirv)?; let mut reflect = SPIRV::from_compilation(spirv)?;
for parameter in source.parameters.iter() { for parameter in source.parameters.iter() {
uniform_semantics.insert( uniform_semantics.insert(

View file

@ -1,4 +1,4 @@
use crate::back::targets::SpirV; use crate::back::targets::SPIRV;
use crate::back::{CompileShader, CompilerBackend, FromCompilation, ShaderCompilerOutput}; use crate::back::{CompileShader, CompilerBackend, FromCompilation, ShaderCompilerOutput};
use crate::error::{ShaderCompileError, ShaderReflectError}; use crate::error::{ShaderCompileError, ShaderReflectError};
use crate::front::shaderc::GlslangCompilation; use crate::front::shaderc::GlslangCompilation;
@ -13,8 +13,8 @@ struct WriteSpirV {
fragment: Vec<u32>, fragment: Vec<u32>,
} }
impl FromCompilation<GlslangCompilation> for SpirV { impl FromCompilation<GlslangCompilation> for SPIRV {
type Target = SpirV; type Target = SPIRV;
type Options = Option<()>; type Options = Option<()>;
type Context = (); type Context = ();
type Output = type Output =
@ -46,7 +46,7 @@ impl ReflectShader for WriteSpirV {
} }
} }
impl CompileShader<SpirV> for WriteSpirV { impl CompileShader<SPIRV> for WriteSpirV {
type Options = Option<()>; type Options = Option<()>;
type Context = (); type Context = ();

View file

@ -9,7 +9,7 @@ pub struct GLSL;
/// Shader compiler target for HLSL. /// Shader compiler target for HLSL.
pub struct HLSL; pub struct HLSL;
/// Shader compiler target for SPIR-V. /// Shader compiler target for SPIR-V.
pub struct SpirV; pub struct SPIRV;
/// Shader compiler target for MSL /// Shader compiler target for MSL
pub struct MSL; pub struct MSL;
@ -19,7 +19,7 @@ impl OutputTarget for GLSL {
impl OutputTarget for HLSL { impl OutputTarget for HLSL {
type Output = String; type Output = String;
} }
impl OutputTarget for SpirV { impl OutputTarget for SPIRV {
type Output = Vec<u32>; type Output = Vec<u32>;
} }

View file

@ -14,7 +14,7 @@ use ash::vk;
use librashader_common::{ImageFormat, Size, Viewport}; use librashader_common::{ImageFormat, Size, Viewport};
use librashader_preprocess::ShaderSource; use librashader_preprocess::ShaderSource;
use librashader_presets::{ShaderPassConfig, ShaderPreset, TextureConfig}; use librashader_presets::{ShaderPassConfig, ShaderPreset, TextureConfig};
use librashader_reflect::back::targets::SpirV; use librashader_reflect::back::targets::SPIRV;
use librashader_reflect::back::{CompileShader, CompilerBackend, FromCompilation}; use librashader_reflect::back::{CompileShader, CompilerBackend, FromCompilation};
use librashader_reflect::front::shaderc::GlslangCompilation; use librashader_reflect::front::shaderc::GlslangCompilation;
use librashader_reflect::reflect::semantics::{ use librashader_reflect::reflect::semantics::{
@ -39,7 +39,7 @@ pub struct VulkanObjects {
type ShaderPassMeta = ( type ShaderPassMeta = (
ShaderPassConfig, ShaderPassConfig,
ShaderSource, ShaderSource,
CompilerBackend<impl CompileShader<SpirV, Options = Option<()>, Context = ()> + ReflectShader>, CompilerBackend<impl CompileShader<SPIRV, Options = Option<()>, Context = ()> + ReflectShader>,
); );
/// A collection of handles needed to access the Vulkan instance. /// A collection of handles needed to access the Vulkan instance.
@ -289,7 +289,7 @@ impl FilterChainVulkan {
let source: ShaderSource = ShaderSource::load(&shader.name)?; let source: ShaderSource = ShaderSource::load(&shader.name)?;
let spirv = GlslangCompilation::compile(&source)?; let spirv = GlslangCompilation::compile(&source)?;
let reflect = SpirV::from_compilation(spirv)?; let reflect = SPIRV::from_compilation(spirv)?;
for parameter in source.parameters.iter() { for parameter in source.parameters.iter() {
uniform_semantics.insert( uniform_semantics.insert(