#endif //!_WIN32
-#define CORE_FEATURE(feature) features->feature = core->feature
-
-bool
-vk_get_physical_device_core_1_1_feature_ext(struct VkBaseOutStructure *ext,
- const VkPhysicalDeviceVulkan11Features *core)
-{
-
- switch (ext->sType) {
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: {
- VkPhysicalDevice16BitStorageFeatures *features = (void *)ext;
- CORE_FEATURE(storageBuffer16BitAccess);
- CORE_FEATURE(uniformAndStorageBuffer16BitAccess);
- CORE_FEATURE(storagePushConstant16);
- CORE_FEATURE(storageInputOutput16);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES: {
- VkPhysicalDeviceMultiviewFeatures *features = (void *)ext;
- CORE_FEATURE(multiview);
- CORE_FEATURE(multiviewGeometryShader);
- CORE_FEATURE(multiviewTessellationShader);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES: {
- VkPhysicalDeviceProtectedMemoryFeatures *features = (void *)ext;
- CORE_FEATURE(protectedMemory);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: {
- VkPhysicalDeviceSamplerYcbcrConversionFeatures *features = (void *) ext;
- CORE_FEATURE(samplerYcbcrConversion);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES: {
- VkPhysicalDeviceShaderDrawParametersFeatures *features = (void *)ext;
- CORE_FEATURE(shaderDrawParameters);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES: {
- VkPhysicalDeviceVariablePointersFeatures *features = (void *)ext;
- CORE_FEATURE(variablePointersStorageBuffer);
- CORE_FEATURE(variablePointers);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES:
- vk_copy_struct_guts(ext, (void *)core, sizeof(*core));
- return true;
-
- default:
- return false;
- }
-}
-
-bool
-vk_get_physical_device_core_1_2_feature_ext(struct VkBaseOutStructure *ext,
- const VkPhysicalDeviceVulkan12Features *core)
-{
-
- switch (ext->sType) {
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES: {
- VkPhysicalDevice8BitStorageFeatures *features = (void *)ext;
- CORE_FEATURE(storageBuffer8BitAccess);
- CORE_FEATURE(uniformAndStorageBuffer8BitAccess);
- CORE_FEATURE(storagePushConstant8);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES: {
- VkPhysicalDeviceBufferDeviceAddressFeatures *features = (void *)ext;
- CORE_FEATURE(bufferDeviceAddress);
- CORE_FEATURE(bufferDeviceAddressCaptureReplay);
- CORE_FEATURE(bufferDeviceAddressMultiDevice);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES: {
- VkPhysicalDeviceDescriptorIndexingFeatures *features = (void *)ext;
- CORE_FEATURE(shaderInputAttachmentArrayDynamicIndexing);
- CORE_FEATURE(shaderUniformTexelBufferArrayDynamicIndexing);
- CORE_FEATURE(shaderStorageTexelBufferArrayDynamicIndexing);
- CORE_FEATURE(shaderUniformBufferArrayNonUniformIndexing);
- CORE_FEATURE(shaderSampledImageArrayNonUniformIndexing);
- CORE_FEATURE(shaderStorageBufferArrayNonUniformIndexing);
- CORE_FEATURE(shaderStorageImageArrayNonUniformIndexing);
- CORE_FEATURE(shaderInputAttachmentArrayNonUniformIndexing);
- CORE_FEATURE(shaderUniformTexelBufferArrayNonUniformIndexing);
- CORE_FEATURE(shaderStorageTexelBufferArrayNonUniformIndexing);
- CORE_FEATURE(descriptorBindingUniformBufferUpdateAfterBind);
- CORE_FEATURE(descriptorBindingSampledImageUpdateAfterBind);
- CORE_FEATURE(descriptorBindingStorageImageUpdateAfterBind);
- CORE_FEATURE(descriptorBindingStorageBufferUpdateAfterBind);
- CORE_FEATURE(descriptorBindingUniformTexelBufferUpdateAfterBind);
- CORE_FEATURE(descriptorBindingStorageTexelBufferUpdateAfterBind);
- CORE_FEATURE(descriptorBindingUpdateUnusedWhilePending);
- CORE_FEATURE(descriptorBindingPartiallyBound);
- CORE_FEATURE(descriptorBindingVariableDescriptorCount);
- CORE_FEATURE(runtimeDescriptorArray);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES: {
- VkPhysicalDeviceShaderFloat16Int8Features *features = (void *)ext;
- CORE_FEATURE(shaderFloat16);
- CORE_FEATURE(shaderInt8);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES: {
- VkPhysicalDeviceHostQueryResetFeatures *features = (void *)ext;
- CORE_FEATURE(hostQueryReset);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES: {
- VkPhysicalDeviceImagelessFramebufferFeatures *features = (void *)ext;
- CORE_FEATURE(imagelessFramebuffer);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES: {
- VkPhysicalDeviceScalarBlockLayoutFeatures *features =(void *)ext;
- CORE_FEATURE(scalarBlockLayout);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES: {
- VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures *features = (void *)ext;
- CORE_FEATURE(separateDepthStencilLayouts);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES: {
- VkPhysicalDeviceShaderAtomicInt64Features *features = (void *)ext;
- CORE_FEATURE(shaderBufferInt64Atomics);
- CORE_FEATURE(shaderSharedInt64Atomics);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES: {
- VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures *features = (void *)ext;
- CORE_FEATURE(shaderSubgroupExtendedTypes);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES: {
- VkPhysicalDeviceTimelineSemaphoreFeatures *features = (void *) ext;
- CORE_FEATURE(timelineSemaphore);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES: {
- VkPhysicalDeviceUniformBufferStandardLayoutFeatures *features = (void *)ext;
- CORE_FEATURE(uniformBufferStandardLayout);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES: {
- VkPhysicalDeviceVulkanMemoryModelFeatures *features = (void *)ext;
- CORE_FEATURE(vulkanMemoryModel);
- CORE_FEATURE(vulkanMemoryModelDeviceScope);
- CORE_FEATURE(vulkanMemoryModelAvailabilityVisibilityChains);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES:
- vk_copy_struct_guts(ext, (void *)core, sizeof(*core));
- return true;
-
- default:
- return false;
- }
-}
-
-bool
-vk_get_physical_device_core_1_3_feature_ext(struct VkBaseOutStructure *ext,
- const VkPhysicalDeviceVulkan13Features *core)
-{
- switch (ext->sType) {
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES: {
- VkPhysicalDeviceDynamicRenderingFeatures *features = (void *)ext;
- CORE_FEATURE(dynamicRendering);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES: {
- VkPhysicalDeviceImageRobustnessFeatures *features = (void *)ext;
- CORE_FEATURE(robustImageAccess);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES: {
- VkPhysicalDeviceInlineUniformBlockFeatures *features = (void *)ext;
- CORE_FEATURE(inlineUniformBlock);
- CORE_FEATURE(descriptorBindingInlineUniformBlockUpdateAfterBind);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES: {
- VkPhysicalDeviceMaintenance4Features *features = (void *)ext;
- CORE_FEATURE(maintenance4);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES: {
- VkPhysicalDevicePipelineCreationCacheControlFeatures *features = (void *)ext;
- CORE_FEATURE(pipelineCreationCacheControl);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES: {
- VkPhysicalDevicePrivateDataFeatures *features = (void *)ext;
- CORE_FEATURE(privateData);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES: {
- VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures *features = (void *)ext;
- CORE_FEATURE(shaderDemoteToHelperInvocation);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES: {
- VkPhysicalDeviceShaderIntegerDotProductFeatures *features = (void *)ext;
- CORE_FEATURE(shaderIntegerDotProduct);
- return true;
- };
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES: {
- VkPhysicalDeviceShaderTerminateInvocationFeatures *features = (void *)ext;
- CORE_FEATURE(shaderTerminateInvocation);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES: {
- VkPhysicalDeviceSubgroupSizeControlFeatures *features = (void *)ext;
- CORE_FEATURE(subgroupSizeControl);
- CORE_FEATURE(computeFullSubgroups);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES: {
- VkPhysicalDeviceSynchronization2Features *features = (void *)ext;
- CORE_FEATURE(synchronization2);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES: {
- VkPhysicalDeviceTextureCompressionASTCHDRFeatures *features = (void *)ext;
- CORE_FEATURE(textureCompressionASTC_HDR);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES: {
- VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures *features = (void *)ext;
- CORE_FEATURE(shaderZeroInitializeWorkgroupMemory);
- return true;
- }
-
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES:
- vk_copy_struct_guts(ext, (void *)core, sizeof(*core));
- return true;
-
- default:
- return false;
- }
-}
-
-#undef CORE_FEATURE
-
#define CORE_RENAMED_PROPERTY(ext_property, core_property) \
memcpy(&properties->ext_property, &core->core_property, sizeof(core->core_property))