| 226 | } |
| 227 | |
| 228 | void DumpSurface(Printer &p, AppInstance &inst, AppGpu &gpu, AppSurface &surface, std::set<std::string> surface_types) { |
| 229 | std::string surface_type_list_str = ""; |
| 230 | if (surface_types.size() > 0) { |
| 231 | surface_type_list_str = " ["; |
| 232 | bool is_first = true; |
| 233 | for (auto &name : surface_types) { |
| 234 | if (!is_first) { |
| 235 | surface_type_list_str += ", "; |
| 236 | } else { |
| 237 | is_first = false; |
| 238 | } |
| 239 | surface_type_list_str += name; |
| 240 | } |
| 241 | surface_type_list_str += "]"; |
| 242 | } |
| 243 | ObjectWrapper obj(p, std::string("GPU id : ") + p.DecorateAsValue(std::to_string(gpu.id)) + " (" + gpu.props.deviceName + ")" + |
| 244 | surface_type_list_str); |
| 245 | |
| 246 | if (surface_types.size() == 0) { |
| 247 | p.SetAsType().PrintKeyString("Surface type", "No type found"); |
| 248 | } else if (surface_types.size() == 1) { |
| 249 | p.SetAsType().PrintKeyString("Surface type", surface.surface_extension.name); |
| 250 | } else { |
| 251 | ArrayWrapper arr(p, "Surface types", surface_types.size()); |
| 252 | for (auto &name : surface_types) { |
| 253 | p.PrintString(name); |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | DumpSurfaceFormats(p, inst, surface); |
| 258 | DumpPresentModes(p, surface); |
| 259 | DumpSurfaceCapabilities(p, inst, gpu, surface); |
| 260 | |
| 261 | p.AddNewline(); |
| 262 | } |
| 263 | |
| 264 | struct SurfaceTypeGroup { |
| 265 | AppSurface *surface; |
no test coverage detected