File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
js/web/lib/wasm/jsep/webgpu Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ export class ProgramManager {
4141 ) : void {
4242 TRACE_FUNC_BEGIN ( buildArtifact . programInfo . name ) ;
4343 const device = this . backend . device ;
44- const computePassEncoder = this . backend . getComputePassEncoder ( ) ;
4544 this . backend . writeTimestamp ( this . backend . pendingDispatchNumber * 2 ) ;
4645 const entries = [ ] ;
4746 for ( const input of inputs ) {
@@ -68,11 +67,12 @@ export class ProgramManager {
6867 } ;
6968 const sessionCommandList = this . backend . capturedCommandList . get ( this . backend . currentSessionId ! ) ;
7069 sessionCommandList ! . push ( commandInfo ) ;
70+ } else {
71+ const computePassEncoder = this . backend . getComputePassEncoder ( ) ;
72+ computePassEncoder . setPipeline ( buildArtifact . computePipeline ) ;
73+ computePassEncoder . setBindGroup ( 0 , bindGroup ) ;
74+ computePassEncoder . dispatchWorkgroups ( ...dispatchGroup ) ;
7175 }
72-
73- computePassEncoder . setPipeline ( buildArtifact . computePipeline ) ;
74- computePassEncoder . setBindGroup ( 0 , bindGroup ) ;
75- computePassEncoder . dispatchWorkgroups ( ...dispatchGroup ) ;
7676 this . backend . writeTimestamp ( this . backend . pendingDispatchNumber * 2 + 1 ) ;
7777 this . backend . pendingDispatchNumber ++ ;
7878
You can’t perform that action at this time.
0 commit comments