MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-ValidationLayers / SetLocalEnableSetting

Function SetLocalEnableSetting

layers/layer_options.cpp:418–439  ·  view source on GitHub ↗

Given a string representation of a list of enable enum values, call the appropriate setter function

Source from the content-addressed store, hash-verified

416
417// Given a string representation of a list of enable enum values, call the appropriate setter function
418bool SetLocalEnableSetting(std::string list_of_enabled, const std::string& delimiter, ValidationEnabled& enabled) {
419 bool used = false;
420 size_t pos = 0;
421 std::string token;
422 while (list_of_enabled.length() != 0) {
423 token = GetNextToken(&list_of_enabled, delimiter, &pos);
424 if (token.find("VK_VALIDATION_FEATURE_ENABLE_") != std::string::npos) {
425 auto result = VkValFeatureEnableLookup().find(token);
426 if (result != VkValFeatureEnableLookup().end()) {
427 used = true;
428 SetValidationFeatureEnable(enabled, result->second);
429 }
430 } else if (token.find("VALIDATION_CHECK_ENABLE_") != std::string::npos) {
431 auto result = ValidationEnableLookup().find(token);
432 if (result != ValidationEnableLookup().end()) {
433 used = true;
434 SetValidationEnable(enabled, result->second);
435 }
436 }
437 }
438 return used;
439}
440
441// Given a string representation of a list of disable enum values, call the appropriate setter function
442bool SetLocalDisableSetting(std::string list_of_disabled, const std::string& delimiter, ValidationDisabled& disabled) {

Callers 1

Calls 6

GetNextTokenFunction · 0.85
SetValidationEnableFunction · 0.85
lengthMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected