main sync #3

Merged
Patrick Busch merged 318 commits from blender/blender:main into main 2023-03-17 15:52:21 +01:00
Showing only changes of commit d21b9a4bb6 - Show all commits

View File

@ -401,13 +401,15 @@ static bool checkLayerSupport(vector<VkLayerProperties> &layers_available, const
static void enableLayer(vector<VkLayerProperties> &layers_available, static void enableLayer(vector<VkLayerProperties> &layers_available,
vector<const char *> &layers_enabled, vector<const char *> &layers_enabled,
const char *layer_name) const char *layer_name,
const bool debug)
{ {
if (checkLayerSupport(layers_available, layer_name)) { if (checkLayerSupport(layers_available, layer_name)) {
layers_enabled.push_back(layer_name); layers_enabled.push_back(layer_name);
} }
else { else if (debug) {
fprintf(stderr, "Error: %s not supported.\n", layer_name); fprintf(
stderr, "Warning: Layer requested, but not supported by the platform. [%s]\n", layer_name);
} }
} }
@ -862,7 +864,7 @@ GHOST_TSuccess GHOST_ContextVK::initializeDrawingContext()
vector<const char *> layers_enabled; vector<const char *> layers_enabled;
if (m_debug) { if (m_debug) {
enableLayer(layers_available, layers_enabled, "VK_LAYER_KHRONOS_validation"); enableLayer(layers_available, layers_enabled, "VK_LAYER_KHRONOS_validation", m_debug);
} }
vector<const char *> extensions_device; vector<const char *> extensions_device;