vulkan: Remove vk_get_physical_device_core_1_*_feature_ext
authorKonstantin Seurer <konstantin.seurer@gmail.com>
Fri, 18 Aug 2023 10:44:57 +0000 (12:44 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 27 Sep 2023 23:02:29 +0000 (23:02 +0000)
It's unused.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24773>

src/vulkan/runtime/vk_device.c
src/vulkan/runtime/vk_device.h

index 8d1ff30..b48feca 100644 (file)
@@ -558,281 +558,6 @@ vk_clock_gettime(clockid_t clock_id)
 
 #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))
 
index c4e307e..2949de7 100644 (file)
@@ -421,13 +421,6 @@ PFN_vkVoidFunction
 vk_device_get_proc_addr(const struct vk_device *device,
                         const char *name);
 
-bool vk_get_physical_device_core_1_1_feature_ext(struct VkBaseOutStructure *ext,
-                                                 const VkPhysicalDeviceVulkan11Features *core);
-bool vk_get_physical_device_core_1_2_feature_ext(struct VkBaseOutStructure *ext,
-                                                 const VkPhysicalDeviceVulkan12Features *core);
-bool vk_get_physical_device_core_1_3_feature_ext(struct VkBaseOutStructure *ext,
-                                                 const VkPhysicalDeviceVulkan13Features *core);
-
 bool vk_get_physical_device_core_1_1_property_ext(struct VkBaseOutStructure *ext,
                                                      const VkPhysicalDeviceVulkan11Properties *core);
 bool vk_get_physical_device_core_1_2_property_ext(struct VkBaseOutStructure *ext,