The Vulkan layers and extensions wrangler. More...
#include <capabilities_vk.h>
Public Member Functions | |
| CapabilitiesVK (bool enable_validations) | |
| ~CapabilitiesVK () | |
| bool | IsValid () const |
| bool | AreValidationsEnabled () const |
| bool | HasOptionalDeviceExtension (OptionalDeviceExtensionVK extension) const |
| std::optional< std::vector< std::string > > | GetEnabledLayers () const |
| std::optional< std::vector< std::string > > | GetEnabledInstanceExtensions () const |
| std::optional< std::vector< std::string > > | GetEnabledDeviceExtensions (const vk::PhysicalDevice &physical_device) const |
| std::optional< vk::PhysicalDeviceFeatures > | GetEnabledDeviceFeatures (const vk::PhysicalDevice &physical_device) const |
| bool | SetPhysicalDevice (const vk::PhysicalDevice &physical_device) |
| const vk::PhysicalDeviceProperties & | GetPhysicalDeviceProperties () const |
| void | SetOffscreenFormat (PixelFormat pixel_format) const |
| 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 | 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 | SupportsReadFromOnscreenTexture () const override |
| Whether the context backend supports binding the on-screen surface texture for shader reading. More... | |
| bool | SupportsDecalSamplerAddressMode () const override |
Whether the context backend supports SamplerAddressMode::Decal. 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 | 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... | |
Public Member Functions inherited from impeller::Capabilities | |
| virtual | ~Capabilities () |
Additional Inherited Members | |
Static Public Member Functions inherited from impeller::BackendCast< CapabilitiesVK, Capabilities > | |
| static CapabilitiesVK & | Cast (Capabilities &base) |
| static const CapabilitiesVK & | Cast (const Capabilities &base) |
| static CapabilitiesVK * | Cast (Capabilities *base) |
| static const CapabilitiesVK * | Cast (const Capabilities *base) |
Protected Member Functions inherited from impeller::Capabilities | |
| Capabilities () | |
| FML_DISALLOW_COPY_AND_ASSIGN (Capabilities) | |
The Vulkan layers and extensions wrangler.
Definition at line 30 of file capabilities_vk.h.
|
explicit |
|
default |
| bool impeller::CapabilitiesVK::AreValidationsEnabled | ( | ) | const |
Definition at line 61 of file capabilities_vk.cc.
Referenced by impeller::DebugReportVK::DebugReportVK(), and impeller::testing::TEST().
|
overridevirtual |
Returns a supported PixelFormat for textures that store 4-channel colors (red/green/blue/alpha).
Implements impeller::Capabilities.
Definition at line 464 of file capabilities_vk.cc.
|
overridevirtual |
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 474 of file capabilities_vk.cc.
|
overridevirtual |
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 469 of file capabilities_vk.cc.
| std::optional< std::vector< std::string > > impeller::CapabilitiesVK::GetEnabledDeviceExtensions | ( | const vk::PhysicalDevice & | physical_device | ) | const |
Definition at line 192 of file capabilities_vk.cc.
References impeller::GetDeviceExtensionName(), impeller::GetSupportedDeviceExtensions(), impeller::IterateOptionalDeviceExtensions(), and VALIDATION_LOG.
Referenced by GetEnabledDeviceFeatures().
| std::optional< vk::PhysicalDeviceFeatures > impeller::CapabilitiesVK::GetEnabledDeviceFeatures | ( | const vk::PhysicalDevice & | physical_device | ) | const |
Definition at line 286 of file capabilities_vk.cc.
References GetEnabledDeviceExtensions(), impeller::HasRequiredProperties(), impeller::HasRequiredQueues(), impeller::PhysicalDeviceSupportsRequiredFormats(), and VALIDATION_LOG.
Referenced by impeller::PickPhysicalDevice().
| std::optional< std::vector< std::string > > impeller::CapabilitiesVK::GetEnabledInstanceExtensions | ( | ) | const |
| std::optional< std::vector< std::string > > impeller::CapabilitiesVK::GetEnabledLayers | ( | ) | const |
Definition at line 65 of file capabilities_vk.cc.
| const vk::PhysicalDeviceProperties & impeller::CapabilitiesVK::GetPhysicalDeviceProperties | ( | ) | const |
Definition at line 479 of file capabilities_vk.cc.
| bool impeller::CapabilitiesVK::HasOptionalDeviceExtension | ( | OptionalDeviceExtensionVK | extension | ) | const |
Definition at line 483 of file capabilities_vk.cc.
| bool impeller::CapabilitiesVK::IsValid | ( | ) | const |
Definition at line 57 of file capabilities_vk.cc.
| void impeller::CapabilitiesVK::SetOffscreenFormat | ( | PixelFormat | pixel_format | ) | const |
Definition at line 337 of file capabilities_vk.cc.
Referenced by impeller::ContextVK::SetOffscreenFormat().
| bool impeller::CapabilitiesVK::SetPhysicalDevice | ( | const vk::PhysicalDevice & | physical_device | ) |
Definition at line 341 of file capabilities_vk.cc.
References impeller::GetDeviceExtensionName(), impeller::GetSupportedDeviceExtensions(), impeller::HasSuitableDepthStencilFormat(), impeller::IterateOptionalDeviceExtensions(), impeller::kD24UnormS8Uint, impeller::kD32FloatS8UInt, impeller::kS8UInt, and impeller::kUnknown.
|
overridevirtual |
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 418 of file capabilities_vk.cc.
|
overridevirtual |
Whether the context backend supports ComputePass.
Implements impeller::Capabilities.
Definition at line 433 of file capabilities_vk.cc.
|
overridevirtual |
Whether the context backend supports configuring ComputePass command subgroups.
Implements impeller::Capabilities.
Definition at line 439 of file capabilities_vk.cc.
|
overridevirtual |
Whether the context backend supports SamplerAddressMode::Decal.
Implements impeller::Capabilities.
Definition at line 454 of file capabilities_vk.cc.
|
overridevirtual |
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 459 of file capabilities_vk.cc.
|
overridevirtual |
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 428 of file capabilities_vk.cc.
|
overridevirtual |
Whether the context backend supports attaching offscreen MSAA color/stencil textures.
Implements impeller::Capabilities.
Definition at line 408 of file capabilities_vk.cc.
|
overridevirtual |
Whether the context backend supports binding the on-screen surface texture for shader reading.
Implements impeller::Capabilities.
Definition at line 450 of file capabilities_vk.cc.
|
overridevirtual |
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 445 of file capabilities_vk.cc.
|
overridevirtual |
Whether the context backend supports binding Shader Storage Buffer Objects (SSBOs) to pipelines.
Implements impeller::Capabilities.
Definition at line 413 of file capabilities_vk.cc.
|
overridevirtual |
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 423 of file capabilities_vk.cc.