MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Tools / PrintKeyString

Method PrintKeyString

vulkaninfo/outputprinter.h:556–574  ·  view source on GitHub ↗

For printing key - string pairs (necessary because of json)

Source from the content-addressed store, hash-verified

554
555 // For printing key - string pairs (necessary because of json)
556 void PrintKeyString(std::string key, std::string value) {
557 switch (output_type) {
558 case (OutputType::text):
559 case (OutputType::html):
560 PrintKeyValue(key, value);
561 break;
562 case (OutputType::json):
563 case (OutputType::vkconfig_output):
564 if (!value_description.empty()) {
565 // PrintKeyValue adds the necessary quotes when printing with a value description set
566 PrintKeyValue(key, EscapeJSONCString(value));
567 } else {
568 PrintKeyValue(key, std::string("\"") + EscapeJSONCString(value) + "\"");
569 }
570 break;
571 default:
572 break;
573 }
574 }
575
576 // For printing key - string pairs (necessary because of json)
577 void PrintKeyBool(std::string key, bool value) { PrintKeyValue(key, value ? "true" : "false"); }

Callers 15

DumpLayersFunction · 0.80
DumpSurfaceFunction · 0.80
DumpGroupsFunction · 0.80
GpuDumpPropsFunction · 0.80
GpuDumpQueuePropsFunction · 0.80
GpuDumpMemoryPropsFunction · 0.80
GpuDumpDisplayPlanesFunction · 0.80
PrintProfileBaseInfoFunction · 0.80
DumpSummaryGPUFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected