| Flutter Impeller |

Public Member Functions | Friends | List of all members
impeller::StandardCapabilities Class Referencefinal
Inheritance diagram for impeller::StandardCapabilities:

## Public Member Functions
| ~StandardCapabilities () override=default
bool | SupportsOffscreenMSAA () const override
| Whether the context backend supports attaching offscreen MSAA color/stencil textures. More...
bool | SupportsImplicitResolvingMSAA () const override
| Whether the context backend supports multisampled rendering to the on-screen surface without requiring an explicit resolve of the MSAA color attachment. More...
bool | SupportsSSBO () const override
| Whether the context backend supports binding Shader Storage Buffer Objects (SSBOs) to pipelines. More...
bool | SupportsTextureToTextureBlits () const override
| Whether the context backend supports blitting from one texture region to another texture region (via the relevant `BlitPass::AddCopy` overloads). More...
bool | SupportsFramebufferFetch () const override
| Whether the context backend is able to support pipelines with shaders that read from the framebuffer (i.e. pixels that have been written by previous draw calls in the current render pass). More...
bool | SupportsCompute () const override
| Whether the context backend supports `ComputePass`. More...
bool | SupportsComputeSubgroups () const override
| Whether the context backend supports configuring `ComputePass` command subgroups. More...
bool | SupportsReadFromResolve () const override
| Whether the context backend supports binding the current `RenderPass` attachments. This is supported if the backend can guarantee that attachment textures will not be mutated until the render pass has fully completed. More...
bool | SupportsDecalSamplerAddressMode () const override
| Whether the context backend supports `SamplerAddressMode::Decal`. More...
bool | SupportsTriangleFan () const override
| Whether the primitive type TriangleFan is supported by the backend. More...
PixelFormat | GetDefaultColorFormat () const override
| Returns a supported `PixelFormat` for textures that store 4-channel colors (red/green/blue/alpha). More...
PixelFormat | GetDefaultStencilFormat () const override
| Returns a supported `PixelFormat` for textures that store stencil information. May include a depth channel if a stencil-only format is not available. More...
PixelFormat | GetDefaultDepthStencilFormat () const override
| Returns a supported `PixelFormat` for textures that store both a stencil and depth component. This will never return a depth-only or stencil-only texture. Returns `PixelFormat::kUnknown` if no suitable depth+stencil format was found. More...
bool | SupportsDeviceTransientTextures () const override
| Whether the context backend supports allocating `StorageMode::kDeviceTransient` (aka "memoryless") textures, which are temporary textures kept in tile memory for the duration of the `RenderPass` it's attached to. More...
PixelFormat | GetDefaultGlyphAtlasFormat () const override
| Returns the default pixel format for the alpha bitmap glyph atlas. More...
ISize | GetMaximumRenderPassAttachmentSize () const override
| Return the maximum size of a render pass attachment. More...
bool | SupportsPrimitiveRestart () const override
| Whether primitive restart is supported. More...
bool | SupportsExtendedRangeFormats () const override
| Whether the XR formats are supported on this device. More...
size_t | GetMinimumUniformAlignment () const override
| The minimum alignment of uniform value offsets in bytes. More...
bool | NeedsPartitionedHostBuffer () const override
| Whether the host buffer should use separate device buffers for indexes from other data. More...
Public Member Functions inherited from impeller::Capabilities
virtual | ~Capabilities ()

## Friends
class | CapabilitiesBuilder

## Additional Inherited Members
Protected Member Functions inherited from impeller::Capabilities
| Capabilities ()
| Capabilities (const Capabilities &)=delete
Capabilities & | operator= (const Capabilities &)=delete

## Detailed Description

Definition at line 14 of file capabilities.cc.

## Constructor & Destructor Documentation

## ◆ ~StandardCapabilities()

impeller::StandardCapabilities::~StandardCapabilities | ( |  | ) |
| override default

## Member Function Documentation

## ◆ GetDefaultColorFormat()

PixelFormat impeller::StandardCapabilities::GetDefaultColorFormat | ( |  | ) | const
| inline override virtual

Returns a supported `PixelFormat` for textures that store 4-channel colors (red/green/blue/alpha).

Implements impeller::Capabilities.

Definition at line 62 of file capabilities.cc.

62 {
63 return default_color_format_;
64 }

## ◆ GetDefaultDepthStencilFormat()

