5#ifndef FLUTTER_LIB_GPU_RENDER_PASS_H_
6#define FLUTTER_LIB_GPU_RENDER_PASS_H_
29 DEFINE_WRAPPERTYPEINFO();
37 const std::shared_ptr<const impeller::Context>&
GetContext()
const;
43 size_t color_attachment_index);
104 std::shared_ptr<impeller::Pipeline<impeller::PipelineDescriptor>>
105 GetOrCreatePipeline();
108 std::shared_ptr<impeller::RenderPass> render_pass_;
116 std::map<size_t, impeller::ColorAttachmentDescriptor> color_descriptors_;
140 int color_attachment_index,
148 Dart_Handle resolve_texture_wrapper);
153 int depth_load_action,
154 int depth_store_action,
155 float depth_clear_value,
156 int stencil_load_action,
157 int stencil_store_action,
158 int stencil_clear_value,
193 Dart_Handle uniform_name_handle,
196 int length_in_bytes);
202 Dart_Handle uniform_name_handle,
207 int width_address_mode,
208 int height_address_mode);
217 int color_attachment_index,
223 int color_attachment_index,
224 int color_blend_operation,
225 int source_color_blend_factor,
226 int destination_color_blend_factor,
227 int alpha_blend_operation,
228 int source_alpha_blend_factor,
229 int destination_alpha_blend_factor);
239 int compare_operation);
244 int stencil_reference);
249 int stencil_compare_operation,
250 int stencil_fail_operation,
251 int depth_fail_operation,
252 int depth_stencil_pass_operation,
uint32_t stencil_reference
std::optional< impeller::Viewport > viewport
impeller::StencilAttachmentDescriptor & GetStencilBackAttachmentDescriptor()
void SetPipeline(fml::RefPtr< RenderPipeline > pipeline)
impeller::RenderTarget & GetRenderTarget()
bool Begin(flutter::gpu::CommandBuffer &command_buffer)
std::unordered_map< const flutter::gpu::Shader::UniformBinding *, BufferAndUniformSlot > BufferUniformMap
static constexpr size_t kMaxVertexBufferSlots
impeller::DepthAttachmentDescriptor & GetDepthAttachmentDescriptor()
std::unordered_map< const flutter::gpu::Shader::TextureBinding *, impeller::TextureAndSampler > TextureUniformMap
size_t vertex_buffer_count
std::optional< impeller::IRect32 > scissor
TextureUniformMap fragment_texture_bindings
BufferUniformMap fragment_uniform_bindings
TextureUniformMap vertex_texture_bindings
BufferUniformMap vertex_uniform_bindings
impeller::IndexType index_buffer_type
std::array< impeller::BufferView, kMaxVertexBufferSlots > vertex_buffers
impeller::StencilAttachmentDescriptor & GetStencilFrontAttachmentDescriptor()
impeller::ColorAttachmentDescriptor & GetColorAttachmentDescriptor(size_t color_attachment_index)
impeller::PipelineDescriptor & GetPipelineDescriptor()
const std::shared_ptr< const impeller::Context > & GetContext() const
impeller::BufferView index_buffer
An immutable collection of shaders loaded from a shader bundle asset.
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
#define FLUTTER_GPU_EXPORT
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetColorBlendEquation(flutter::gpu::RenderPass *wrapper, int color_attachment_index, int color_blend_operation, int source_color_blend_factor, int destination_color_blend_factor, int alpha_blend_operation, int source_alpha_blend_factor, int destination_alpha_blend_factor)
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetDepthCompareOperation(flutter::gpu::RenderPass *wrapper, int compare_operation)
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_BindVertexBufferDevice(flutter::gpu::RenderPass *wrapper, flutter::gpu::DeviceBuffer *device_buffer, int offset_in_bytes, int length_in_bytes, int vertex_count, int slot)
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_BindPipeline(flutter::gpu::RenderPass *wrapper, flutter::gpu::RenderPipeline *pipeline)
FLUTTER_GPU_EXPORT bool InternalFlutterGpu_RenderPass_BindTexture(flutter::gpu::RenderPass *wrapper, flutter::gpu::Shader *shader, Dart_Handle uniform_name_handle, flutter::gpu::Texture *texture, int min_filter, int mag_filter, int mip_filter, int width_address_mode, int height_address_mode)
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetStencilConfig(flutter::gpu::RenderPass *wrapper, int stencil_compare_operation, int stencil_fail_operation, int depth_fail_operation, int depth_stencil_pass_operation, int read_mask, int write_mask, int target)
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetPolygonMode(flutter::gpu::RenderPass *wrapper, int polygon_mode)
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_BindIndexBufferDevice(flutter::gpu::RenderPass *wrapper, flutter::gpu::DeviceBuffer *device_buffer, int offset_in_bytes, int length_in_bytes, int index_type, int index_count)
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetScissor(flutter::gpu::RenderPass *wrapper, int x, int y, int width, int height)
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_Initialize(Dart_Handle wrapper)
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetViewport(flutter::gpu::RenderPass *wrapper, int x, int y, int width, int height, float z_near, float z_far)
FLUTTER_GPU_EXPORT bool InternalFlutterGpu_RenderPass_Draw(flutter::gpu::RenderPass *wrapper)
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetWindingOrder(flutter::gpu::RenderPass *wrapper, int winding_order)
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetDepthWriteEnable(flutter::gpu::RenderPass *wrapper, bool enable)
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_ClearBindings(flutter::gpu::RenderPass *wrapper)
FLUTTER_GPU_EXPORT Dart_Handle InternalFlutterGpu_RenderPass_Begin(flutter::gpu::RenderPass *wrapper, flutter::gpu::CommandBuffer *command_buffer)
FLUTTER_GPU_EXPORT Dart_Handle InternalFlutterGpu_RenderPass_SetColorAttachment(flutter::gpu::RenderPass *wrapper, flutter::gpu::Context *context, int color_attachment_index, int load_action, int store_action, float clear_color_r, float clear_color_g, float clear_color_b, float clear_color_a, flutter::gpu::Texture *texture, Dart_Handle resolve_texture_wrapper)
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetCullMode(flutter::gpu::RenderPass *wrapper, int cull_mode)
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetStencilReference(flutter::gpu::RenderPass *wrapper, int stencil_reference)
FLUTTER_GPU_EXPORT bool InternalFlutterGpu_RenderPass_BindUniformDevice(flutter::gpu::RenderPass *wrapper, flutter::gpu::Shader *shader, Dart_Handle uniform_name_handle, flutter::gpu::DeviceBuffer *device_buffer, int offset_in_bytes, int length_in_bytes)
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetColorBlendEnable(flutter::gpu::RenderPass *wrapper, int color_attachment_index, bool enable)
FLUTTER_GPU_EXPORT Dart_Handle InternalFlutterGpu_RenderPass_SetDepthStencilAttachment(flutter::gpu::RenderPass *wrapper, int depth_load_action, int depth_store_action, float depth_clear_value, int stencil_load_action, int stencil_store_action, int stencil_clear_value, flutter::gpu::Texture *texture)
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetPrimitiveType(flutter::gpu::RenderPass *wrapper, int primitive_type)
@ kNone
Does not use the index buffer.
#define FML_FRIEND_MAKE_REF_COUNTED(T)
Describe the color attachment that will be used with this pipeline.
combines the texture, sampler and sampler slot information.