case OutputType::text:
case OutputType::html: {
p.SetHeader();
- ArrayWrapper arr(p, "Layers", layers.size());
+ ArrayWrapper arr_layers(p, "Layers", layers.size());
IndentWrapper indent(p);
for (auto &layer : layers) {
ObjectWrapper obj(p, header);
DumpExtensions(p, "Layer", layer.extension_properties);
- ArrayWrapper arr(p, "Devices", gpus.size());
+ ArrayWrapper arr_devices(p, "Devices", gpus.size());
for (auto &gpu : gpus) {
p.PrintKeyValue("GPU id", gpu->id, 0, gpu->props.deviceName);
auto exts = gpu->AppGetPhysicalDeviceLayerExtensions(props.layerName);
DumpExtensions(p, "Layer", layer.extension_properties);
ObjectWrapper obj_devices(p, "Devices");
for (auto &gpu : gpus) {
- ObjectWrapper obj(p, gpu->props.deviceName);
+ ObjectWrapper obj_gpu(p, gpu->props.deviceName);
p.PrintKeyValue("GPU id", gpu->id, 0, gpu->props.deviceName);
auto exts = gpu->AppGetPhysicalDeviceLayerExtensions(layer.layer_properties.layerName);
DumpExtensions(p, "Layer-Device", exts);
}
p.SetHeader();
- ObjectWrapper obj(p, "Device Groups");
+ ObjectWrapper obj_device_groups(p, "Device Groups");
IndentWrapper indent(p);
int group_id = 0;
for (auto &group : groups) {
- ObjectWrapper obj(p, "Group " + std::to_string(group_id));
+ ObjectWrapper obj_group(p, "Group " + std::to_string(group_id));
auto group_props = GetGroupProps(inst, group);
{
- ObjectWrapper obj(p, "Properties");
+ ObjectWrapper obj_properties(p, "Properties");
{
ArrayWrapper arr(p, "physicalDevices", group.physicalDeviceCount);
int id = 0;
p.PrintKeyString("Present Capabilities",
"Group does not support VK_KHR_device_group, skipping printing present capabilities");
} else {
- ObjectWrapper obj(p, "Present Capabilities");
+ ObjectWrapper obj_caps(p, "Present Capabilities");
for (uint32_t i = 0; i < group.physicalDeviceCount; i++) {
- ObjectWrapper obj(
+ ObjectWrapper obj_device(
p, std::string(group_props[i].deviceName) + " (ID: " + p.DecorateAsValue(std::to_string(i)) + ")");
ArrayWrapper arr(p, "Can present images from the following devices", group.physicalDeviceCount);
void GpuDumpQueueProps(Printer &p, std::vector<SurfaceExtension> &surfaces, const AppQueueFamilyProperties &queue) {
VkQueueFamilyProperties props = queue.props;
p.SetSubHeader().SetElementIndex(static_cast<int>(queue.queue_index));
- ObjectWrapper obj(p, "queueProperties");
+ ObjectWrapper obj_queue_props(p, "queueProperties");
if (p.Type() == OutputType::vkconfig_output) {
DumpVkExtent3D(p, "minImageTransferGranularity", props.minImageTransferGranularity);
} else {
for (auto &surface : surfaces) {
if (surface.name.size() > width) width = surface.name.size();
}
- ObjectWrapper obj(p, "present support");
+ ObjectWrapper obj_present_support(p, "present support");
for (auto &surface : surfaces) {
p.PrintKeyString(surface.name, surface.supports_present ? "true" : "false", width);
}
void GpuDumpMemoryProps(Printer &p, AppGpu &gpu) {
p.SetHeader();
- ObjectWrapper obj(p, "VkPhysicalDeviceMemoryProperties");
+ ObjectWrapper obj_mem_props(p, "VkPhysicalDeviceMemoryProperties");
IndentWrapper indent(p);
{
- ObjectWrapper obj(p, "memoryHeaps", gpu.memory_props.memoryHeapCount);
+ ObjectWrapper obj_mem_heaps(p, "memoryHeaps", gpu.memory_props.memoryHeapCount);
for (uint32_t i = 0; i < gpu.memory_props.memoryHeapCount; ++i) {
p.SetElementIndex(static_cast<int>(i));
- ObjectWrapper obj(p, "memoryHeaps");
+ ObjectWrapper obj_mem_heap(p, "memoryHeaps");
p.PrintKeyString("size", append_human_readible(gpu.memory_props.memoryHeaps[i].size), 6);
if (gpu.CheckPhysicalDeviceExtensionIncluded(VK_EXT_MEMORY_BUDGET_EXTENSION_NAME)) {
}
}
{
- ObjectWrapper obj(p, "memoryTypes", gpu.memory_props.memoryTypeCount);
+ ObjectWrapper obj_mem_types(p, "memoryTypes", gpu.memory_props.memoryTypeCount);
for (uint32_t i = 0; i < gpu.memory_props.memoryTypeCount; ++i) {
p.SetElementIndex(static_cast<int>(i));
- ObjectWrapper obj(p, "memoryTypes");
+ ObjectWrapper obj_mem_type(p, "memoryTypes");
p.PrintKeyValue("heapIndex", gpu.memory_props.memoryTypes[i].heapIndex, 13);
auto flags = gpu.memory_props.memoryTypes[i].propertyFlags;
// only linear and optimal tiling considered
for (auto &image_tiling : gpu.memory_image_support_types) {
p.SetOpenDetails();
- ArrayWrapper arr(p, VkImageTilingString(VkImageTiling(image_tiling.tiling)), -1);
+ ArrayWrapper arr(p, VkImageTilingString(VkImageTiling(image_tiling.tiling)), 0);
bool has_any_support_types = false;
bool regular = false;
bool transient = false;
}
void GpuDumpMemoryPropsJson(Printer &p, AppGpu &gpu) {
- ObjectWrapper obj(p, "VkPhysicalDeviceMemoryProperties");
+ ObjectWrapper obj_mem_props(p, "VkPhysicalDeviceMemoryProperties");
{
ArrayWrapper arr(p, "memoryHeaps", gpu.memory_props.memoryHeapCount);
for (uint32_t i = 0; i < gpu.memory_props.memoryHeapCount; ++i) {
void GpuDevDump(Printer &p, AppGpu &gpu) {
p.SetHeader();
- ObjectWrapper obj(p, "Format Properties");
- IndentWrapper indent(p);
+ ObjectWrapper obj_format_props(p, "Format Properties");
+ IndentWrapper indent_outer(p);
if (p.Type() == OutputType::text) {
auto fmtPropMap = FormatPropMap(gpu);
}
p.SetElementIndex(counter++);
- ObjectWrapper obj(p, "Common Format Group");
- IndentWrapper indent(p);
+ ObjectWrapper obj_common_group(p, "Common Format Group");
+ IndentWrapper indent_inner(p);
{
- ArrayWrapper arr(p, "Formats", prop.second.size());
+ ArrayWrapper arr_formats(p, "Formats", prop.second.size());
for (auto &fmt : prop.second) {
p.SetAsType().PrintString(VkFormatString(fmt));
}
p.AddNewline();
}
- ArrayWrapper arr(p, "Unsupported Formats", unsupported_formats.size());
+ ArrayWrapper arr_unsupported_formats(p, "Unsupported Formats", unsupported_formats.size());
for (auto &fmt : unsupported_formats) {
p.SetAsType().PrintString(VkFormatString(fmt));
}
// Print gpu info for text, html, & vkconfig_output
// Uses a seperate function than schema-json for clarity
void DumpGpu(Printer &p, AppGpu &gpu, bool show_formats) {
- ObjectWrapper obj(p, "GPU" + std::to_string(gpu.id));
+ ObjectWrapper obj_gpu(p, "GPU" + std::to_string(gpu.id));
IndentWrapper indent(p);
GpuDumpProps(p, gpu);
p.AddNewline();
{
p.SetHeader();
- ObjectWrapper obj(p, "VkQueueFamilyProperties");
+ ObjectWrapper obj_family_props(p, "VkQueueFamilyProperties");
for (const auto &queue_prop : gpu.extended_queue_props) {
GpuDumpQueueProps(p, gpu.inst.surface_extensions, queue_prop);
}
while (place) {
struct VkStructureHeader *structure = (struct VkStructureHeader *)place;
if (structure->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES) {
- VkPhysicalDeviceDriverProperties *props = (VkPhysicalDeviceDriverProperties *)structure;
- DumpVkDriverId(p, "driverID", props->driverID, 18);
- p.PrintKeyString("driverName", props->driverName, 18);
- p.PrintKeyString("driverInfo", props->driverInfo, 18);
- DumpVkConformanceVersion(p, "conformanceVersion", props->conformanceVersion, 18);
+ VkPhysicalDeviceDriverProperties *driver_props = (VkPhysicalDeviceDriverProperties *)structure;
+ DumpVkDriverId(p, "driverID", driver_props->driverID, 18);
+ p.PrintKeyString("driverName", driver_props->driverName, 18);
+ p.PrintKeyString("driverInfo", driver_props->driverInfo, 18);
+ DumpVkConformanceVersion(p, "conformanceVersion", driver_props->conformanceVersion, 18);
}
place = structure->pNext;
}