File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -551,7 +551,8 @@ <h2><center>Web graphics workload simulator</center></h2>
551
551
// We want to actually use this data in rendering so the graphics driver
552
552
// can't optimize away the upload. Fill the first few bytes with our real
553
553
// vertex data.
554
- bufferDataArray . set ( vertices , 0 ) ;
554
+ if ( bufferDataArray . length > 0 )
555
+ bufferDataArray . set ( vertices , 0 ) ;
555
556
}
556
557
}
557
558
@@ -563,7 +564,8 @@ <h2><center>Web graphics workload simulator</center></h2>
563
564
564
565
if ( mapAsyncArray . length * 4 != mapAsync . value * 1024 * 1024 ) {
565
566
mapAsyncArray = new Float32Array ( mapAsync . value * 1024 * 1024 / 4 ) ;
566
- mapAsyncArray . set ( vertices , 0 ) ;
567
+ if ( mapAsyncArray . length > 0 )
568
+ mapAsyncArray . set ( vertices , 0 ) ;
567
569
}
568
570
569
571
// Calculate how many instances and draw calls we need based on slider values.
You can’t perform that action at this time.
0 commit comments