mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-25 08:14:20 +00:00
Fix off-by-one error in SubpassDescription::validate
(#2556)
* fix: off-by-one error in `SubpassDescription::validate` * use `view_count` instead of `highest_view_index`
This commit is contained in:
parent
d02165a28c
commit
817b52cee5
@ -2946,9 +2946,9 @@ impl SubpassDescription {
|
||||
}));
|
||||
}
|
||||
|
||||
let highest_view_index = u32::BITS - view_mask.leading_zeros();
|
||||
let view_count = u32::BITS - view_mask.leading_zeros();
|
||||
|
||||
if highest_view_index >= properties.max_multiview_view_count.unwrap_or(0) {
|
||||
if view_count > properties.max_multiview_view_count.unwrap_or(0) {
|
||||
return Err(Box::new(ValidationError {
|
||||
context: "view_mask".into(),
|
||||
problem: "the highest enabled view index is not less than the \
|
||||
|
Loading…
Reference in New Issue
Block a user