diff --git a/src/platform/graphics/webgpu/webgpu-gpu-profiler.js b/src/platform/graphics/webgpu/webgpu-gpu-profiler.js index a4e01201e1f..50a84b908f2 100644 --- a/src/platform/graphics/webgpu/webgpu-gpu-profiler.js +++ b/src/platform/graphics/webgpu/webgpu-gpu-profiler.js @@ -21,47 +21,18 @@ class WebgpuGpuProfiler extends GpuProfiler { this.timestampQueriesSet = null; } - frameMarker(isStart) { - - if (this.timestampQueriesSet) { - - const suffix = isStart ? 'Start' : 'End'; - const commandEncoder = this.device.wgpu.createCommandEncoder(); - DebugHelper.setLabel(commandEncoder, `GPUTimestampEncoder-${suffix}`); - - this.frameGPUMarkerSlot = isStart ? this.getSlot('GpuFrame') : this.frameGPUMarkerSlot; - commandEncoder.writeTimestamp(this.timestampQueriesSet.querySet, this.frameGPUMarkerSlot * 2 + (isStart ? 0 : 1)); - - const cb = commandEncoder.finish(); - DebugHelper.setLabel(cb, `GPUTimestampEncoder-${suffix}-CommandBuffer`); - - this.device.addCommandBuffer(cb, isStart); - } - } - frameStart() { - this.processEnableRequest(); - - if (this._enabled) { - // initial timing marker - this.frameMarker(true); - } } frameEnd() { - if (this._enabled) { - // final timing marker - this.frameMarker(false); - // schedule command buffer where timestamps are copied to CPU this.timestampQueriesSet?.resolve(this.slotCount * 2); } } request() { - if (this._enabled) { // request results const renderVersion = this.device.renderVersion; diff --git a/src/platform/graphics/webgpu/webgpu-graphics-device.js b/src/platform/graphics/webgpu/webgpu-graphics-device.js index 9a9365f808e..a3d1ce99a0b 100644 --- a/src/platform/graphics/webgpu/webgpu-graphics-device.js +++ b/src/platform/graphics/webgpu/webgpu-graphics-device.js @@ -222,10 +222,7 @@ class WebgpuGraphicsDevice extends GraphicsDevice { this.extCompressedTextureS3TC = requireFeature('texture-compression-bc'); this.extCompressedTextureETC = requireFeature('texture-compression-etc2'); this.extCompressedTextureASTC = requireFeature('texture-compression-astc'); - - // Do not request timestamp feature as it has changed and current form is not supported. - // See engine issue #5989 - // this.supportsTimestampQuery = requireFeature('timestamp-query'); + this.supportsTimestampQuery = requireFeature('timestamp-query'); this.textureRG11B10Renderable = requireFeature('rg11b10ufloat-renderable'); Debug.log(`WEBGPU features: ${requiredFeatures.join(', ')}`);