瀏覽代碼

Add draw calls count in webgpu

Popov72 4 年之前
父節點
當前提交
b98f4cc0a1
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/Engines/webgpuEngine.ts

+ 2 - 0
src/Engines/webgpuEngine.ts

@@ -4004,6 +4004,7 @@ export class WebGPUEngine extends Engine {
         this._setRenderPipeline(fillMode);
         this._setRenderPipeline(fillMode);
 
 
         renderPass.drawIndexed(indexCount, instancesCount || 1, indexStart, 0, 0);
         renderPass.drawIndexed(indexCount, instancesCount || 1, indexStart, 0, 0);
+        this._reportDrawCall();
     }
     }
 
 
     /**
     /**
@@ -4021,6 +4022,7 @@ export class WebGPUEngine extends Engine {
         this._setRenderPipeline(fillMode);
         this._setRenderPipeline(fillMode);
 
 
         renderPass.draw(verticesCount, instancesCount || 1, verticesStart, 0);
         renderPass.draw(verticesCount, instancesCount || 1, verticesStart, 0);
+        this._reportDrawCall();
     }
     }
 
 
     //------------------------------------------------------------------------------
     //------------------------------------------------------------------------------