anv: Don't enumerate cooperative matrix configurations if disabled

Instead of asserting, let's simply not enumerate any configuration if
cooperative matrix is disabled.  This can happen for example when
neither systolic nor software lowering is being used.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39728>
This commit is contained in:
Caio Oliveira 2026-02-05 18:12:03 -08:00 committed by Marge Bot
parent 1a7fa4974d
commit ab8fef23e6

View file

@ -3321,10 +3321,11 @@ VkResult anv_GetPhysicalDeviceCooperativeMatrixPropertiesKHR(
ANV_FROM_HANDLE(anv_physical_device, pdevice, physicalDevice);
const struct intel_device_info *devinfo = &pdevice->info;
assert(anv_has_cooperative_matrix(pdevice));
VK_OUTARRAY_MAKE_TYPED(VkCooperativeMatrixPropertiesKHR, out, pProperties, pPropertyCount);
if (!anv_has_cooperative_matrix(pdevice))
return vk_outarray_status(&out);
for (int i = 0; i < ARRAY_SIZE(devinfo->cooperative_matrix_configurations); i++) {
const struct intel_cooperative_matrix_configuration *cfg =
&devinfo->cooperative_matrix_configurations[i];