5#ifndef FLUTTER_IMPELLER_RENDERER_CAPABILITIES_H_
6#define FLUTTER_IMPELLER_RENDERER_CAPABILITIES_H_
214 std::unique_ptr<Capabilities>
Build();
217 bool supports_offscreen_msaa_ =
false;
218 bool supports_ssbo_ =
false;
219 bool supports_texture_to_texture_blits_ =
false;
220 bool supports_framebuffer_fetch_ =
false;
221 bool supports_compute_ =
false;
222 bool supports_compute_subgroups_ =
false;
223 bool supports_read_from_resolve_ =
false;
224 bool supports_decal_sampler_address_mode_ =
false;
225 bool supports_device_transient_textures_ =
false;
226 bool supports_triangle_fan_ =
false;
227 bool supports_extended_range_formats_ =
false;
228 bool needs_partitioned_host_buffer_ =
false;
229 bool supports_texture_compression_bc_ =
false;
230 bool supports_texture_compression_etc2_ =
false;
231 bool supports_texture_compression_astc_ =
false;
232 bool supports_texture_compression_astc_hdr_ =
false;
233 std::optional<PixelFormat> default_color_format_ = std::nullopt;
234 std::optional<PixelFormat> default_stencil_format_ = std::nullopt;
235 std::optional<PixelFormat> default_depth_stencil_format_ = std::nullopt;
236 std::optional<PixelFormat> default_glyph_atlas_format_ = std::nullopt;
237 std::optional<ISize> default_maximum_render_pass_attachment_size_ =
239 size_t minimum_uniform_alignment_ = 256;
CapabilitiesBuilder & SetDefaultColorFormat(PixelFormat value)
CapabilitiesBuilder & SetSupportsComputeSubgroups(bool value)
CapabilitiesBuilder & SetMinimumUniformAlignment(size_t value)
CapabilitiesBuilder & SetSupportsTextureToTextureBlits(bool value)
CapabilitiesBuilder & SetDefaultStencilFormat(PixelFormat value)
CapabilitiesBuilder & SetSupportsDeviceTransientTextures(bool value)
CapabilitiesBuilder & SetSupportsTriangleFan(bool value)
CapabilitiesBuilder & SetNeedsPartitionedHostBuffer(bool value)
CapabilitiesBuilder & SetSupportsFramebufferFetch(bool value)
CapabilitiesBuilder & SetSupportsDecalSamplerAddressMode(bool value)
CapabilitiesBuilder & SetSupportsTextureCompression(CompressedTextureFamily family, bool value)
CapabilitiesBuilder & SetSupportsOffscreenMSAA(bool value)
CapabilitiesBuilder & SetSupportsSSBO(bool value)
CapabilitiesBuilder & SetMaximumRenderPassAttachmentSize(ISize size)
CapabilitiesBuilder & SetSupportsExtendedRangeFormats(bool value)
CapabilitiesBuilder & SetDefaultGlyphAtlasFormat(PixelFormat value)
CapabilitiesBuilder & SetSupportsCompute(bool value)
std::unique_ptr< Capabilities > Build()
CapabilitiesBuilder & SetDefaultDepthStencilFormat(PixelFormat value)
CapabilitiesBuilder & SetSupportsReadFromResolve(bool value)
virtual bool SupportsFramebufferRenderMipmap() const =0
Whether a non-zero mip level of a texture can be attached as a render target. Rendering into a cube m...
virtual PixelFormat GetDefaultStencilFormat() const =0
Returns a supported PixelFormat for textures that store stencil information. May include a depth chan...
virtual size_t GetMinimumUniformAlignment() const =0
The minimum alignment of uniform value offsets in bytes.
virtual bool SupportsOffscreenMSAA() const =0
Whether the context backend supports attaching offscreen MSAA color/stencil textures.
virtual bool SupportsImplicitResolvingMSAA() const =0
Whether the context backend supports multisampled rendering to the on-screen surface without requirin...
virtual bool SupportsFramebufferFetch() const =0
Whether the context backend is able to support pipelines with shaders that read from the framebuffer ...
virtual bool SupportsDecalSamplerAddressMode() const =0
Whether the context backend supports SamplerAddressMode::Decal.
virtual bool SupportsReadFromResolve() const =0
Whether the context backend supports binding the current RenderPass attachments. This is supported if...
virtual bool SupportsTriangleFan() const =0
Whether the primitive type TriangleFan is supported by the backend.
virtual bool SupportsComputeSubgroups() const =0
Whether the context backend supports configuring ComputePass command subgroups.
Capabilities & operator=(const Capabilities &)=delete
virtual bool NeedsPartitionedHostBuffer() const =0
Whether the host buffer should use separate device buffers for indexes from other data.
virtual bool Supports32BitPrimitiveIndices() const =0
Whether 32-bit values are supported in index buffers used to draw primitives.
Capabilities(const Capabilities &)=delete
virtual PixelFormat GetDefaultGlyphAtlasFormat() const =0
Returns the default pixel format for the alpha bitmap glyph atlas.
virtual bool SupportsPrimitiveRestart() const =0
Whether primitive restart is supported.
virtual PixelFormat GetDefaultColorFormat() const =0
Returns a supported PixelFormat for textures that store 4-channel colors (red/green/blue/alpha).
virtual ISize GetMaximumRenderPassAttachmentSize() const =0
Return the maximum size of a render pass attachment.
virtual bool SupportsDeviceTransientTextures() const =0
Whether the context backend supports allocating StorageMode::kDeviceTransient (aka "memoryless") text...
virtual size_t GetMinimumStorageBufferAlignment() const
The minimum alignment of storage buffer value offsets in bytes.
virtual bool SupportsCompute() const =0
Whether the context backend supports ComputePass.
virtual bool SupportsExtendedRangeFormats() const =0
Whether the XR formats are supported on this device.
virtual bool SupportsSSBO() const =0
Whether the context backend supports binding Shader Storage Buffer Objects (SSBOs) to pipelines.
virtual PixelFormat GetDefaultDepthStencilFormat() const =0
Returns a supported PixelFormat for textures that store both a stencil and depth component....
virtual bool SupportsManuallyMippedTextures() const =0
Whether a texture whose mip levels were uploaded by hand (rather than produced by BlitPass::GenerateM...
virtual bool SupportsTextureCompression(CompressedTextureFamily family) const =0
Whether the given family of block-compressed texture formats is supported by this device....
virtual bool SupportsTextureToTextureBlits() const =0
Whether the context backend supports blitting from one texture region to another texture region (via ...
PixelFormat
The Pixel formats supported by Impeller. The naming convention denotes the usage of the component,...
CompressedTextureFamily
The family of a block-compressed pixel format. GPUs support compressed formats on a per-family basis,...