5 #ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_COMPUTE_PASS_MTL_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_COMPUTE_PASS_MTL_H_
8 #include <Metal/Metal.h>
27 id<MTLCommandBuffer> buffer_ = nil;
28 id<MTLComputeCommandEncoder> encoder_ = nil;
33 std::array<uint32_t, 3> workgroup_size_ = {0u, 0u, 0u};
34 bool is_valid_ =
false;
35 bool has_label_ =
false;
38 id<MTLCommandBuffer> buffer);
41 bool IsValid()
const override;
44 fml::Status Compute(std::array<uint32_t, 3> workgroup_count)
override;
47 void SetCommandLabel(std::string_view label)
override;
50 void OnSetLabel(
const std::string& label)
override;
68 std::shared_ptr<const Texture> texture,
72 bool EncodeCommands()
const override;
75 void AddBufferMemoryBarrier()
override;
78 void AddTextureMemoryBarrier()
override;
Compute passes encode compute shader into the underlying command buffer.
~ComputePassMTL() override
A wrapper around a raw ptr that adds additional unopt mode only checks.
std::shared_ptr< ContextGLES > context
std::shared_ptr< PipelineGLES > pipeline
Ensures that bindings on the pass are not redundantly set or updated. Avoids making the driver do add...
Metadata required to bind a combined texture and sampler.