mirror of
https://github.com/bevyengine/bevy
synced 2024-11-26 06:30:19 +00:00
Allow SPIR-V shaders to process when shader defs are present (#7772)
This commit is contained in:
parent
20101647c1
commit
7b7294b8a7
1 changed files with 1 additions and 6 deletions
|
@ -296,8 +296,6 @@ pub enum ProcessShaderError {
|
|||
"Not enough '# endif' lines. Each if statement should be followed by an endif statement."
|
||||
)]
|
||||
NotEnoughEndIfs,
|
||||
#[error("This Shader's format does not support processing shader defs.")]
|
||||
ShaderFormatDoesNotSupportShaderDefs,
|
||||
#[error("This Shader's format does not support imports.")]
|
||||
ShaderFormatDoesNotSupportImports,
|
||||
#[error("Unresolved import: {0:?}.")]
|
||||
|
@ -477,11 +475,8 @@ impl ShaderProcessor {
|
|||
Source::Wgsl(source) => source.deref(),
|
||||
Source::Glsl(source, _stage) => source.deref(),
|
||||
Source::SpirV(source) => {
|
||||
if shader_defs_unique.is_empty() {
|
||||
return Ok(ProcessedShader::SpirV(source.clone()));
|
||||
}
|
||||
return Err(ProcessShaderError::ShaderFormatDoesNotSupportShaderDefs);
|
||||
}
|
||||
};
|
||||
|
||||
let mut scopes = vec![Scope::new(true)];
|
||||
|
|
Loading…
Reference in a new issue