@@ -736,6 +736,8 @@ bool VulkanCapsViewer::initVulkan()
736736 deviceProperties2Available = false ;
737737 QMessageBox::warning (this , tr (" Error" ), " Could not get function pointer for vkGetPhysicalDeviceProperties2KHR (even though extension is enabled!)\n New features and properties won't be displayed!" );
738738 }
739+ // These are optional and only required for certain extensions
740+ vulkanContext.vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR = reinterpret_cast <PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR>(vkGetInstanceProcAddr (vulkanContext.instance , " vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR" ));
739741 }
740742
741743 vulkanContext.vkGetPhysicalDeviceSurfaceSupportKHR = reinterpret_cast <PFN_vkGetPhysicalDeviceSurfaceSupportKHR>(vkGetInstanceProcAddr (vulkanContext.instance , " vkGetPhysicalDeviceSurfaceSupportKHR" ));
@@ -1101,6 +1103,15 @@ void addVkBool32Item(QStandardItem* parent, const QVariantMap::const_iterator& i
11011103 parent->appendRow (item);
11021104}
11031105
1106+ void addVkBool32Item (QStandardItem* parent, const QString& name, const bool value)
1107+ {
1108+ QList<QStandardItem*> item;
1109+ item << new QStandardItem (name);
1110+ item << new QStandardItem (value ? " true" : " false" );
1111+ item[1 ]->setForeground (value ? QColor::fromRgb (0 , 128 , 0 ) : QColor::fromRgb (255 , 0 , 0 ));
1112+ parent->appendRow (item);
1113+ }
1114+
11041115void addVkSampleCountFlagsItem (QStandardItem* parent, const QVariantMap::const_iterator& iterator)
11051116{
11061117 const auto samples = static_cast <VkSampleCountFlags>(iterator.value ().toUInt ());
@@ -1162,6 +1173,13 @@ void addHexItem(QStandardItem* parent, const QVariantMap::const_iterator& iterat
11621173 parent->appendRow (item);
11631174}
11641175
1176+ void addCaptionedRow (QStandardItem* parent, QString caption, QString value) {
1177+ QList<QStandardItem*> item;
1178+ item << new QStandardItem (caption);
1179+ item << new QStandardItem (value);
1180+ parent->appendRow (item);
1181+ }
1182+
11651183void addVariantListItem (QStandardItem* parent, const QVariantMap::const_iterator& iterator)
11661184{
11671185 QList<QStandardItem*> item;
@@ -1304,6 +1322,7 @@ void addExtensionPropertiesRow(QList<QStandardItem*> item, Property2 property)
13041322 }
13051323
13061324 if (property.value .canConvert (QVariant::List)) {
1325+ bool displayRawValue{ true };
13071326 if ((strcmp (property.extension , VK_EXT_HOST_IMAGE_COPY_EXTENSION_NAME) == 0 ) && ((property.name == " pCopySrcLayouts" ) || (property.name == " pCopyDstLayouts" ))) {
13081327 QList<QVariant> list = property.value .toList ();
13091328 for (auto i = 0 ; i < list.size (); i++) {
@@ -1312,7 +1331,28 @@ void addExtensionPropertiesRow(QList<QStandardItem*> item, Property2 property)
13121331 propertyItem.first ()->appendRow (formatItem);
13131332 }
13141333 }
1315- propertyItem << new QStandardItem (arrayToStr (property.value ));
1334+ if ((strcmp (property.extension , VK_KHR_COOPERATIVE_MATRIX_EXTENSION_NAME) == 0 ) && (property.name == " cooperativeMatrixProperties" )) {
1335+ QList<QVariant> list = property.value .toList ();
1336+ for (auto i = 0 ; i < list.size (); i++) {
1337+ QStandardItem* entryItem = new QStandardItem ();
1338+ QVariantList value = list[i].toList ();
1339+ entryItem->setText (" [" + QString::number (i) + " ]" );
1340+ addCaptionedRow (entryItem, " MSize" , value[0 ].toString ());
1341+ addCaptionedRow (entryItem, " NSize" , value[1 ].toString ());
1342+ addCaptionedRow (entryItem, " KSize" , value[2 ].toString ());
1343+ addCaptionedRow (entryItem, " AType" , vulkanResources::VkComponentTypeKHRString ((VkComponentTypeKHR)value[3 ].toInt ()));
1344+ addCaptionedRow (entryItem, " BType" , vulkanResources::VkComponentTypeKHRString ((VkComponentTypeKHR)value[4 ].toInt ()));
1345+ addCaptionedRow (entryItem, " CType" , vulkanResources::VkComponentTypeKHRString ((VkComponentTypeKHR)value[5 ].toInt ()));
1346+ addCaptionedRow (entryItem, " ResultType" , vulkanResources::VkComponentTypeKHRString ((VkComponentTypeKHR)value[6 ].toInt ()));
1347+ addVkBool32Item (entryItem," saturatingAccumulation" , value[7 ].toBool ());
1348+ addCaptionedRow (entryItem, " scope" , vulkanResources::VkScopeKHRString ((VkScopeKHR)value[8 ].toInt ()));
1349+ propertyItem.first ()->appendRow (entryItem);
1350+ }
1351+ displayRawValue = false ;
1352+ }
1353+ if (displayRawValue) {
1354+ propertyItem << new QStandardItem (arrayToStr (property.value ));
1355+ }
13161356 }
13171357 else {
13181358 switch (property.value .type ()) {
0 commit comments