MCPcopy Create free account
hub / github.com/OpenNFS/OpenNFS / checkValidationLayerSupport

Method checkValidationLayerSupport

src/Renderer/vkRenderer.cpp:1045–1068  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1043}
1044
1045bool vkRenderer::checkValidationLayerSupport() {
1046 uint32_t layerCount;
1047 vkEnumerateInstanceLayerProperties(&layerCount, nullptr);
1048
1049 std::vector<VkLayerProperties> availableLayers(layerCount);
1050 vkEnumerateInstanceLayerProperties(&layerCount, availableLayers.data());
1051
1052 for (const char *layerName : validationLayers) {
1053 bool layerFound = false;
1054
1055 for (const auto &layerProperties : availableLayers) {
1056 if (strcmp(layerName, layerProperties.layerName) == 0) {
1057 layerFound = true;
1058 break;
1059 }
1060 }
1061
1062 if (!layerFound) {
1063 return false;
1064 }
1065 }
1066
1067 return true;
1068}
1069
1070static std::vector<char> readFile(const std::string &filename) {
1071 std::ifstream file(filename, std::ios::ate | std::ios::binary);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected