diff --git a/examples/src/examples/graphics/clustered-omni-shadows/config.mjs b/examples/src/examples/graphics/clustered-omni-shadows/config.mjs new file mode 100644 index 00000000000..b7fc3987320 --- /dev/null +++ b/examples/src/examples/graphics/clustered-omni-shadows/config.mjs @@ -0,0 +1,6 @@ +/** + * @type {import('../../../../types.mjs').ExampleConfig} + */ +export default { + WEBGPU_ENABLED: true +}; diff --git a/examples/src/examples/graphics/clustered-spot-shadows/config.mjs b/examples/src/examples/graphics/clustered-spot-shadows/config.mjs index 8603d03bb41..b7fc3987320 100644 --- a/examples/src/examples/graphics/clustered-spot-shadows/config.mjs +++ b/examples/src/examples/graphics/clustered-spot-shadows/config.mjs @@ -2,6 +2,5 @@ * @type {import('../../../../types.mjs').ExampleConfig} */ export default { - ENGINE: "DEBUG", WEBGPU_ENABLED: true }; diff --git a/src/platform/graphics/webgpu/webgpu-render-pipeline.js b/src/platform/graphics/webgpu/webgpu-render-pipeline.js index 14133699571..8ff449f8a8f 100644 --- a/src/platform/graphics/webgpu/webgpu-render-pipeline.js +++ b/src/platform/graphics/webgpu/webgpu-render-pipeline.js @@ -6,6 +6,7 @@ import { TRACEID_RENDERPIPELINE_ALLOC } from "../../../core/constants.js"; import { WebgpuVertexBufferLayout } from "./webgpu-vertex-buffer-layout.js"; import { WebgpuDebug } from "./webgpu-debug.js"; import { WebgpuPipeline } from "./webgpu-pipeline.js"; +import { DebugGraphics } from "../debug-graphics.js"; let _pipelineId = 0; @@ -290,15 +291,15 @@ class WebgpuRenderPipeline extends WebgpuPipeline { layout: pipelineLayout }; + descr.fragment = { + module: webgpuShader.getFragmentShaderModule(), + entryPoint: webgpuShader.fragmentEntryPoint, + targets: [] + }; + const colorAttachments = renderTarget.impl.colorAttachments; if (colorAttachments.length > 0) { - descr.fragment = { - module: webgpuShader.getFragmentShaderModule(), - entryPoint: webgpuShader.fragmentEntryPoint, - targets: [] - }; - // the same write mask is used by all color buffers, to match the WebGL behavior let writeMask = 0; if (blendState.redWrite) writeMask |= GPUColorWrite.RED; @@ -326,7 +327,7 @@ class WebgpuRenderPipeline extends WebgpuPipeline { const pipeline = wgpu.createRenderPipeline(descr); DebugHelper.setLabel(pipeline, `RenderPipeline-${_pipelineId}`); - Debug.trace(TRACEID_RENDERPIPELINE_ALLOC, `Alloc: Id ${_pipelineId}`, descr); + Debug.trace(TRACEID_RENDERPIPELINE_ALLOC, `Alloc: Id ${_pipelineId}, stack: ${DebugGraphics.toString()}`, descr); WebgpuDebug.end(this.device, { renderPipeline: this,