PixelFormat impeller::StandardCapabilities::GetDefaultDepthStencilFormat | ( |  | ) | const
| inline override virtual

Returns a supported `PixelFormat` for textures that store both a stencil and depth component. This will never return a depth-only or stencil-only texture. Returns `PixelFormat::kUnknown` if no suitable depth+stencil format was found.

Implements impeller::Capabilities.

Definition at line 72 of file capabilities.cc.

72 {
73 return default_depth_stencil_format_;
74 }

## ◆ GetDefaultGlyphAtlasFormat()

PixelFormat impeller::StandardCapabilities::GetDefaultGlyphAtlasFormat | ( |  | ) | const
| inline override virtual

Returns the default pixel format for the alpha bitmap glyph atlas.

       Some backends may use Red channel while others use grey. This
       should not have any impact

Implements impeller::Capabilities.

Definition at line 82 of file capabilities.cc.

82 {
83 return default_glyph_atlas_format_;
84 }

## ◆ GetDefaultStencilFormat()

PixelFormat impeller::StandardCapabilities::GetDefaultStencilFormat | ( |  | ) | const
| inline override virtual

Returns a supported `PixelFormat` for textures that store stencil information. May include a depth channel if a stencil-only format is not available.

Implements impeller::Capabilities.

Definition at line 67 of file capabilities.cc.

67 {
68 return default_stencil_format_;
69 }

## ◆ GetMaximumRenderPassAttachmentSize()

ISize impeller::StandardCapabilities::GetMaximumRenderPassAttachmentSize | ( |  | ) | const
| inline override virtual

Return the maximum size of a render pass attachment.

Note that this may be smaller than the maximum allocatable texture size.

Implements impeller::Capabilities.

Definition at line 87 of file capabilities.cc.

87 {
88 return default_maximum_render_pass_attachment_size_;
89 }

## ◆ GetMinimumUniformAlignment()

size_t impeller::StandardCapabilities::GetMinimumUniformAlignment | ( |  | ) | const
| inline override virtual

The minimum alignment of uniform value offsets in bytes.

Implements impeller::Capabilities.

Definition at line 100 of file capabilities.cc.

100 {
101 return minimum_uniform_alignment_;
102 }

## ◆ NeedsPartitionedHostBuffer()

bool impeller::StandardCapabilities::NeedsPartitionedHostBuffer | ( |  | ) | const
| inline override virtual

Whether the host buffer should use separate device buffers for indexes from other data.

Implements impeller::Capabilities.

Definition at line 105 of file capabilities.cc.

105 {
106 return needs_partitioned_host_buffer_;
107 }

## ◆ SupportsCompute()

bool impeller::StandardCapabilities::SupportsCompute | ( |  | ) | const
| inline override virtual

Whether the context backend supports `ComputePass`.

Implements impeller::Capabilities.

Definition at line 41 of file capabilities.cc.

41 { return supports_compute_; }

## ◆ SupportsComputeSubgroups()

bool impeller::StandardCapabilities::SupportsComputeSubgroups | ( |  | ) | const
| inline override virtual

Whether the context backend supports configuring `ComputePass` command subgroups.

Implements impeller::Capabilities.

Definition at line 44 of file capabilities.cc.

44 {
45 return supports_compute_subgroups_;
46 }

## ◆ SupportsDecalSamplerAddressMode()

bool impeller::StandardCapabilities::SupportsDecalSamplerAddressMode | ( |  | ) | const
| inline override virtual

Whether the context backend supports `SamplerAddressMode::Decal`.

Implements impeller::Capabilities.

Definition at line 54 of file capabilities.cc.

54 {
55 return supports_decal_sampler_address_mode_;
56 }

## ◆ SupportsDeviceTransientTextures()

bool impeller::StandardCapabilities::SupportsDeviceTransientTextures | ( |  | ) | const
| inline override virtual

Whether the context backend supports allocating `StorageMode::kDeviceTransient` (aka "memoryless") textures, which are temporary textures kept in tile memory for the duration of the `RenderPass` it's attached to.

This feature is especially useful for MSAA and stencils.

Implements impeller::Capabilities.

Definition at line 77 of file capabilities.cc.

77 {
78 return supports_device_transient_textures_;
79 }

## ◆ SupportsExtendedRangeFormats()

bool impeller::StandardCapabilities::SupportsExtendedRangeFormats | ( |  | ) | const
| inline override virtual

