5#ifndef FLUTTER_LIB_GPU_RENDER_PASS_H_
6#define FLUTTER_LIB_GPU_RENDER_PASS_H_
28 DEFINE_WRAPPERTYPEINFO();
36 const std::shared_ptr<const impeller::Context>&
GetContext()
const;
42 size_t color_attachment_index);
93 std::shared_ptr<impeller::Pipeline<impeller::PipelineDescriptor>>
94 GetOrCreatePipeline();
97 std::shared_ptr<impeller::RenderPass> render_pass_;
105 std::map<size_t, impeller::ColorAttachmentDescriptor> color_descriptors_;
129 int color_attachment_index,
137 Dart_Handle resolve_texture_wrapper);
142 int depth_load_action,
143 int depth_store_action,
144 float depth_clear_value,
145 int stencil_load_action,
146 int stencil_store_action,
147 int stencil_clear_value,
181 Dart_Handle uniform_name_handle,
184 int length_in_bytes);
190 Dart_Handle uniform_name_handle,
195 int width_address_mode,
196 int height_address_mode);
205 int color_attachment_index,
211 int color_attachment_index,
212 int color_blend_operation,
213 int source_color_blend_factor,
214 int destination_color_blend_factor,
215 int alpha_blend_operation,
216 int source_alpha_blend_factor,
217 int destination_alpha_blend_factor);
227 int compare_operation);
232 int stencil_reference);
237 int stencil_compare_operation,
238 int stencil_fail_operation,
239 int depth_fail_operation,
240 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
impeller::BufferView vertex_buffer
impeller::DepthAttachmentDescriptor & GetDepthAttachmentDescriptor()
std::unordered_map< const flutter::gpu::Shader::TextureBinding *, impeller::TextureAndSampler > TextureUniformMap
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
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_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_BindVertexBufferDevice(flutter::gpu::RenderPass *wrapper, flutter::gpu::DeviceBuffer *device_buffer, int offset_in_bytes, int length_in_bytes, int vertex_count)
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.