File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1175,13 +1175,14 @@ impl PhysicalDeviceProperties {
1175
1175
None => ( 0 , 0 , 0 , 0 ) ,
1176
1176
} ;
1177
1177
1178
- // Prevent very large buffers on mesa and most android devices.
1178
+ // Prevent very large buffers on mesa and most android devices, and in all cases
1179
+ // don't risk confusing JS by exceeding the range of a double.
1179
1180
let is_nvidia = self . properties . vendor_id == crate :: auxil:: db:: nvidia:: VENDOR ;
1180
1181
let max_buffer_size =
1181
1182
if ( cfg ! ( target_os = "linux" ) || cfg ! ( target_os = "android" ) ) && !is_nvidia {
1182
1183
i32:: MAX as u64
1183
1184
} else {
1184
- u64 :: MAX
1185
+ 1u64 << 52
1185
1186
} ;
1186
1187
1187
1188
let mut max_binding_array_elements = 0 ;
Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ impl super::DeviceShared {
236
236
& self ,
237
237
buffer : & ' a super :: Buffer ,
238
238
ranges : I ,
239
- ) -> Option < impl ' a + Iterator < Item = vk:: MappedMemoryRange > > {
239
+ ) -> Option < impl ' a + Iterator < Item = vk:: MappedMemoryRange < ' a > > > {
240
240
let block = buffer. block . as_ref ( ) ?. lock ( ) ;
241
241
let mask = self . private_caps . non_coherent_map_mask ;
242
242
Some ( ranges. map ( move |range| {
You can’t perform that action at this time.
0 commit comments