Flutter Engine
The Flutter Engine
ComputePipeline.h
Go to the documentation of this file.
1/*
2 * Copyright 2022 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef skgpu_graphite_ComputePipeline_DEFINED
9#define skgpu_graphite_ComputePipeline_DEFINED
10
12
13namespace skgpu::graphite {
14
15class SharedContext;
16
17/**
18 * ComputePipeline corresponds to a backend specific pipeline used for compute (vs rendering),
19 * e.g. MTLComputePipelineState (Metal),
20 * CreateComputePipeline (Dawn),
21 * CreateComputePipelineState (D3D12),
22 * or VkComputePipelineCreateInfo (Vulkan).
23 */
24class ComputePipeline : public Resource {
25public:
26 ~ComputePipeline() override = default;
27
28 // TODO(b/240615224): The pipeline should return an optional effective local workgroup
29 // size if the value was statically assigned in the shader (when it's not possible to assign
30 // them via specialization constants).
31
32 const char* getResourceType() const override { return "Compute Pipeline"; }
33
34protected:
35 explicit ComputePipeline(const SharedContext*);
36};
37
38} // namespace skgpu::graphite
39
40#endif // skgpu_graphite_ComputePipeline_DEFINED
const char * getResourceType() const override
ComputePipeline(const SharedContext *)
~ComputePipeline() override=default