MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / processArgs

Method processArgs

tests/loadtests/vkloadtests/InstancedSampleBase.cpp:218–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216//===================================================================
217
218void
219InstancedSampleBase::processArgs(std::string sArgs)
220{
221 // Options descriptor
222 struct argparser::option longopts[] = {
223 {"external", argparser::option::no_argument, &externalFile, 1},
224 {"linear-tiling", argparser::option::no_argument, (int*)&tiling, (int)vk::ImageTiling::eLinear},
225 {NULL, argparser::option::no_argument, NULL, 0}
226 };
227
228 argvector argv(sArgs);
229 argparser ap(argv);
230
231 int ch;
232 while ((ch = ap.getopt(nullptr, longopts, nullptr)) != -1) {
233 switch (ch) {
234 case 0: break;
235 default: assert(false); // Error in args in sample table.
236 }
237 }
238 assert(ap.optind < argv.size());
239 ktxfilename = argv[ap.optind];
240}
241
242/* ------------------------------------------------------------------------- */
243

Callers

nothing calls this directly

Calls 3

assertFunction · 0.85
getoptMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected