5#ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_RENDER_PASS_MTL_H_
6#define FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_RENDER_PASS_MTL_H_
8#include <Metal/Metal.h>
10#include "flutter/fml/macros.h"
25 id<MTLCommandBuffer> buffer_ = nil;
26 id<MTLRenderCommandEncoder> encoder_ = nil;
27 MTLRenderPassDescriptor* desc_ = nil;
29 bool is_metal_trace_active_ =
false;
30 bool is_valid_ =
false;
34 mutable bool did_finish_encoding_ =
false;
39 size_t instance_count_ = 1u;
40 size_t base_vertex_ = 0u;
41 size_t vertex_count_ = 0u;
42 bool has_valid_pipeline_ =
false;
43 bool has_label_ =
false;
46 MTLIndexType index_type_ = {};
48 RenderPassMTL(std::shared_ptr<const Context> context,
49 const RenderTarget&
target,
50 id<MTLCommandBuffer>
buffer);
103 const std::shared_ptr<const ShaderMetadata>& metadata,
111 std::shared_ptr<const Texture>
texture,
112 const std::unique_ptr<const Sampler>& sampler)
override;
To do anything rendering related with Impeller, you need a context.
Describes the fixed function and programmable aspects of rendering and compute operations performed b...
void SetPipeline(const std::shared_ptr< Pipeline< PipelineDescriptor > > &pipeline) override
The pipeline to use for this command.
void SetCommandLabel(std::string_view label) override
The debugging label to use for the command.
void OnSetLabel(std::string label) override
void ReserveCommands(size_t command_count) override
Reserve [command_count] commands in the HAL command buffer.
void SetViewport(Viewport viewport) override
void SetScissor(IRect scissor) override
bool BindResource(ShaderStage stage, DescriptorType type, const ShaderUniformSlot &slot, const ShaderMetadata &metadata, BufferView view) override
bool OnEncodeCommands(const Context &context) const override
bool SetVertexBuffer(VertexBuffer buffer) override
Specify the vertex and index buffer to use for this command.
~RenderPassMTL() override
void SetBaseVertex(uint64_t value) override
void SetStencilReference(uint32_t value) override
fml::Status Draw() override
Record the currently pending command.
void SetInstanceCount(size_t count) override
bool IsValid() const override
Render passes encode render commands directed as one specific render target into an underlying comman...
static const uint8_t buffer[]
PrimitiveType
Decides how backend draws pixels based on input vertices.
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.