• Home
  • Raw
  • Download

Lines Matching refs:options

40 bool ParseOptions(int argc, char* argv[], Options* options) {  in ParseOptions()  argument
44 options->instance = true; in ParseOptions()
46 options->device_index = 0; in ParseOptions()
55 int result = sscanf(arg2.c_str(), "%u", &options->device_index); in ParseOptions()
57 options->device_index = -1; in ParseOptions()
62 options->device_name = arg2; in ParseOptions()
64 options->output_file = arg2; in ParseOptions()
71 if (options->instance && (options->device_index != unsignedNegOne || in ParseOptions()
72 !options->device_name.empty())) { in ParseOptions()
77 if (options->device_index != unsignedNegOne && !options->device_name.empty()) { in ParseOptions()
82 if (options->instance && options->output_file.empty()) { in ParseOptions()
87 if (!options->output_file.empty() && !options->instance && in ParseOptions()
88 options->device_index == unsignedNegOne && options->device_name.empty()) { in ParseOptions()
97 bool Dump(const VkJsonInstance& instance, const Options& options) { in Dump() argument
99 if (options.device_index != unsignedNegOne) { in Dump()
100 if (static_cast<uint32_t>(options.device_index) >= in Dump()
102 std::cerr << "Error: device " << options.device_index in Dump()
107 out_device = &instance.devices[options.device_index]; in Dump()
108 } else if (!options.device_name.empty()) { in Dump()
110 if (device.properties.deviceName == options.device_name) { in Dump()
115 std::cerr << "Error: device '" << options.device_name in Dump()
122 if (options.output_file.empty()) { in Dump()
127 output_file = options.output_file; in Dump()
156 Options options; in main() local
157 if (!ParseOptions(argc, argv, &options)) in main()
161 if (options.instance || options.device_index != unsignedNegOne || in main()
162 !options.device_name.empty()) { in main()
163 Dump(instance, options); in main()
166 options.device_index = i; in main()
167 Dump(instance, options); in main()