#include <capabilities.h>
Public Member Functions | |
| virtual | ~Capabilities () |
| virtual bool | SupportsOffscreenMSAA () const =0 |
| Whether the context backend supports attaching offscreen MSAA color/stencil textures. More... | |
| virtual bool | SupportsSSBO () const =0 |
| Whether the context backend supports binding Shader Storage Buffer Objects (SSBOs) to pipelines. More... | |
| virtual bool | SupportsBufferToTextureBlits () const =0 |
Whether the context backend supports blitting from a given DeviceBuffer view to a texture region (via the relevant BlitPass::AddCopy overloads). More... | |
| virtual bool | SupportsTextureToTextureBlits () const =0 |
Whether the context backend supports blitting from one texture region to another texture region (via the relevant BlitPass::AddCopy overloads). More... | |
| virtual bool | SupportsFramebufferFetch () const =0 |
| 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... | |
| virtual bool | SupportsCompute () const =0 |
Whether the context backend supports ComputePass. More... | |
| virtual bool | SupportsComputeSubgroups () const =0 |
Whether the context backend supports configuring ComputePass command subgroups. More... | |
| virtual bool | SupportsReadFromOnscreenTexture () const =0 |
| Whether the context backend supports binding the on-screen surface texture for shader reading. More... | |
| virtual bool | SupportsReadFromResolve () const =0 |
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... | |
| virtual bool | SupportsDecalSamplerAddressMode () const =0 |
Whether the context backend supports SamplerAddressMode::Decal. More... | |
| virtual bool | SupportsDeviceTransientTextures () const =0 |
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... | |
| virtual PixelFormat | GetDefaultColorFormat () const =0 |
Returns a supported PixelFormat for textures that store 4-channel colors (red/green/blue/alpha). More... | |
| virtual PixelFormat | GetDefaultStencilFormat () const =0 |
Returns a supported PixelFormat for textures that store stencil information. May include a depth channel if a stencil-only format is not available. More... | |
| virtual PixelFormat | GetDefaultDepthStencilFormat () const =0 |
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... | |
Protected Member Functions | |
| Capabilities () | |
| FML_DISALLOW_COPY_AND_ASSIGN (Capabilities) | |
Definition at line 14 of file capabilities.h.
|
virtualdefault |
|
protecteddefault |
|
protected |
|
pure virtual |
Returns a supported PixelFormat for textures that store 4-channel colors (red/green/blue/alpha).
Implemented in impeller::CapabilitiesVK, and impeller::StandardCapabilities.
|
pure 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.
Implemented in impeller::CapabilitiesVK, and impeller::StandardCapabilities.
Referenced by impeller::scene::SceneContextOptions::ApplyToPipelineDescriptor().
|
pure virtual |
Returns a supported PixelFormat for textures that store stencil information. May include a depth channel if a stencil-only format is not available.
Implemented in impeller::CapabilitiesVK, and impeller::StandardCapabilities.
|
pure virtual |
Whether the context backend supports blitting from a given DeviceBuffer view to a texture region (via the relevant BlitPass::AddCopy overloads).
Implemented in impeller::CapabilitiesVK, and impeller::StandardCapabilities.
|
pure virtual |
Whether the context backend supports ComputePass.
Implemented in impeller::CapabilitiesVK, and impeller::StandardCapabilities.
|
pure virtual |
Whether the context backend supports configuring ComputePass command subgroups.
Implemented in impeller::CapabilitiesVK, and impeller::StandardCapabilities.
|
pure virtual |
Whether the context backend supports SamplerAddressMode::Decal.
Implemented in impeller::CapabilitiesVK, and impeller::StandardCapabilities.
Referenced by impeller::AdvancedBlend(), impeller::AtlasContents::Render(), and impeller::TileModeToAddressMode().
|
pure 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.
Implemented in impeller::CapabilitiesVK, and impeller::StandardCapabilities.
|
pure 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); } ```
Implemented in impeller::CapabilitiesVK, and impeller::StandardCapabilities.
|
pure virtual |
Whether the context backend supports attaching offscreen MSAA color/stencil textures.
Implemented in impeller::CapabilitiesVK, and impeller::StandardCapabilities.
|
pure virtual |
Whether the context backend supports binding the on-screen surface texture for shader reading.
Implemented in impeller::CapabilitiesVK, and impeller::StandardCapabilities.
|
pure 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.
Implemented in impeller::CapabilitiesVK, and impeller::StandardCapabilities.
Referenced by impeller::CreateRenderTarget().
|
pure virtual |
Whether the context backend supports binding Shader Storage Buffer Objects (SSBOs) to pipelines.
Implemented in impeller::CapabilitiesVK, and impeller::StandardCapabilities.
Referenced by impeller::ConicalGradientContents::Render(), impeller::RadialGradientContents::Render(), impeller::SweepGradientContents::Render(), and impeller::LinearGradientContents::Render().
|
pure virtual |
Whether the context backend supports blitting from one texture region to another texture region (via the relevant BlitPass::AddCopy overloads).
Implemented in impeller::CapabilitiesVK, and impeller::StandardCapabilities.