1 |
- {"ast":null,"code":"import { ThinWebGPUEngine } from \"../../thinWebGPUEngine.js\";\nimport { WebGPURenderItemBeginOcclusionQuery, WebGPURenderItemEndOcclusionQuery } from \"../webgpuBundleList.js\";\nimport \"../../../Engines/AbstractEngine/abstractEngine.query.js\";\nThinWebGPUEngine.prototype.getGPUFrameTimeCounter = function () {\n return this._timestampQuery.gpuFrameTimeCounter;\n};\nThinWebGPUEngine.prototype.captureGPUFrameTime = function (value) {\n this._timestampQuery.enable = value && !!this._caps.timerQuery;\n};\nThinWebGPUEngine.prototype.createQuery = function () {\n return this._occlusionQuery.createQuery();\n};\nThinWebGPUEngine.prototype.deleteQuery = function (query) {\n this._occlusionQuery.deleteQuery(query);\n return this;\n};\nThinWebGPUEngine.prototype.isQueryResultAvailable = function (query) {\n return this._occlusionQuery.isQueryResultAvailable(query);\n};\nThinWebGPUEngine.prototype.getQueryResult = function (query) {\n return this._occlusionQuery.getQueryResult(query);\n};\nThinWebGPUEngine.prototype.beginOcclusionQuery = function (algorithmType, query) {\n if (this.compatibilityMode) {\n if (this._occlusionQuery.canBeginQuery(query)) {\n var _this$_currentRenderP;\n (_this$_currentRenderP = this._currentRenderPass) === null || _this$_currentRenderP === void 0 || _this$_currentRenderP.beginOcclusionQuery(query);\n return true;\n }\n } else {\n this._bundleList.addItem(new WebGPURenderItemBeginOcclusionQuery(query));\n return true;\n }\n return false;\n};\nThinWebGPUEngine.prototype.endOcclusionQuery = function () {\n if (this.compatibilityMode) {\n var _this$_currentRenderP2;\n (_this$_currentRenderP2 = this._currentRenderPass) === null || _this$_currentRenderP2 === void 0 || _this$_currentRenderP2.endOcclusionQuery();\n } else {\n this._bundleList.addItem(new WebGPURenderItemEndOcclusionQuery());\n }\n return this;\n};","map":{"version":3,"names":["ThinWebGPUEngine","WebGPURenderItemBeginOcclusionQuery","WebGPURenderItemEndOcclusionQuery","prototype","getGPUFrameTimeCounter","_timestampQuery","gpuFrameTimeCounter","captureGPUFrameTime","value","enable","_caps","timerQuery","createQuery","_occlusionQuery","deleteQuery","query","isQueryResultAvailable","getQueryResult","beginOcclusionQuery","algorithmType","compatibilityMode","canBeginQuery","_this$_currentRenderP","_currentRenderPass","_bundleList","addItem","endOcclusionQuery","_this$_currentRenderP2"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Engines/WebGPU/Extensions/engine.query.js"],"sourcesContent":["import { ThinWebGPUEngine } from \"../../thinWebGPUEngine.js\";\nimport { WebGPURenderItemBeginOcclusionQuery, WebGPURenderItemEndOcclusionQuery } from \"../webgpuBundleList.js\";\nimport \"../../../Engines/AbstractEngine/abstractEngine.query.js\";\nThinWebGPUEngine.prototype.getGPUFrameTimeCounter = function () {\n return this._timestampQuery.gpuFrameTimeCounter;\n};\nThinWebGPUEngine.prototype.captureGPUFrameTime = function (value) {\n this._timestampQuery.enable = value && !!this._caps.timerQuery;\n};\nThinWebGPUEngine.prototype.createQuery = function () {\n return this._occlusionQuery.createQuery();\n};\nThinWebGPUEngine.prototype.deleteQuery = function (query) {\n this._occlusionQuery.deleteQuery(query);\n return this;\n};\nThinWebGPUEngine.prototype.isQueryResultAvailable = function (query) {\n return this._occlusionQuery.isQueryResultAvailable(query);\n};\nThinWebGPUEngine.prototype.getQueryResult = function (query) {\n return this._occlusionQuery.getQueryResult(query);\n};\nThinWebGPUEngine.prototype.beginOcclusionQuery = function (algorithmType, query) {\n if (this.compatibilityMode) {\n if (this._occlusionQuery.canBeginQuery(query)) {\n this._currentRenderPass?.beginOcclusionQuery(query);\n return true;\n }\n }\n else {\n this._bundleList.addItem(new WebGPURenderItemBeginOcclusionQuery(query));\n return true;\n }\n return false;\n};\nThinWebGPUEngine.prototype.endOcclusionQuery = function () {\n if (this.compatibilityMode) {\n this._currentRenderPass?.endOcclusionQuery();\n }\n else {\n this._bundleList.addItem(new WebGPURenderItemEndOcclusionQuery());\n }\n return this;\n};\n"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,2BAA2B;AAC5D,SAASC,mC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