kk: Reorder physical device extensions and features

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38137>
This commit is contained in:
Aitor Camacho 2025-10-23 09:51:08 -06:00 committed by Marge Bot
parent 6577d6c9f6
commit 6da54821da

View file

@ -73,9 +73,9 @@ kk_get_device_extensions(const struct kk_instance *instance,
.KHR_sampler_mirror_clamp_to_edge = false, .KHR_sampler_mirror_clamp_to_edge = false,
.KHR_separate_depth_stencil_layouts = true, .KHR_separate_depth_stencil_layouts = true,
.KHR_shader_atomic_int64 = false, .KHR_shader_atomic_int64 = false,
.KHR_shader_float_controls = true,
.KHR_shader_float16_int8 = .KHR_shader_float16_int8 =
false, /* TODO_KOSMICKRISP shaderInt8 shaderFloat16 */ false, /* TODO_KOSMICKRISP shaderInt8 shaderFloat16 */
.KHR_shader_float_controls = true,
.KHR_shader_subgroup_extended_types = true, .KHR_shader_subgroup_extended_types = true,
.KHR_spirv_1_4 = true, .KHR_spirv_1_4 = true,
.KHR_timeline_semaphore = true, .KHR_timeline_semaphore = true,
@ -116,22 +116,22 @@ kk_get_device_extensions(const struct kk_instance *instance,
/* Vulkan 1.4 */ /* Vulkan 1.4 */
.KHR_push_descriptor = true, .KHR_push_descriptor = true,
.KHR_shader_expect_assume = true,
/* Optional extensions */ /* Optional extensions */
.KHR_shader_maximal_reconvergence = true,
.KHR_shader_relaxed_extended_instruction = true,
.KHR_shader_subgroup_uniform_control_flow = true,
#ifdef KK_USE_WSI_PLATFORM #ifdef KK_USE_WSI_PLATFORM
.KHR_swapchain = true, .KHR_swapchain = true,
.KHR_swapchain_mutable_format = true, .KHR_swapchain_mutable_format = true,
#endif #endif
.EXT_external_memory_metal = true, .EXT_external_memory_metal = true,
.EXT_mutable_descriptor_type = true, .EXT_mutable_descriptor_type = true,
.EXT_shader_atomic_float = true, .EXT_shader_atomic_float = true,
.EXT_shader_replicated_composites = true, .EXT_shader_replicated_composites = true,
.KHR_shader_expect_assume = true,
.KHR_shader_maximal_reconvergence = true,
.KHR_shader_relaxed_extended_instruction = true,
.KHR_shader_subgroup_uniform_control_flow = true,
.GOOGLE_decorate_string = true, .GOOGLE_decorate_string = true,
.GOOGLE_hlsl_functionality1 = true, .GOOGLE_hlsl_functionality1 = true,
.GOOGLE_user_type = true, .GOOGLE_user_type = true,
@ -145,7 +145,6 @@ kk_get_device_features(
{ {
*features = (struct vk_features){ *features = (struct vk_features){
/* Vulkan 1.0 */ /* Vulkan 1.0 */
.robustBufferAccess = true,
.depthClamp = true, .depthClamp = true,
.drawIndirectFirstInstance = true, .drawIndirectFirstInstance = true,
.dualSrcBlend = true, .dualSrcBlend = true,
@ -158,9 +157,14 @@ kk_get_device_features(
.fragmentStoresAndAtomics = false, .fragmentStoresAndAtomics = false,
.imageCubeArray = true, .imageCubeArray = true,
.logicOp = true, .logicOp = true,
.robustBufferAccess = true,
.samplerAnisotropy = true,
.shaderInt16 = true, .shaderInt16 = true,
.shaderInt64 = true, .shaderInt64 = true,
.shaderResourceMinLod = true, .shaderResourceMinLod = true,
.shaderSampledImageArrayDynamicIndexing = true,
.shaderStorageBufferArrayDynamicIndexing = true,
.shaderStorageImageArrayDynamicIndexing = true,
/* TODO_KOSMICKRISP /* TODO_KOSMICKRISP
* Disabled because the following test * Disabled because the following test
* dEQP-VK.api.format_feature_flags2.r8_unorm and similars fail, need to * dEQP-VK.api.format_feature_flags2.r8_unorm and similars fail, need to
@ -170,19 +174,20 @@ kk_get_device_features(
.shaderStorageImageReadWithoutFormat = false, .shaderStorageImageReadWithoutFormat = false,
.shaderStorageImageWriteWithoutFormat = false, .shaderStorageImageWriteWithoutFormat = false,
.shaderUniformBufferArrayDynamicIndexing = true, .shaderUniformBufferArrayDynamicIndexing = true,
.shaderSampledImageArrayDynamicIndexing = true, .textureCompressionASTC_LDR = true,
.shaderStorageBufferArrayDynamicIndexing = true, .textureCompressionBC = true,
.shaderStorageImageArrayDynamicIndexing = true, .textureCompressionETC2 = true,
/* Vulkan 1.1 */ /* Vulkan 1.1 */
.multiview = true, .multiview = true,
.samplerYcbcrConversion = true,
.shaderDrawParameters = true, .shaderDrawParameters = true,
.storageBuffer16BitAccess = true, .storageBuffer16BitAccess = true,
.storageInputOutput16 = false, .storageInputOutput16 = false,
.storagePushConstant16 = true, .storagePushConstant16 = true,
.variablePointersStorageBuffer = true,
.variablePointers = true,
.uniformAndStorageBuffer16BitAccess = true, .uniformAndStorageBuffer16BitAccess = true,
.variablePointers = true,
.variablePointersStorageBuffer = true,
/* Vulkan 1.2 */ /* Vulkan 1.2 */
.descriptorBindingInlineUniformBlockUpdateAfterBind = true, .descriptorBindingInlineUniformBlockUpdateAfterBind = true,
@ -204,36 +209,25 @@ kk_get_device_features(
.separateDepthStencilLayouts = true, .separateDepthStencilLayouts = true,
/* TODO_KOSMICKRISP shaderFloat16 /* TODO_KOSMICKRISP shaderFloat16
* Failing: * Failing:
* dEQP-VK.spirv_assembly.instruction.compute.float16.opcompositeinsert.v4f16 * dEQP-VK.spirv_assembly.instruction.*.float16.opcompositeinsert.*
* dEQP-VK.spirv_assembly.instruction.compute.float16.opcompositeinsert.v2f16arr5 * dEQP-VK.memory_model.shared.16bit.nested_structs_arrays.*
* dEQP-VK.spirv_assembly.instruction.compute.float16.opcompositeinsert.v3f16arr5
* dEQP-VK.spirv_assembly.instruction.compute.float16.opcompositeinsert.v4f16arr3
* dEQP-VK.spirv_assembly.instruction.compute.float16.opcompositeinsert.struct16arr3
* dEQP-VK.spirv_assembly.instruction.graphics.float16.opcompositeinsert.v3f16_frag
* dEQP-VK.spirv_assembly.instruction.graphics.float16.opcompositeinsert.v4f16_frag
* dEQP-VK.spirv_assembly.instruction.graphics.float16.opcompositeinsert.v2f16arr5_frag
* dEQP-VK.spirv_assembly.instruction.graphics.float16.opcompositeinsert.v3f16arr5_frag
* dEQP-VK.spirv_assembly.instruction.graphics.float16.opcompositeinsert.v4f16arr3_frag
* dEQP-VK.spirv_assembly.instruction.graphics.float16.opcompositeinsert.struct16arr3_frag
* dEQP-VK.memory_model.shared.16bit.nested_structs_arrays.0
* dEQP-VK.memory_model.shared.16bit.nested_structs_arrays.4
*/ */
.shaderFloat16 = false, .shaderFloat16 = false,
.shaderInputAttachmentArrayDynamicIndexing = true, .shaderInputAttachmentArrayDynamicIndexing = true,
.shaderInputAttachmentArrayNonUniformIndexing = true, .shaderInputAttachmentArrayNonUniformIndexing = true,
/* TODO_KOSMICKRISP shaderInt8 /* TODO_KOSMICKRISP shaderInt8
* Multiple MSL compiler crashes if we enable shaderInt8, need to * Multiple MSL compiler crashes if we enable shaderInt8, need to
* understand why and a workaround: * understand why and a workaround:
* dEQP-VK.memory_model.shared.8bit.vector_types.9 * dEQP-VK.memory_model.shared.8bit.vector_types.9
* dEQP-VK.memory_model.shared.8bit.basic_types.8 * dEQP-VK.memory_model.shared.8bit.basic_types.8
* dEQP-VK.memory_model.shared.8bit.basic_arrays.2 * dEQP-VK.memory_model.shared.8bit.basic_arrays.2
* dEQP-VK.memory_model.shared.8bit.arrays_of_arrays.1 * dEQP-VK.memory_model.shared.8bit.arrays_of_arrays.1
* dEQP-VK.memory_model.shared.8bit.arrays_of_arrays.8 * dEQP-VK.memory_model.shared.8bit.arrays_of_arrays.8
* Probably more * Probably more
*/ */
.shaderInt8 = false, .shaderInt8 = false,
.shaderOutputViewportIndex = true,
.shaderOutputLayer = true, .shaderOutputLayer = true,
.shaderOutputViewportIndex = true,
.shaderSampledImageArrayNonUniformIndexing = true, .shaderSampledImageArrayNonUniformIndexing = true,
.shaderStorageBufferArrayNonUniformIndexing = true, .shaderStorageBufferArrayNonUniformIndexing = true,
.shaderStorageTexelBufferArrayDynamicIndexing = true, .shaderStorageTexelBufferArrayDynamicIndexing = true,
@ -265,13 +259,6 @@ kk_get_device_features(
.vulkanMemoryModel = true, .vulkanMemoryModel = true,
.vulkanMemoryModelDeviceScope = true, .vulkanMemoryModelDeviceScope = true,
/* Optional features */
.samplerAnisotropy = true,
.samplerYcbcrConversion = true,
.textureCompressionETC2 = true,
.textureCompressionASTC_LDR = true,
.textureCompressionBC = true,
/* VK_EXT_mutable_descriptor_type */ /* VK_EXT_mutable_descriptor_type */
.mutableDescriptorType = true, .mutableDescriptorType = true,
@ -293,7 +280,7 @@ kk_get_device_features(
/* VK_EXT_shader_atomic_float */ /* VK_EXT_shader_atomic_float */
.shaderBufferFloat32Atomics = true, .shaderBufferFloat32Atomics = true,
.shaderBufferFloat32AtomicAdd = true, .shaderBufferFloat32AtomicAdd = true,
.shaderSharedFloat32Atomics = true, .shaderSharedFloat32Atomics = true,
}; };
} }
@ -317,8 +304,8 @@ kk_get_device_properties(const struct kk_physical_device *pdev,
*properties = (struct vk_properties){ *properties = (struct vk_properties){
.apiVersion = kk_get_vk_version(), .apiVersion = kk_get_vk_version(),
.driverVersion = vk_get_driver_version(), .driverVersion = vk_get_driver_version(),
.vendorID = instance->force_vk_vendor != 0 ? instance->force_vk_vendor .vendorID =
: 0x106b, instance->force_vk_vendor != 0 ? instance->force_vk_vendor : 0x106b,
.deviceID = 100, .deviceID = 100,
.deviceType = VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU, .deviceType = VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU,