mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-10-30 14:01:39 +00:00
Hard error on SPIRV parsing failure when VALIDATION is requested
This commit is contained in:
parent
fe07d272b1
commit
525efda7b2
@ -1005,10 +1005,11 @@ impl<B: GfxBackend> Device<B> {
|
||||
let module = match parser.parse() {
|
||||
Ok(module) => Some(module),
|
||||
Err(err) => {
|
||||
// TODO: eventually, when Naga gets support for all features,
|
||||
// we want to convert these to a hard error,
|
||||
log::warn!("Failed to parse shader SPIR-V code: {:?}", err);
|
||||
log::warn!("Shader module will not be validated or reflected");
|
||||
if desc.flags.contains(wgt::ShaderFlags::VALIDATION) {
|
||||
return Err(pipeline::CreateShaderModuleError::Parsing);
|
||||
}
|
||||
log::warn!("\tProceeding unsafely without validation");
|
||||
None
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user