From 403ed5ed130efbd73a462b49ae65d67707f7a53f Mon Sep 17 00:00:00 2001 From: chyyran Date: Fri, 13 Jan 2023 23:59:16 -0500 Subject: [PATCH] reflect: rename SpirV to SPIRV --- librashader-capi/src/reflect/mod.rs | 4 ++-- librashader-reflect/src/back/spirv.rs | 8 ++++---- librashader-reflect/src/back/targets.rs | 4 ++-- librashader-runtime-vk/src/filter_chain.rs | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/librashader-capi/src/reflect/mod.rs b/librashader-capi/src/reflect/mod.rs index d5bafc4..7197688 100644 --- a/librashader-capi/src/reflect/mod.rs +++ b/librashader-capi/src/reflect/mod.rs @@ -5,7 +5,7 @@ use librashader::reflect::image::{Image, UVDirection, RGBA8}; use librashader::reflect::semantics::{ Semantic, ShaderSemantics, TextureSemantics, UniformSemantic, UniqueSemantics, }; -use librashader::reflect::targets::SpirV; +use librashader::reflect::targets::SPIRV; use librashader::reflect::{ CompileShader, CompilerBackend, FromCompilation, GlslangCompilation, ReflectShader, ShaderCompilerOutput, ShaderReflection, @@ -51,7 +51,7 @@ impl FilterReflection { let source: ShaderSource = ShaderSource::load(&shader.name)?; 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() { uniform_semantics.insert( diff --git a/librashader-reflect/src/back/spirv.rs b/librashader-reflect/src/back/spirv.rs index 2cd1496..295895b 100644 --- a/librashader-reflect/src/back/spirv.rs +++ b/librashader-reflect/src/back/spirv.rs @@ -1,4 +1,4 @@ -use crate::back::targets::SpirV; +use crate::back::targets::SPIRV; use crate::back::{CompileShader, CompilerBackend, FromCompilation, ShaderCompilerOutput}; use crate::error::{ShaderCompileError, ShaderReflectError}; use crate::front::shaderc::GlslangCompilation; @@ -13,8 +13,8 @@ struct WriteSpirV { fragment: Vec, } -impl FromCompilation for SpirV { - type Target = SpirV; +impl FromCompilation for SPIRV { + type Target = SPIRV; type Options = Option<()>; type Context = (); type Output = @@ -46,7 +46,7 @@ impl ReflectShader for WriteSpirV { } } -impl CompileShader for WriteSpirV { +impl CompileShader for WriteSpirV { type Options = Option<()>; type Context = (); diff --git a/librashader-reflect/src/back/targets.rs b/librashader-reflect/src/back/targets.rs index 8999bf9..d1e5955 100644 --- a/librashader-reflect/src/back/targets.rs +++ b/librashader-reflect/src/back/targets.rs @@ -9,7 +9,7 @@ pub struct GLSL; /// Shader compiler target for HLSL. pub struct HLSL; /// Shader compiler target for SPIR-V. -pub struct SpirV; +pub struct SPIRV; /// Shader compiler target for MSL pub struct MSL; @@ -19,7 +19,7 @@ impl OutputTarget for GLSL { impl OutputTarget for HLSL { type Output = String; } -impl OutputTarget for SpirV { +impl OutputTarget for SPIRV { type Output = Vec; } diff --git a/librashader-runtime-vk/src/filter_chain.rs b/librashader-runtime-vk/src/filter_chain.rs index 9a41bc6..34a36bf 100644 --- a/librashader-runtime-vk/src/filter_chain.rs +++ b/librashader-runtime-vk/src/filter_chain.rs @@ -14,7 +14,7 @@ use ash::vk; use librashader_common::{ImageFormat, Size, Viewport}; use librashader_preprocess::ShaderSource; 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::front::shaderc::GlslangCompilation; use librashader_reflect::reflect::semantics::{ @@ -39,7 +39,7 @@ pub struct VulkanObjects { type ShaderPassMeta = ( ShaderPassConfig, ShaderSource, - CompilerBackend, Context = ()> + ReflectShader>, + CompilerBackend, Context = ()> + ReflectShader>, ); /// A collection of handles needed to access the Vulkan instance. @@ -289,7 +289,7 @@ impl FilterChainVulkan { let source: ShaderSource = ShaderSource::load(&shader.name)?; let spirv = GlslangCompilation::compile(&source)?; - let reflect = SpirV::from_compilation(spirv)?; + let reflect = SPIRV::from_compilation(spirv)?; for parameter in source.parameters.iter() { uniform_semantics.insert(