Skip to content

Commit

Permalink
typo + error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-r-earp committed Aug 17, 2023
1 parent fb4dcad commit 53b3965
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions vulkano/src/pipeline/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,12 +508,12 @@ impl PipelineShaderStageCreateInfo {
let [max_x, max_y, max_z] = max_compute_work_group_size;
if x > max_x || y > max_y || z > max_z {
return Err(Box::new(ValidationError {
problem: format!("`workgroup size` {local_size:?} is greater than `max_work_group_size` {max_compute_work_group_size:?}").into(),
problem: format!("`workgroup size` {local_size:?} is greater than `max_compute_work_group_size` {max_compute_work_group_size:?}").into(),
..Default::default()
}));
}
let max_invocations = properties.max_compute_work_group_invocations;
if let Some(workgroup_size) = (|| x.checked_mul(y)?.checked_mul(z))() {
let max_invocations = properties.max_compute_work_group_invocations;
if workgroup_size > max_invocations {
return Err(Box::new(ValidationError {
problem: format!("the product of `workgroup size` {local_size:?} = {workgroup_size} is greater than `max_compute_work_group_invocations` {max_invocations}").into(),
Expand All @@ -523,12 +523,9 @@ impl PipelineShaderStageCreateInfo {
Some(workgroup_size)
} else {
return Err(Box::new(ValidationError {
problem: format!(
"the product of `workgroup size` {local_size:?} overflowed"
)
.into(),
..Default::default()
}));
problem: format!("the product of `workgroup size` {local_size:?} = (overflow) is greater than `max_compute_work_group_invocations` {max_invocations}").into(),
..Default::default()
}));
}
} else {
// TODO: Additional stages when `.local_size()` supports them.
Expand Down

0 comments on commit 53b3965

Please sign in to comment.