MCPcopy Create free account
hub / github.com/SaschaWillems/VulkanCapsViewer / addPropertiesRow

Function addPropertiesRow

vulkanCapsViewer.cpp:1247–1324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1245}
1246
1247void addPropertiesRow(QStandardItem* parent, const QVariantMap::const_iterator& iterator)
1248{
1249 QString key = iterator.key();
1250
1251 if (vulkanResources::skipValueNames.contains(key)) {
1252 return;
1253 }
1254
1255 if (vulkanResources::boolValueNames.contains(key)) {
1256 addVkBool32Item(parent, iterator);
1257 return;
1258 };
1259 if (vulkanResources::sampleFlagsValueNames.contains(key)) {
1260 addVkSampleCountFlagsItem(parent, iterator);
1261 return;
1262 }
1263 if (vulkanResources::uuidValueNames.contains(key)) {
1264 addUUIDItem(parent, iterator);
1265 return;
1266 }
1267 if (vulkanResources::luidValueNames.contains(key)) {
1268 addLUIDItem(parent, iterator);
1269 return;
1270 }
1271 if (vulkanResources::hexValueNames.contains(key)) {
1272 addHexItem(parent, iterator);
1273 return;
1274 }
1275
1276 // This is marked deprecated in Qt6 and was causing all sorts of problems
1277 // if (iterator.value().canConvert(QVariant::List)) {
1278 // addVariantListItem(parent, iterator);
1279 // return;
1280 // }
1281 // In theory, the above could/should be replaced with this. However,
1282 // Qt6 seems ot have some stricker type rules, and this is turning QStrings
1283 // into lists. String is the fallthrough, at the bottom, and most things
1284 // can be turned into strings. Simply removing this fixes the string parsing
1285 // issue (many strings showing up as lists with comma's between each character.
1286 // Also... it appears to do no harm. The outuput is the same as with HWCaps viewer
1287 // build with Qt5. I'm leving this comment here for "posterity", and just in case
1288 // it turns out to be important down the road.
1289 // "The Road to Hell is Paved with Good Intentions" ;-)
1290 //if (iterator.value().canConvert<QVariantList>()) {
1291 // addVariantListItem(parent, iterator);
1292 // return;
1293 //}
1294
1295
1296
1297 if (key == "subgroupSupportedOperations") {
1298 const VkSubgroupFeatureFlags flags = iterator.value().toUInt();
1299 addBitFlagsItem(parent, iterator.key(), flags, vulkanResources::subgroupFeatureBitString);
1300 return;
1301 }
1302 if (key == "subgroupSupportedStages") {
1303 const VkShaderStageFlags flags = iterator.value().toUInt();
1304 addBitFlagsItem(parent, iterator.key(), flags, vulkanResources::shaderStagesBitString);

Callers 1

Calls 9

addVkBool32ItemFunction · 0.85
addUUIDItemFunction · 0.85
addLUIDItemFunction · 0.85
addHexItemFunction · 0.85
addBitFlagsItemFunction · 0.85
addTextItemFunction · 0.85

Tested by

no test coverage detected