Lines Matching refs:options
43 bool ParseOptions(int argc, char* argv[], Options* options) { in ParseOptions() argument
47 options->instance = true; in ParseOptions()
49 options->device_index = 0; in ParseOptions()
58 int result = sscanf(arg2.c_str(), "%u", &options->device_index); in ParseOptions()
60 options->device_index = static_cast<uint32_t>(-1); in ParseOptions()
65 options->device_name = arg2; in ParseOptions()
67 options->output_file = arg2; in ParseOptions()
74 if (options->instance && (options->device_index != unsignedNegOne || in ParseOptions()
75 !options->device_name.empty())) { in ParseOptions()
80 if (options->device_index != unsignedNegOne && !options->device_name.empty()) { in ParseOptions()
85 if (options->instance && options->output_file.empty()) { in ParseOptions()
90 if (!options->output_file.empty() && !options->instance && in ParseOptions()
91 options->device_index == unsignedNegOne && options->device_name.empty()) { in ParseOptions()
100 bool Dump(const VkJsonInstance& instance, const Options& options) { in Dump() argument
102 if (options.device_index != unsignedNegOne) { in Dump()
103 if (static_cast<uint32_t>(options.device_index) >= in Dump()
105 std::cerr << "Error: device " << options.device_index in Dump()
110 out_device = &instance.devices[options.device_index]; in Dump()
111 } else if (!options.device_name.empty()) { in Dump()
113 if (device.properties.deviceName == options.device_name) { in Dump()
118 std::cerr << "Error: device '" << options.device_name in Dump()
125 if (options.output_file.empty()) { in Dump()
134 output_file = options.output_file; in Dump()
168 Options options; in main() local
169 if (!ParseOptions(argc, argv, &options)) in main()
173 if (options.instance || options.device_index != unsignedNegOne || in main()
174 !options.device_name.empty()) { in main()
175 Dump(instance, options); in main()
178 options.device_index = i; in main()
179 Dump(instance, options); in main()