Skip to content

Commit

Permalink
extension/ext: Add missing length-rounding in cmd_set_sample_mask()
Browse files Browse the repository at this point in the history
… assert (#895)
  • Loading branch information
Macdu authored Mar 29, 2024
1 parent 71387e9 commit aee0c61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ash/src/extensions/ext/extended_dynamic_state3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl Device {
samples.as_raw().is_power_of_two(),
"Only one SampleCount bit must be set"
);
assert_eq!(samples.as_raw() as usize / 32, sample_mask.len());
assert_eq!((samples.as_raw() as usize + 31) / 32, sample_mask.len());
(self.fp.cmd_set_sample_mask_ext)(command_buffer, samples, sample_mask.as_ptr())
}

Expand Down
2 changes: 1 addition & 1 deletion ash/src/extensions/ext/shader_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ impl Device {
samples.as_raw().is_power_of_two(),
"Only one SampleCount bit must be set"
);
assert_eq!(samples.as_raw() as usize / 32, sample_mask.len());
assert_eq!((samples.as_raw() as usize + 31) / 32, sample_mask.len());
(self.fp.cmd_set_sample_mask_ext)(command_buffer, samples, sample_mask.as_ptr())
}

Expand Down

0 comments on commit aee0c61

Please sign in to comment.