Skip to content

Commit d291f9b

Browse files
authored
WebGPUBackend: Simplify code. (#33388)
1 parent d38c117 commit d291f9b

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

src/renderers/webgpu/WebGPUBackend.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1613,20 +1613,17 @@ class WebGPUBackend extends Backend {
16131613

16141614
for ( let i = 0; i < drawCount; i ++ ) {
16151615

1616-
const count = 1;
1617-
const firstInstance = count > 1 ? 0 : i;
1618-
16191616
if ( hasIndex === true ) {
16201617

1621-
passEncoderGPU.drawIndexed( counts[ i ], count, starts[ i ] / bytesPerElement, 0, firstInstance );
1618+
passEncoderGPU.drawIndexed( counts[ i ], 1, starts[ i ] / bytesPerElement, 0, i );
16221619

16231620
} else {
16241621

1625-
passEncoderGPU.draw( counts[ i ], count, starts[ i ], firstInstance );
1622+
passEncoderGPU.draw( counts[ i ], 1, starts[ i ], i );
16261623

16271624
}
16281625

1629-
info.update( object, counts[ i ], count );
1626+
info.update( object, counts[ i ], 1 );
16301627

16311628
}
16321629

0 commit comments

Comments
 (0)