| 1043 | } |
| 1044 | |
| 1045 | bool 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 | |
| 1070 | static std::vector<char> readFile(const std::string &filename) { |
| 1071 | std::ifstream file(filename, std::ios::ate | std::ios::binary); |
nothing calls this directly
no outgoing calls
no test coverage detected