Whether the XR formats are supported on this device.

This is only ever true for iOS and macOS devices. We may need to revisit this API when approaching wide gamut rendering for Vulkan and GLES.

Implements impeller::Capabilities.

Definition at line 95 of file capabilities.cc.

95 {
96 return supports_extended_range_formats_;
97 }

## ◆ SupportsFramebufferFetch()

bool impeller::StandardCapabilities::SupportsFramebufferFetch | ( |  | ) | const
| inline override virtual

Whether the context backend is able to support pipelines with shaders that read from the framebuffer (i.e. pixels that have been written by previous draw calls in the current render pass).

Example of reading from the first color attachment in a GLSL shader: ``` uniform subpassInput subpass_input;

out vec4 frag_color;

void main() { vec4 color = subpassLoad(subpass_input); // Invert the colors drawn to the framebuffer. frag_color = vec4(vec3(1) - color.rgb, color.a); } ```

Implements impeller::Capabilities.

Definition at line 36 of file capabilities.cc.

36 {
37 return supports_framebuffer_fetch_;
38 }

## ◆ SupportsImplicitResolvingMSAA()

bool impeller::StandardCapabilities::SupportsImplicitResolvingMSAA | ( |  | ) | const
| inline override virtual

Whether the context backend supports multisampled rendering to the on-screen surface without requiring an explicit resolve of the MSAA color attachment.

Implements impeller::Capabilities.

Definition at line 25 of file capabilities.cc.

25 { return false; }

## ◆ SupportsOffscreenMSAA()

bool impeller::StandardCapabilities::SupportsOffscreenMSAA | ( |  | ) | const
| inline override virtual

Whether the context backend supports attaching offscreen MSAA color/stencil textures.

Implements impeller::Capabilities.

Definition at line 20 of file capabilities.cc.

20 {
21 return supports_offscreen_msaa_;
22 }

## ◆ SupportsPrimitiveRestart()

bool impeller::StandardCapabilities::SupportsPrimitiveRestart | ( |  | ) | const
| inline override virtual

Whether primitive restart is supported.

Implements impeller::Capabilities.

Definition at line 92 of file capabilities.cc.

92 { return true; }

## ◆ SupportsReadFromResolve()

bool impeller::StandardCapabilities::SupportsReadFromResolve | ( |  | ) | const
| inline override virtual

Whether the context backend supports binding the current `RenderPass` attachments. This is supported if the backend can guarantee that attachment textures will not be mutated until the render pass has fully completed.

This is possible because many mobile graphics cards track `RenderPass` attachment state in intermediary tile memory prior to Storing the pass in the heap allocated attachments on DRAM. Metal's hazard tracking and Vulkan's barriers are granular enough to allow for safely accessing attachment textures prior to storage in the same `RenderPass`.

Implements impeller::Capabilities.

Definition at line 49 of file capabilities.cc.

49 {
50 return supports_read_from_resolve_;
51 }

## ◆ SupportsSSBO()

bool impeller::StandardCapabilities::SupportsSSBO | ( |  | ) | const
| inline override virtual

Whether the context backend supports binding Shader Storage Buffer Objects (SSBOs) to pipelines.

Implements impeller::Capabilities.

Definition at line 28 of file capabilities.cc.

28 { return supports_ssbo_; }

## ◆ SupportsTextureToTextureBlits()

bool impeller::StandardCapabilities::SupportsTextureToTextureBlits | ( |  | ) | const
| inline override virtual

Whether the context backend supports blitting from one texture region to another texture region (via the relevant `BlitPass::AddCopy` overloads).

Implements impeller::Capabilities.

Definition at line 31 of file capabilities.cc.

31 {
32 return supports_texture_to_texture_blits_;
33 }

## ◆ SupportsTriangleFan()

bool impeller::StandardCapabilities::SupportsTriangleFan | ( |  | ) | const
| inline override virtual

Whether the primitive type TriangleFan is supported by the backend.

Implements impeller::Capabilities.

Definition at line 59 of file capabilities.cc.

59 { return supports_triangle_fan_; }

## Friends And Related Function Documentation

## ◆ CapabilitiesBuilder

friend class CapabilitiesBuilder
| friend

Definition at line 149 of file capabilities.cc.

The documentation for this class was generated from the following file:

- impeller/renderer/capabilities.cc