mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
render/vulkan: remove hardcoded validation layers
Users should use the VK_INSTANCE_LAYERS env var to set layers at runtime
This commit is contained in:
parent
1c4a625fe3
commit
f3ba14e491
2 changed files with 4 additions and 10 deletions
|
@ -1938,6 +1938,8 @@ error:
|
||||||
struct wlr_renderer *wlr_vk_renderer_create_with_drm_fd(int drm_fd) {
|
struct wlr_renderer *wlr_vk_renderer_create_with_drm_fd(int drm_fd) {
|
||||||
wlr_log(WLR_INFO, "The vulkan renderer is only experimental and "
|
wlr_log(WLR_INFO, "The vulkan renderer is only experimental and "
|
||||||
"not expected to be ready for daily use");
|
"not expected to be ready for daily use");
|
||||||
|
wlr_log(WLR_INFO, "Run with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation "
|
||||||
|
"to enable the validation layer");
|
||||||
|
|
||||||
// NOTE: we could add functionality to allow the compositor passing its
|
// NOTE: we could add functionality to allow the compositor passing its
|
||||||
// name and version to this function. Just use dummies until then,
|
// name and version to this function. Just use dummies until then,
|
||||||
|
|
|
@ -138,21 +138,13 @@ struct wlr_vk_instance *vulkan_instance_create(bool debug) {
|
||||||
.apiVersion = VK_API_VERSION_1_1,
|
.apiVersion = VK_API_VERSION_1_1,
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *layers[] = {
|
|
||||||
"VK_LAYER_KHRONOS_validation",
|
|
||||||
// "VK_LAYER_RENDERDOC_Capture",
|
|
||||||
// "VK_LAYER_live_introspection",
|
|
||||||
};
|
|
||||||
|
|
||||||
unsigned layer_count = debug * (sizeof(layers) / sizeof(layers[0]));
|
|
||||||
|
|
||||||
VkInstanceCreateInfo instance_info = {
|
VkInstanceCreateInfo instance_info = {
|
||||||
.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
|
.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
|
||||||
.pApplicationInfo = &application_info,
|
.pApplicationInfo = &application_info,
|
||||||
.enabledExtensionCount = extensions_len,
|
.enabledExtensionCount = extensions_len,
|
||||||
.ppEnabledExtensionNames = extensions,
|
.ppEnabledExtensionNames = extensions,
|
||||||
.enabledLayerCount = layer_count,
|
.enabledLayerCount = 0,
|
||||||
.ppEnabledLayerNames = layers,
|
.ppEnabledLayerNames = NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
VkDebugUtilsMessageSeverityFlagsEXT severity =
|
VkDebugUtilsMessageSeverityFlagsEXT severity =
|
||||||
|
|
Loading…
Reference in a new issue