.KHR_8bit_storage = true,
.KHR_16bit_storage = true,
.KHR_acceleration_structure = radv_enable_rt(device, false),
+ .KHR_cooperative_matrix = device->rad_info.gfx_level >= GFX11 && !device->use_llvm,
.KHR_bind_memory2 = true,
.KHR_buffer_device_address = true,
.KHR_copy_commands2 = true,
.deviceGeneratedCompute = true,
.deviceGeneratedComputePipelines = false,
.deviceGeneratedComputeCaptureReplay = false,
+
+ /* VK_KHR_cooperative_matrix */
+ .cooperativeMatrix = pdevice->rad_info.gfx_level >= GFX11 && !pdevice->use_llvm,
+ .cooperativeMatrixRobustBufferAccess = pdevice->rad_info.gfx_level >= GFX11 && !pdevice->use_llvm,
};
}
p->polygonModePointSize = true;
p->nonStrictSinglePixelWideLinesUseParallelogram = false;
p->nonStrictWideLinesUseParallelogram = false;
+
+ /* VK_KHR_cooperative_matrix */
+ p->cooperativeMatrixSupportedStages = VK_SHADER_STAGE_COMPUTE_BIT;
}
static VkResult
return vk_outarray_status(&out);
}
+
+VKAPI_ATTR VkResult VKAPI_CALL
+radv_GetPhysicalDeviceCooperativeMatrixPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t *pPropertyCount,
+ VkCooperativeMatrixPropertiesKHR *pProperties)
+{
+ VK_OUTARRAY_MAKE_TYPED(VkCooperativeMatrixPropertiesKHR, out, pProperties, pPropertyCount);
+
+ vk_outarray_append_typed(VkCooperativeMatrixPropertiesKHR, &out, p)
+ {
+ *p = (struct VkCooperativeMatrixPropertiesKHR){.sType = VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_KHR,
+ .MSize = 16,
+ .NSize = 16,
+ .KSize = 16,
+ .AType = VK_COMPONENT_TYPE_FLOAT16_KHR,
+ .BType = VK_COMPONENT_TYPE_FLOAT16_KHR,
+ .CType = VK_COMPONENT_TYPE_FLOAT16_KHR,
+ .ResultType = VK_COMPONENT_TYPE_FLOAT16_KHR,
+ .saturatingAccumulation = false,
+ .scope = VK_SCOPE_SUBGROUP_KHR};
+ }
+
+ vk_outarray_append_typed(VkCooperativeMatrixPropertiesKHR, &out, p)
+ {
+ *p = (struct VkCooperativeMatrixPropertiesKHR){.sType = VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_KHR,
+ .MSize = 16,
+ .NSize = 16,
+ .KSize = 16,
+ .AType = VK_COMPONENT_TYPE_FLOAT16_KHR,
+ .BType = VK_COMPONENT_TYPE_FLOAT16_KHR,
+ .CType = VK_COMPONENT_TYPE_FLOAT32_KHR,
+ .ResultType = VK_COMPONENT_TYPE_FLOAT32_KHR,
+ .saturatingAccumulation = false,
+ .scope = VK_SCOPE_SUBGROUP_KHR};
+ }
+
+ for (unsigned asigned = 0; asigned < 2; asigned++) {
+ for (unsigned bsigned = 0; bsigned < 2; bsigned++) {
+ for (unsigned csigned = 0; csigned < 2; csigned++) {
+ for (unsigned saturate = 0; saturate < 2; saturate++) {
+ if (!csigned && saturate)
+ continue; /* The HW only supports signed acc. */
+ vk_outarray_append_typed(VkCooperativeMatrixPropertiesKHR, &out, p)
+ {
+ *p = (struct VkCooperativeMatrixPropertiesKHR){
+ .sType = VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_PROPERTIES_KHR,
+ .MSize = 16,
+ .NSize = 16,
+ .KSize = 16,
+ .AType = asigned ? VK_COMPONENT_TYPE_SINT8_KHR : VK_COMPONENT_TYPE_UINT8_KHR,
+ .BType = bsigned ? VK_COMPONENT_TYPE_SINT8_KHR : VK_COMPONENT_TYPE_UINT8_KHR,
+ .CType = csigned ? VK_COMPONENT_TYPE_SINT32_KHR : VK_COMPONENT_TYPE_UINT32_KHR,
+ .ResultType = csigned ? VK_COMPONENT_TYPE_SINT32_KHR : VK_COMPONENT_TYPE_UINT32_KHR,
+ .saturatingAccumulation = saturate,
+ .scope = VK_SCOPE_SUBGROUP_KHR};
+ }
+ }
+ }
+ }
+ }
+
+ return vk_outarray_status(&out);
+}