 |
Flutter Impeller
|
|
Go to the documentation of this file.
5 #ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_CAPABILITIES_VK_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_CAPABILITIES_VK_H_
152 vk::Format
format = vk::Format::eUndefined;
160 type(image_info.imageType),
173 bool fatal_missing_validations =
false);
192 const vk::PhysicalDevice& physical_device)
const;
195 vk::StructureChain<vk::PhysicalDeviceFeatures2,
196 vk::PhysicalDeviceSamplerYcbcrConversionFeaturesKHR,
197 vk::PhysicalDevice16BitStorageFeatures,
198 vk::PhysicalDeviceImageCompressionControlFeaturesEXT>;
201 const vk::PhysicalDevice& physical_device)
const;
204 const vk::PhysicalDevice& physical_device,
279 bool validations_enabled_ =
false;
280 std::map<std::string, std::set<std::string>> exts_;
281 std::set<RequiredCommonDeviceExtensionVK> required_common_device_extensions_;
282 std::set<RequiredAndroidDeviceExtensionVK>
283 required_android_device_extensions_;
284 std::set<OptionalDeviceExtensionVK> optional_device_extensions_;
288 vk::PhysicalDevice physical_device_;
289 vk::PhysicalDeviceProperties device_properties_;
290 bool supports_compute_subgroups_ =
false;
291 bool supports_device_transient_textures_ =
false;
292 bool supports_texture_fixed_rate_compression_ =
false;
293 ISize max_render_pass_attachment_size_ =
ISize{0, 0};
294 bool is_valid_ =
false;
298 bool HasLayer(
const std::string& layer)
const;
307 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_CAPABILITIES_VK_H_
OptionalDeviceExtensionVK
A device extension enabled if available. Subsystems cannot assume availability and must check if thes...
bool SetPhysicalDevice(const vk::PhysicalDevice &physical_device, const PhysicalDeviceFeatures &enabled_features)
bool SupportsDecalSamplerAddressMode() const override
Whether the context backend supports SamplerAddressMode::Decal.
void SetOffscreenFormat(PixelFormat pixel_format) const
@ kKHRExternalSemaphoreFd
std::optional< std::vector< std::string > > GetEnabledInstanceExtensions() const
bool SupportsOffscreenMSAA() const override
Whether the context backend supports attaching offscreen MSAA color/stencil textures.
bool SupportsFramebufferFetch() const override
Whether the context backend is able to support pipelines with shaders that read from the framebuffer ...
ISize GetMaximumRenderPassAttachmentSize() const override
Return the maximum size of a render pass attachment.
PixelFormat GetDefaultStencilFormat() const override
Returns a supported PixelFormat for textures that store stencil information. May include a depth chan...
std::optional< std::vector< std::string > > GetEnabledLayers() const
@ kEXTPipelineCreationFeedback
bool SupportsTextureToTextureBlits() const override
Whether the context backend supports blitting from one texture region to another texture region (via ...
PixelFormat GetDefaultGlyphAtlasFormat() const override
Returns the default pixel format for the alpha bitmap glyph atlas.
bool SupportsComputeSubgroups() const override
Whether the context backend supports configuring ComputePass command subgroups.
CapabilitiesVK(bool enable_validations, bool fatal_missing_validations=false)
bool SupportsReadFromResolve() const override
Whether the context backend supports binding the current RenderPass attachments. This is supported if...
std::optional< PhysicalDeviceFeatures > GetEnabledDeviceFeatures(const vk::PhysicalDevice &physical_device) const
RequiredCommonDeviceExtensionVK
A device extension available on all platforms. Without the presence of these extensions,...
PixelFormat
The Pixel formats supported by Impeller. The naming convention denotes the usage of the component,...
bool HasExtension(RequiredCommonDeviceExtensionVK ext) const
PixelFormat GetDefaultColorFormat() const override
Returns a supported PixelFormat for textures that store 4-channel colors (red/green/blue/alpha).
@ kKHRDedicatedAllocation
CompressionType
Additional compression to apply to a texture. This value is ignored on platforms which do not support...
@ kANDROIDExternalMemoryAndroidHardwareBuffer
@ kKHRSamplerYcbcrConversion
std::optional< vk::ImageCompressionFixedRateFlagBitsEXT > GetSupportedFRCRate(CompressionType compression_type, const FRCFormatDescriptor &desc) const
Get the fixed compression rate supported by the context for the given format and usage.
vk::StructureChain< vk::PhysicalDeviceFeatures2, vk::PhysicalDeviceSamplerYcbcrConversionFeaturesKHR, vk::PhysicalDevice16BitStorageFeatures, vk::PhysicalDeviceImageCompressionControlFeaturesEXT > PhysicalDeviceFeatures
PixelFormat GetDefaultDepthStencilFormat() const override
Returns a supported PixelFormat for textures that store both a stencil and depth component....
bool SupportsTriangleFan() const override
Whether the primitive type TriangleFan is supported by the backend.
bool SupportsCompute() const override
Whether the context backend supports ComputePass.
The Vulkan layers and extensions wrangler.
bool SupportsTextureFixedRateCompression() const
@ kVKKHRPortabilitySubset
bool SupportsDeviceTransientTextures() const override
Whether the context backend supports allocating StorageMode::kDeviceTransient (aka "memoryless") text...
const vk::PhysicalDeviceProperties & GetPhysicalDeviceProperties() const
RequiredAndroidDeviceExtensionVK
A device extension available on all Android platforms. Without the presence of these extensions on An...
bool SupportsSSBO() const override
Whether the context backend supports binding Shader Storage Buffer Objects (SSBOs) to pipelines.
bool AreValidationsEnabled() const
std::optional< std::vector< std::string > > GetEnabledDeviceExtensions(const vk::PhysicalDevice &physical_device) const
bool SupportsImplicitResolvingMSAA() const override
Whether the context backend supports multisampled rendering to the on-screen surface without requirin...
@ kEXTImageCompressionControl