{"record":{"id":"2c7479460a41e366","repo":"stride3d/stride","slug":"notimplementedexception","errorCode":null,"errorMessage":"NotImplementedException","messagePattern":"NotImplementedException","errorType":"exception","errorClass":"NotImplementedException","httpStatus":null,"severity":"error","filePath":"sources/engine/Stride.Graphics/Direct3D12/CommandList.Direct3D12.cs","lineNumber":945,"sourceCode":"        {\n            PrepareDraw(isDispatch: true); // TODO: PrepareDraw for Compute dispatch?\n\n            currentCommandList.NativeCommandList.Dispatch((uint) threadCountX, (uint) threadCountY, (uint) threadCountZ);\n        }\n\n        /// <summary>\n        ///   Dispatches a Compute Shader workload using an Indirect Buffer, allowing the thread group count to be determined at runtime.\n        /// </summary>\n        /// <param name=\"indirectBuffer\">\n        ///   A Buffer containing the dispatch parameters, structured as <c>(threadCountX, threadCountY, threadCountZ)</c>.\n        /// </param>\n        /// <param name=\"offsetInBytes\">\n        ///   The byte offset within the <paramref name=\"indirectBuffer\"/> where the dispatch parameters are located.\n        /// </param>\n        /// <exception cref=\"ArgumentNullException\"><paramref name=\"indirectBuffer\"/> is <see langword=\"null\"/>.</exception>\n        public void Dispatch(Buffer indirectBuffer, int offsetInBytes)\n        {\n            throw new NotImplementedException(); // TODO: Implement DispatchIndirect\n        }\n\n        /// <summary>\n        ///   Issues a non-indexed draw call, rendering a sequence of vertices directly from the bound Vertex Buffer.\n        /// </summary>\n        /// <param name=\"vertexCount\">The number of vertices to draw.</param>\n        /// <param name=\"startVertexLocation\">\n        ///   Index of the first vertex in the Vertex Buffer to begin rendering from;\n        ///   it could also be used as the first vertex id generated for a shader parameter marked with the <c>SV_TargetId</c> system-value semantic.\n        /// </param>\n        public void Draw(int vertexCount, int startVertexLocation = 0)\n        {\n            PrepareDraw();\n\n            currentCommandList.NativeCommandList.DrawInstanced((uint) vertexCount, InstanceCount: 1,\n                                                               (uint) startVertexLocation, StartInstanceLocation: 0);\n\n            GraphicsDevice.FrameTriangleCount += (uint)vertexCount;","sourceCodeStart":927,"sourceCodeEnd":963,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/engine/Stride.Graphics/Direct3D12/CommandList.Direct3D12.cs#L927-L963","documentation":"CommandList.Dispatch(Buffer indirectBuffer, int offsetInBytes) on D3D12 is an unimplemented stub that immediately throws NotImplementedException. GPU indirect dispatch is not yet implemented in this backend.","triggerScenarios":"Calling commandList.Dispatch(indirectBuffer, offset) to issue a DispatchIndirect on the Direct3D12 graphics backend.","commonSituations":"Running a compute-shader feature that uses GPU-generated dispatch arguments (e.g. particle simulation, culling) on the D3D12 backend when it works elsewhere.","solutions":["Use the non-indirect CommandList.Dispatch(int threadGroupsX, Y, Z) with CPU-computed group counts.","Switch the GraphicsDevice to the Direct3D11 or Vulkan backend, where indirect dispatch may be implemented.","Track/patch the Stride source and implement DispatchIndirect via CommandDispatcher.Dispatch with a GPU virtual address."],"exampleFix":"// before\ncommandList.Dispatch(indirectArgsBuffer, 0);\n// after\ncommandList.Dispatch(groupCountX, groupCountY, groupCountZ);","handlingStrategy":"try-catch","validationCode":"if (device.Backend == GraphicsBackend.Direct3D12)\n    throw new PlatformNotSupportedException(\"Indirect dispatch is not implemented on D3D12 backend\");","typeGuard":"static bool SupportsIndirectDispatch(GraphicsDevice d) => d.GraphicsProfile >= GraphicsProfile.Level_10_0 && d.Backend != GraphicsBackend.Direct3D12;","tryCatchPattern":"try { commandList.Dispatch(indirectBuffer, offset); }\ncatch (NotImplementedException) { commandList.Dispatch(cpuGroupCountX, cpuGroupCountY, cpuGroupCountZ); }","preventionTips":["Check backend capability before using any indirect API in Stride's D3D12 path.","Keep a CPU fallback path for compute dispatch group counts.","Abstract indirect-draw/dispatch behind your own interface so backends can route differently."],"tags":["graphics","direct3d12","commandlist","not-implemented","indirect-dispatch"],"backgroundTag":"method-not-implemented","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}