@@ -29,13 +29,13 @@ var LibraryGL = {
29
29
$miniTempWebGLFloatBuffers : [ ] ,
30
30
$miniTempWebGLFloatBuffers__postset : `var miniTempWebGLFloatBuffersStorage = new Float32Array({{{ GL_POOL_TEMP_BUFFERS_SIZE }}});
31
31
for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}}; ++i) {
32
- miniTempWebGLFloatBuffers[i] = miniTempWebGLFloatBuffersStorage.subarray(0, i+1 );
32
+ miniTempWebGLFloatBuffers[i] = miniTempWebGLFloatBuffersStorage.subarray(0, i);
33
33
}` ,
34
34
35
35
$miniTempWebGLIntBuffers : [ ] ,
36
36
$miniTempWebGLIntBuffers__postset : `var miniTempWebGLIntBuffersStorage = new Int32Array({{{ GL_POOL_TEMP_BUFFERS_SIZE }}});
37
37
for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}}; ++i) {
38
- miniTempWebGLIntBuffers[i] = miniTempWebGLIntBuffersStorage.subarray(0, i+1 );
38
+ miniTempWebGLIntBuffers[i] = miniTempWebGLIntBuffersStorage.subarray(0, i);
39
39
}` ,
40
40
41
41
$heapObjectForWebGLType : ( type ) => {
@@ -2439,7 +2439,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
2439
2439
#if GL_POOL_TEMP_BUFFERS
2440
2440
if ( count <= { { { GL_POOL_TEMP_BUFFERS_SIZE } } } ) {
2441
2441
// avoid allocation when uploading few enough uniforms
2442
- var view = miniTempWebGLIntBuffers [ count - 1 ] ;
2442
+ var view = miniTempWebGLIntBuffers [ count ] ;
2443
2443
for ( var i = 0 ; i < count ; ++ i ) {
2444
2444
view [ i ] = { { { makeGetValue ( 'value' , '4*i' , 'i32' ) } } } ;
2445
2445
}
@@ -2480,7 +2480,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
2480
2480
#if GL_POOL_TEMP_BUFFERS
2481
2481
if ( count <= { { { GL_POOL_TEMP_BUFFERS_SIZE / 2 } } } ) {
2482
2482
// avoid allocation when uploading few enough uniforms
2483
- var view = miniTempWebGLIntBuffers [ 2 * count - 1 ] ;
2483
+ var view = miniTempWebGLIntBuffers [ 2 * count ] ;
2484
2484
for ( var i = 0 ; i < 2 * count ; i += 2 ) {
2485
2485
view [ i ] = { { { makeGetValue ( 'value' , '4*i' , 'i32' ) } } } ;
2486
2486
view [ i + 1 ] = { { { makeGetValue ( 'value' , '4*i+4' , 'i32' ) } } } ;
@@ -2522,7 +2522,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
2522
2522
#if GL_POOL_TEMP_BUFFERS
2523
2523
if ( count <= { { { GL_POOL_TEMP_BUFFERS_SIZE / 3 } } } ) {
2524
2524
// avoid allocation when uploading few enough uniforms
2525
- var view = miniTempWebGLIntBuffers [ 3 * count - 1 ] ;
2525
+ var view = miniTempWebGLIntBuffers [ 3 * count ] ;
2526
2526
for ( var i = 0 ; i < 3 * count ; i += 3 ) {
2527
2527
view [ i ] = { { { makeGetValue ( 'value' , '4*i' , 'i32' ) } } } ;
2528
2528
view [ i + 1 ] = { { { makeGetValue ( 'value' , '4*i+4' , 'i32' ) } } } ;
@@ -2565,7 +2565,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
2565
2565
#if GL_POOL_TEMP_BUFFERS
2566
2566
if ( count <= { { { GL_POOL_TEMP_BUFFERS_SIZE / 4 } } } ) {
2567
2567
// avoid allocation when uploading few enough uniforms
2568
- var view = miniTempWebGLIntBuffers [ 4 * count - 1 ] ;
2568
+ var view = miniTempWebGLIntBuffers [ 4 * count ] ;
2569
2569
for ( var i = 0 ; i < 4 * count ; i += 4 ) {
2570
2570
view [ i ] = { { { makeGetValue ( 'value' , '4*i' , 'i32' ) } } } ;
2571
2571
view [ i + 1 ] = { { { makeGetValue ( 'value' , '4*i+4' , 'i32' ) } } } ;
@@ -2609,7 +2609,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
2609
2609
#if GL_POOL_TEMP_BUFFERS
2610
2610
if ( count <= { { { GL_POOL_TEMP_BUFFERS_SIZE } } } ) {
2611
2611
// avoid allocation when uploading few enough uniforms
2612
- var view = miniTempWebGLFloatBuffers [ count - 1 ] ;
2612
+ var view = miniTempWebGLFloatBuffers [ count ] ;
2613
2613
for ( var i = 0 ; i < count ; ++ i ) {
2614
2614
view [ i ] = { { { makeGetValue ( 'value' , '4*i' , 'float' ) } } } ;
2615
2615
}
@@ -2650,7 +2650,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
2650
2650
#if GL_POOL_TEMP_BUFFERS
2651
2651
if ( count <= { { { GL_POOL_TEMP_BUFFERS_SIZE / 2 } } } ) {
2652
2652
// avoid allocation when uploading few enough uniforms
2653
- var view = miniTempWebGLFloatBuffers [ 2 * count - 1 ] ;
2653
+ var view = miniTempWebGLFloatBuffers [ 2 * count ] ;
2654
2654
for ( var i = 0 ; i < 2 * count ; i += 2 ) {
2655
2655
view [ i ] = { { { makeGetValue ( 'value' , '4*i' , 'float' ) } } } ;
2656
2656
view [ i + 1 ] = { { { makeGetValue ( 'value' , '4*i+4' , 'float' ) } } } ;
@@ -2692,7 +2692,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
2692
2692
#if GL_POOL_TEMP_BUFFERS
2693
2693
if ( count <= { { { GL_POOL_TEMP_BUFFERS_SIZE / 3 } } } ) {
2694
2694
// avoid allocation when uploading few enough uniforms
2695
- var view = miniTempWebGLFloatBuffers [ 3 * count - 1 ] ;
2695
+ var view = miniTempWebGLFloatBuffers [ 3 * count ] ;
2696
2696
for ( var i = 0 ; i < 3 * count ; i += 3 ) {
2697
2697
view [ i ] = { { { makeGetValue ( 'value' , '4*i' , 'float' ) } } } ;
2698
2698
view [ i + 1 ] = { { { makeGetValue ( 'value' , '4*i+4' , 'float' ) } } } ;
@@ -2735,7 +2735,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
2735
2735
#if GL_POOL_TEMP_BUFFERS
2736
2736
if ( count <= { { { GL_POOL_TEMP_BUFFERS_SIZE / 4 } } } ) {
2737
2737
// avoid allocation when uploading few enough uniforms
2738
- var view = miniTempWebGLFloatBuffers [ 4 * count - 1 ] ;
2738
+ var view = miniTempWebGLFloatBuffers [ 4 * count ] ;
2739
2739
// hoist the heap out of the loop for size and for pthreads+growth.
2740
2740
var heap = HEAPF32 ;
2741
2741
value = { { { getHeapOffset ( 'value' , 'float' ) } } } ;
@@ -2783,7 +2783,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
2783
2783
#if GL_POOL_TEMP_BUFFERS
2784
2784
if ( count <= { { { GL_POOL_TEMP_BUFFERS_SIZE / 4 } } } ) {
2785
2785
// avoid allocation when uploading few enough uniforms
2786
- var view = miniTempWebGLFloatBuffers [ 4 * count - 1 ] ;
2786
+ var view = miniTempWebGLFloatBuffers [ 4 * count ] ;
2787
2787
for ( var i = 0 ; i < 4 * count ; i += 4 ) {
2788
2788
view [ i ] = { { { makeGetValue ( 'value' , '4*i' , 'float' ) } } } ;
2789
2789
view [ i + 1 ] = { { { makeGetValue ( 'value' , '4*i+4' , 'float' ) } } } ;
@@ -2827,7 +2827,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
2827
2827
#if GL_POOL_TEMP_BUFFERS
2828
2828
if ( count <= { { { GL_POOL_TEMP_BUFFERS_SIZE / 9 } } } ) {
2829
2829
// avoid allocation when uploading few enough uniforms
2830
- var view = miniTempWebGLFloatBuffers [ 9 * count - 1 ] ;
2830
+ var view = miniTempWebGLFloatBuffers [ 9 * count ] ;
2831
2831
for ( var i = 0 ; i < 9 * count ; i += 9 ) {
2832
2832
view [ i ] = { { { makeGetValue ( 'value' , '4*i' , 'float' ) } } } ;
2833
2833
view [ i + 1 ] = { { { makeGetValue ( 'value' , '4*i+4' , 'float' ) } } } ;
@@ -2876,7 +2876,7 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
2876
2876
#if GL_POOL_TEMP_BUFFERS
2877
2877
if ( count <= { { { GL_POOL_TEMP_BUFFERS_SIZE / 1 6 } } } ) {
2878
2878
// avoid allocation when uploading few enough uniforms
2879
- var view = miniTempWebGLFloatBuffers [ 16 * count - 1 ] ;
2879
+ var view = miniTempWebGLFloatBuffers [ 16 * count ] ;
2880
2880
// hoist the heap out of the loop for size and for pthreads+growth.
2881
2881
var heap = HEAPF32 ;
2882
2882
value = { { { getHeapOffset ( 'value' , 'float' ) } } } ;
0 commit comments