MCPcopy Create free account
hub / github.com/android/ndk-samples / checkValidationLayerSupport

Method checkValidationLayerSupport

hello-vulkan/app/src/main/cpp/hellovk.h:651–672  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

649}
650
651bool HelloVK::checkValidationLayerSupport() {
652 uint32_t layerCount;
653 vkEnumerateInstanceLayerProperties(&layerCount, nullptr);
654
655 std::vector<VkLayerProperties> availableLayers(layerCount);
656 vkEnumerateInstanceLayerProperties(&layerCount, availableLayers.data());
657
658 for (const char* layerName : validationLayers) {
659 bool layerFound = false;
660 for (const auto& layerProperties : availableLayers) {
661 if (strcmp(layerName, layerProperties.layerName) == 0) {
662 layerFound = true;
663 break;
664 }
665 }
666
667 if (!layerFound) {
668 return false;
669 }
670 }
671 return true;
672}
673
674std::vector<const char*> HelloVK::getRequiredExtensions(
675 bool enableValidationLayers) {

Callers

nothing calls this directly

Calls 1

dataMethod · 0.80

Tested by

no test coverage detected