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,
66 bool EncodeCommands()
const override;
69 void AddBufferMemoryBarrier()
override;
72 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.
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.