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>
24 id<MTLCommandBuffer> buffer_ = nil;
25 id<MTLComputeCommandEncoder> encoder_ = nil;
28 bool is_valid_ =
false;
29 bool has_label_ =
false;
32 id<MTLCommandBuffer> buffer);
35 bool IsValid()
const override;
38 fml::Status Compute(
const ISize& grid_size)
override;
41 void SetCommandLabel(std::string_view label)
override;
44 void OnSetLabel(
const std::string& label)
override;
62 std::shared_ptr<const Texture> texture,
63 const std::unique_ptr<const Sampler>& sampler)
override;
66 bool EncodeCommands()
const override;
69 void AddBufferMemoryBarrier()
override;
72 void AddTextureMemoryBarrier()
override;
81 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_COMPUTE_PASS_MTL_H_