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

Function SetLocalDisableSetting

layers/layer_options.cpp:442–463  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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) {
443 bool used = false;
444 size_t pos = 0;
445 std::string token;
446 while (list_of_disabled.length() != 0) {
447 token = GetNextToken(&list_of_disabled, delimiter, &pos);
448 if (token.find("VK_VALIDATION_FEATURE_DISABLE_") != std::string::npos) {
449 auto result = VkValFeatureDisableLookup().find(token);
450 if (result != VkValFeatureDisableLookup().end()) {
451 SetValidationFeatureDisable(disabled, result->second);
452 used = true;
453 }
454 } else if (token.find("VALIDATION_CHECK_DISABLE_") != std::string::npos) {
455 auto result = ValidationDisableLookup().find(token);
456 if (result != ValidationDisableLookup().end()) {
457 SetValidationDisable(disabled, result->second);
458 used = true;
459 }
460 }
461 }
462 return used;
463}
464
465uint32_t TokenToUint(const std::string& token) {
466 uint32_t int_id = 0;

Callers 1

Calls 6

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

Tested by

no test coverage detected