Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

render/vulkan: get only available validation layers #3318

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bl4ckb0ne
Copy link
Contributor

Fixes #3283

/cc @nyorain

@bl4ckb0ne bl4ckb0ne force-pushed the vk_optional_layers branch 2 times, most recently from 9372b1e to 176db99 Compare October 31, 2021 02:43
render/vulkan/vulkan.c Outdated Show resolved Hide resolved
render/vulkan/vulkan.c Show resolved Hide resolved
render/vulkan/vulkan.c Show resolved Hide resolved
@nyorain
Copy link
Contributor

nyorain commented Oct 31, 2021

This only addresses the layer availability part of #3283. When people really start using the Vulkan renderer, they probably want to run it without the validation layer and so we should offer an option to not enable it (even though I don't think it should be the default yet). Note that currently we consider the debug parameter passed to vulkan_instance_create for layer_count, your change ignores it and always forces the layers when they are available.
With the comments addressed, I'd still be in favor of merging this, we can think about explicitly disabling the layers later on.

@emersion
Copy link
Member

When the Vulkan renderer is deemed production-ready, we can remove all of this code: people can always enable it again with VK_INSTANCE_LAYERS.

@bl4ckb0ne
Copy link
Contributor Author

We could do two iterations of the validation layers, first one to enable them if present, then another one to enable them on demand. I tried to do a bit of both here but it's not very good. I'll rework the patch with your feedback @nyorain and I'll open a new issue for WLR_VK_INSTANCE_LAYERS to do later.

@bl4ckb0ne bl4ckb0ne force-pushed the vk_optional_layers branch 2 times, most recently from e2c5ee3 to 205e575 Compare October 31, 2021 20:32
render/vulkan/vulkan.c Outdated Show resolved Hide resolved
@emersion
Copy link
Member

emersion commented Nov 1, 2021

wlroots has migrated to gitlab.freedesktop.org. This pull request has been moved to:

https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3318

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

vulkan: Remove hard dependency on validation layer
3 participants