icd: Add VK_KHR_cooperative_matrix support
authorspencer-lunarg <spencer@lunarg.com>
Tue, 4 Jul 2023 06:15:11 +0000 (15:15 +0900)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Tue, 4 Jul 2023 07:51:35 +0000 (01:51 -0600)
icd/generated/function_definitions.h
scripts/mock_icd_generator.py

index ae15173..3a0d02c 100644 (file)
@@ -3991,7 +3991,20 @@ static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCooperativeMatrixProperti
     uint32_t*                                   pPropertyCount,
     VkCooperativeMatrixPropertiesKHR*           pProperties)
 {
-//Not a CREATE or DESTROY function
+    if (!pProperties) {
+        *pPropertyCount = 1;
+    } else {
+        // arbitrary
+        pProperties[0].MSize = 16;
+        pProperties[0].NSize = 16;
+        pProperties[0].KSize = 16;
+        pProperties[0].AType = VK_COMPONENT_TYPE_UINT32_KHR;
+        pProperties[0].BType = VK_COMPONENT_TYPE_UINT32_KHR;
+        pProperties[0].CType = VK_COMPONENT_TYPE_UINT32_KHR;
+        pProperties[0].ResultType = VK_COMPONENT_TYPE_UINT32_KHR;
+        pProperties[0].saturatingAccumulation = VK_FALSE;
+        pProperties[0].scope = VK_SCOPE_DEVICE_KHR;
+    }
     return VK_SUCCESS;
 }
 
index b09abb8..687ee59 100644 (file)
@@ -921,6 +921,23 @@ CUSTOM_C_INTERCEPTS = {
     }
     return VK_SUCCESS;
 ''',
+'vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR': '''
+    if (!pProperties) {
+        *pPropertyCount = 1;
+    } else {
+        // arbitrary
+        pProperties[0].MSize = 16;
+        pProperties[0].NSize = 16;
+        pProperties[0].KSize = 16;
+        pProperties[0].AType = VK_COMPONENT_TYPE_UINT32_KHR;
+        pProperties[0].BType = VK_COMPONENT_TYPE_UINT32_KHR;
+        pProperties[0].CType = VK_COMPONENT_TYPE_UINT32_KHR;
+        pProperties[0].ResultType = VK_COMPONENT_TYPE_UINT32_KHR;
+        pProperties[0].saturatingAccumulation = VK_FALSE;
+        pProperties[0].scope = VK_SCOPE_DEVICE_KHR;
+    }
+    return VK_SUCCESS;
+''',
 'vkGetPhysicalDeviceVideoFormatPropertiesKHR': '''
     if (!pVideoFormatProperties) {
         *pVideoFormatPropertyCount = 2;