Skip to content

Commit

Permalink
Improve spirv error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
attackgoat committed Dec 16, 2023
1 parent c62e4e6 commit dd8b94f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/driver/shader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -940,13 +940,17 @@ impl Shader {
spec.constant_id,
spec_info.data[spec.offset as usize..spec.offset as usize + spec.size]
.try_into()
.map_err(|_| DriverError::InvalidData)?,
.map_err(|err| {
error!("Unable to specialize spirv: {err}");

DriverError::InvalidData
})?,
);
}
}

let entry_points = config.reflect().map_err(|_| {
error!("Unable to reflect spirv");
let entry_points = config.reflect().map_err(|err| {
error!("Unable to reflect spirv: {err}");

DriverError::InvalidData
})?;
Expand Down

0 comments on commit dd8b94f

Please sign in to comment.