reflect: fix expected runtime config options

This commit is contained in:
chyyran 2023-02-05 01:14:01 -05:00
parent f677666900
commit d6ac2c665d

View file

@ -1,6 +1,6 @@
pub use spirv_to_dxil::DxilObject; pub use spirv_to_dxil::DxilObject;
pub use spirv_to_dxil::ShaderModel; pub use spirv_to_dxil::ShaderModel;
use spirv_to_dxil::{ShaderStage, ValidatorVersion}; use spirv_to_dxil::{ConstantBufferConfig, RuntimeConfig, ShaderStage, ValidatorVersion};
use crate::back::{CompilerBackend, CompileShader, FromCompilation, ShaderCompilerOutput}; use crate::back::{CompilerBackend, CompileShader, FromCompilation, ShaderCompilerOutput};
use crate::back::spirv::WriteSpirV; use crate::back::spirv::WriteSpirV;
@ -68,7 +68,7 @@ impl CompileShader<DXIL> for WriteSpirV {
ShaderStage::Vertex, ShaderStage::Vertex,
sm, sm,
ValidatorVersion::None, ValidatorVersion::None,
Default::default()) config.clone())
.map_err(|s| ShaderCompileError::SpirvToDxilCompileError(s))?; .map_err(|s| ShaderCompileError::SpirvToDxilCompileError(s))?;
@ -76,9 +76,9 @@ impl CompileShader<DXIL> for WriteSpirV {
spirv_to_dxil::spirv_to_dxil(&self.fragment, spirv_to_dxil::spirv_to_dxil(&self.fragment,
None, "main", None, "main",
ShaderStage::Fragment, ShaderStage::Fragment,
ShaderModel::ShaderModel6_0, sm,
ValidatorVersion::None, ValidatorVersion::None,
Default::default()) config)
.map_err(|s| ShaderCompileError::SpirvToDxilCompileError(s))?; .map_err(|s| ShaderCompileError::SpirvToDxilCompileError(s))?;
Ok(ShaderCompilerOutput { Ok(ShaderCompilerOutput {