Flutter Impeller
impeller::StandardCapabilities Class Referencefinal
Inheritance diagram for impeller::StandardCapabilities:
impeller::Capabilities

Public Member Functions

 ~StandardCapabilities () override=default
 
bool SupportsOffscreenMSAA () const override
 Whether the context backend supports attaching offscreen MSAA color/stencil textures. More...
 
bool SupportsSSBO () const override
 Whether the context backend supports binding Shader Storage Buffer Objects (SSBOs) to pipelines. More...
 
bool SupportsBufferToTextureBlits () const override
 Whether the context backend supports blitting from a given DeviceBuffer view to a texture region (via the relevant BlitPass::AddCopy overloads). 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 SupportsReadFromOnscreenTexture () const override
 Whether the context backend supports binding the on-screen surface texture for shader reading. 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...
 
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...
 
- Public Member Functions inherited from impeller::Capabilities
virtual ~Capabilities ()
 

Friends

class CapabilitiesBuilder
 

Additional Inherited Members

- Protected Member Functions inherited from impeller::Capabilities
 Capabilities ()
 
 FML_DISALLOW_COPY_AND_ASSIGN (Capabilities)
 

Detailed Description

Definition at line 13 of file capabilities.cc.

Constructor & Destructor Documentation

◆ ~StandardCapabilities()

impeller::StandardCapabilities::~StandardCapabilities ( )
overridedefault

Member Function Documentation

◆ GetDefaultColorFormat()

PixelFormat impeller::StandardCapabilities::GetDefaultColorFormat ( ) const
inlineoverridevirtual

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

Implements impeller::Capabilities.

Definition at line 65 of file capabilities.cc.

65  {
66  return default_color_format_;
67  }

◆ GetDefaultDepthStencilFormat()

PixelFormat impeller::StandardCapabilities::GetDefaultDepthStencilFormat ( ) const
inlineoverridevirtual

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 75 of file capabilities.cc.

75  {
76  return default_depth_stencil_format_;
77  }

◆ GetDefaultStencilFormat()

PixelFormat impeller::StandardCapabilities::GetDefaultStencilFormat ( ) const
inlineoverridevirtual

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 70 of file capabilities.cc.

70  {
71  return default_stencil_format_;
72  }

◆ SupportsBufferToTextureBlits()

bool impeller::StandardCapabilities::SupportsBufferToTextureBlits ( ) const
inlineoverridevirtual

Whether the context backend supports blitting from a given DeviceBuffer view to a texture region (via the relevant BlitPass::AddCopy overloads).

Implements impeller::Capabilities.

Definition at line 27 of file capabilities.cc.

27  {
28  return supports_buffer_to_texture_blits_;
29  }

◆ SupportsCompute()

bool impeller::StandardCapabilities::SupportsCompute ( ) const
inlineoverridevirtual

Whether the context backend supports ComputePass.

Implements impeller::Capabilities.

Definition at line 42 of file capabilities.cc.

42 { return supports_compute_; }

◆ SupportsComputeSubgroups()

bool impeller::StandardCapabilities::SupportsComputeSubgroups ( ) const
inlineoverridevirtual

Whether the context backend supports configuring ComputePass command subgroups.

Implements impeller::Capabilities.

Definition at line 45 of file capabilities.cc.

45  {
46  return supports_compute_subgroups_;
47  }

◆ SupportsDecalSamplerAddressMode()

bool impeller::StandardCapabilities::SupportsDecalSamplerAddressMode ( ) const
inlineoverridevirtual

Whether the context backend supports SamplerAddressMode::Decal.

Implements impeller::Capabilities.

Definition at line 60 of file capabilities.cc.

60  {
61  return supports_decal_sampler_address_mode_;
62  }

◆ SupportsDeviceTransientTextures()

bool impeller::StandardCapabilities::SupportsDeviceTransientTextures ( ) const
inlineoverridevirtual

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 79 of file capabilities.cc.

79  {
80  return supports_device_transient_textures_;
81  }

◆ SupportsFramebufferFetch()

bool impeller::StandardCapabilities::SupportsFramebufferFetch ( ) const
inlineoverridevirtual

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 37 of file capabilities.cc.

37  {
38  return supports_framebuffer_fetch_;
39  }

◆ SupportsOffscreenMSAA()

bool impeller::StandardCapabilities::SupportsOffscreenMSAA ( ) const
inlineoverridevirtual

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

Implements impeller::Capabilities.

Definition at line 19 of file capabilities.cc.

19  {
20  return supports_offscreen_msaa_;
21  }

◆ SupportsReadFromOnscreenTexture()

bool impeller::StandardCapabilities::SupportsReadFromOnscreenTexture ( ) const
inlineoverridevirtual

Whether the context backend supports binding the on-screen surface texture for shader reading.

Implements impeller::Capabilities.

Definition at line 50 of file capabilities.cc.

50  {
51  return supports_read_from_onscreen_texture_;
52  }

◆ SupportsReadFromResolve()

bool impeller::StandardCapabilities::SupportsReadFromResolve ( ) const
inlineoverridevirtual

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 55 of file capabilities.cc.

55  {
56  return supports_read_from_resolve_;
57  }

◆ SupportsSSBO()

bool impeller::StandardCapabilities::SupportsSSBO ( ) const
inlineoverridevirtual

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

Implements impeller::Capabilities.

Definition at line 24 of file capabilities.cc.

24 { return supports_ssbo_; }

◆ SupportsTextureToTextureBlits()

bool impeller::StandardCapabilities::SupportsTextureToTextureBlits ( ) const
inlineoverridevirtual

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 32 of file capabilities.cc.

32  {
33  return supports_texture_to_texture_blits_;
34  }

Friends And Related Function Documentation

◆ CapabilitiesBuilder

friend class CapabilitiesBuilder
friend

Definition at line 115 of file capabilities.cc.


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