class SK_API VulkanPreferredFeatures { public:
~VulkanPreferredFeatures();
/* *VulkanPreferredFeaturesisusedbySkiatoaddextensionsandfeaturesontopofwhattheapp *wantstoenable.TheflowofVulkaninitializationforanappthatwantstouseSkiawould *be: * *``` *// Query the loader for instance information, decide on API version to use * *// Prepare for Skia-enabled extensions and features *skgpu::VulkanPreferredFeaturesskiaFeatures; *skiaFeatures.init(apiVersion); * *// Decide on instance extensions to use in the app. * *// Allow Skia to add to the instance extension list. *skiaFeatures.addToInstanceExtensions(...); * *// Create the instance, choose physical device, query available extensions, decide on *// device features to query * *// Allow Skia to add to the feature query list. *skiaFeatures.addFeaturesToQuery(...); * *// Query features, decide on extensions and features to enable. * *// Allow Skia to add to the device extension and feature list. *skiaFeatures.addFeaturesToEnable(...); * *// Create the Vulkan device. *``` * *Parameters: * **appAPIVersion:TheAPIversiontheapphasspecifiedinVkApplicationInfo::apiVersion(and *willlaterprovideinVulkanBackendContext::fMaxAPIVersion).Theminimumsupportedversion *isVK_API_VERSION_1_1,maximumisVK_API_VERSION_1_4.
*/ void init(uint32_t appAPIVersion);
private:
uint32_t fAPIVersion = 0; // Track what the application did, so warnings can be generated if the class is not // fully/correctly used. bool fHasAddedToInstanceExtensions = false; bool fHasAddedFeaturesToQuery = false; bool fHasAddedFeaturesToEnable = false;
// The list of device features Skia is interested in. If any are included in // VkPhysicalDeviceFeatures2::pNext by the app, it is not included again by Skia. However, to // take best advantage of the Vulkan API, the app should not intentionally include these feature // structs only to forcefully disable the feature - this blocks Skia from leveraging it. // // When ambiguous, the extension name is included to determine which extension a feature struct // has come from. This is usually needed when addFeaturesToQuery has included a feature struct // that is present in multiple extensions (e.g. due to extension promotion). It is later used by // addFeaturesToEnable to know which extension to enable.
// Available since Vulkan 1.2
VkPhysicalDeviceVulkan11Features fVulkan11 = {};
// Available since Vulkan 1.2
VkPhysicalDeviceVulkan12Features fVulkan12 = {};
// Available since Vulkan 1.3
VkPhysicalDeviceVulkan13Features fVulkan13 = {};
// Available since Vulkan 1.4
VkPhysicalDeviceVulkan14Features fVulkan14 = {};
// Feature of VK_EXT_rasterization_order_attachment_access or // VK_ARM_rasterization_order_attachment_access.
VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT
fRasterizationOrderAttachmentAccess = {}; constchar* fRasterizationOrderAttachmentAccessExtension = nullptr;
// Feature of VK_EXT_blend_operation_advanced
VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT fBlendOperationAdvanced = {};
// Feature of VK_EXT_extended_dynamic_state
VkPhysicalDeviceExtendedDynamicStateFeaturesEXT fExtendedDynamicState = {};
// Feature of VK_EXT_extended_dynamic_state2
VkPhysicalDeviceExtendedDynamicState2FeaturesEXT fExtendedDynamicState2 = {};
// Feature of VK_EXT_vertex_input_dynamic_state
VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT fVertexInputDynamicState = {};
// Feature of VK_EXT_graphics_pipeline_library
VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT fGraphicsPipelineLibrary = {};
// Feature of VK_KHR_sampler_ycbcr_conversion or Vulkan 1.1
VkPhysicalDeviceSamplerYcbcrConversionFeatures fSamplerYcbcrConversion = {};
// Feature of VK_EXT_rgba10x6_formats
VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT fRGBA10x6Formats = {};
// Feature of VK_KHR_synchronization2 or Vulkan 1.3
VkPhysicalDeviceDynamicRenderingFeatures fSynchronization2 = {};
// Feature of VK_KHR_dynamic_rendering or Vulkan 1.3
VkPhysicalDeviceDynamicRenderingFeatures fDynamicRendering = {};
// Feature of VK_KHR_dynamic_rendering_local_read or Vulkan 1.4
VkPhysicalDeviceDynamicRenderingLocalReadFeatures fDynamicRenderingLocalRead = {};
// Feature of VK_EXT_multisampled_render_to_single_sampled
VkPhysicalDeviceMultisampledRenderToSingleSampledFeaturesEXT
fMultisampledRenderToSingleSampled = {};
// Feature of VK_EXT_host_image_copy or Vulkan 1.4
VkPhysicalDeviceHostImageCopyFeatures fHostImageCopy = {};
// Feature of VK_EXT_pipeline_creation_cache_control or Vulkan 1.3
VkPhysicalDevicePipelineCreationCacheControlFeatures fPipelineCreationCacheControl = {};
// Feature of VK_EXT_frame_boundary
VkPhysicalDeviceFrameBoundaryFeaturesEXT fFrameBoundary = {};
// Extensions that don't have a feature: // VK_KHR_driver_properties or Vulkan 1.2 constchar* fDriverPropertiesExtension = nullptr; // VK_KHR_create_renderpass2 or Vulkan 1.2 constchar* fCreateRenderpass2Extension = nullptr; // VK_EXT_load_store_op_none, VK_KHR_load_store_op_none or Vulkan 1.4 constchar* fLoadStoreOpNoneExtension = nullptr; // VK_EXT_conservative_rasterization constchar* fConservativeRasterizationExtension = nullptr; #ifdefined(SK_BUILD_FOR_ANDROID) // VK_ANDROID_external_memory_android_hardware_buffer constchar* fExternalMemoryAHardwareBufferExtension = nullptr; #endif
// Extensions that the other extensions above depend on: // Dependency of VK_EXT_graphics_pipeline_library: VK_KHR_pipeline_library constchar* fPipelineLibraryExtension = nullptr; // Dependencies of VK_EXT_host_image_copy: VK_KHR_copy_commands2, VK_KHR_format_feature_flags2 constchar* fCopyCommands2Extension = nullptr; constchar* fFormatFeatureFlags2Extension = nullptr; // Dependency of VK_EXT_multisampled_render_to_single_sampled: VK_KHR_depth_stencil_resolve constchar* fDepthStencilResolveExtension = nullptr; #ifdefined(SK_BUILD_FOR_ANDROID) // Dependency of VK_ANDROID_external_memory_android_hardware_buffer: VK_EXT_queue_family_foreign constchar* fQueueFamilyForeignExtension = nullptr; #endif
};
} // namespace skgpu
#endif// skgpu_VulkanPreferredFeatures_DEFINED
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-10-11)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.