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 {
11751175 None => ( 0 , 0 , 0 , 0 ) ,
11761176 } ;
11771177
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.
11791180 let is_nvidia = self . properties . vendor_id == crate :: auxil:: db:: nvidia:: VENDOR ;
11801181 let max_buffer_size =
11811182 if ( cfg ! ( target_os = "linux" ) || cfg ! ( target_os = "android" ) ) && !is_nvidia {
11821183 i32:: MAX as u64
11831184 } else {
1184- u64 :: MAX
1185+ 1u64 << 52
11851186 } ;
11861187
11871188 let mut max_binding_array_elements = 0 ;
Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ impl super::DeviceShared {
236236 & self ,
237237 buffer : & ' a super :: Buffer ,
238238 ranges : I ,
239- ) -> Option < impl ' a + Iterator < Item = vk:: MappedMemoryRange > > {
239+ ) -> Option < impl ' a + Iterator < Item = vk:: MappedMemoryRange < ' a > > > {
240240 let block = buffer. block . as_ref ( ) ?. lock ( ) ;
241241 let mask = self . private_caps . non_coherent_map_mask ;
242242 Some ( ranges. map ( move |range| {
You can’t perform that action at this time.
0 commit comments