mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-22 06:45:23 +00:00
Add missing division for bits-to-bytes conversions (#2313)
This commit is contained in:
parent
4ee8aa5f1a
commit
e1acf31a2e
@ -1056,7 +1056,7 @@ impl AccelerationStructureGeometryTrianglesData {
|
|||||||
.filter(|&c| c != 0)
|
.filter(|&c| c != 0)
|
||||||
.min()
|
.min()
|
||||||
.unwrap() as u32;
|
.unwrap() as u32;
|
||||||
let smallest_component_bytes = (smallest_component_bits + 7) & !7;
|
let smallest_component_bytes = ((smallest_component_bits + 7) & !7) / 8;
|
||||||
|
|
||||||
if vertex_stride % smallest_component_bytes != 0 {
|
if vertex_stride % smallest_component_bytes != 0 {
|
||||||
return Err(Box::new(ValidationError {
|
return Err(Box::new(ValidationError {
|
||||||
|
@ -1050,7 +1050,7 @@ where
|
|||||||
.filter(|&c| c != 0)
|
.filter(|&c| c != 0)
|
||||||
.min()
|
.min()
|
||||||
.unwrap() as u32;
|
.unwrap() as u32;
|
||||||
let smallest_component_bytes = (smallest_component_bits + 7) & !7;
|
let smallest_component_bytes = ((smallest_component_bits + 7) & !7) / 8;
|
||||||
|
|
||||||
if vertex_data.device_address().unwrap().get() % smallest_component_bytes as u64
|
if vertex_data.device_address().unwrap().get() % smallest_component_bytes as u64
|
||||||
!= 0
|
!= 0
|
||||||
@ -1837,7 +1837,7 @@ where
|
|||||||
.filter(|&c| c != 0)
|
.filter(|&c| c != 0)
|
||||||
.min()
|
.min()
|
||||||
.unwrap() as u32;
|
.unwrap() as u32;
|
||||||
let smallest_component_bytes = (smallest_component_bits + 7) & !7;
|
let smallest_component_bytes = ((smallest_component_bits + 7) & !7) / 8;
|
||||||
|
|
||||||
if vertex_data.device_address().unwrap().get() % smallest_component_bytes as u64
|
if vertex_data.device_address().unwrap().get() % smallest_component_bytes as u64
|
||||||
!= 0
|
!= 0
|
||||||
|
Loading…
Reference in New Issue
Block a user