mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-03-27 07:58:59 -04:00
render/vulkan: compile against vulkan 1.2 header
Uses the EXT version of VK_PIPELINE_COMPILE_REQUIRED in `vulkan_strerror` func since it requires Vulkan 1.3, switch to VK_EXT_global_priority instead of VK_KHR_global_priority which is only promoted to core in Vulkan 1.3 as well.
This commit is contained in:
parent
fd870f6d27
commit
413664e0b0
2 changed files with 7 additions and 7 deletions
|
|
@ -44,7 +44,7 @@ const char *vulkan_strerror(VkResult err) {
|
||||||
ERR_STR(ERROR_INVALID_EXTERNAL_HANDLE);
|
ERR_STR(ERROR_INVALID_EXTERNAL_HANDLE);
|
||||||
ERR_STR(ERROR_FRAGMENTATION);
|
ERR_STR(ERROR_FRAGMENTATION);
|
||||||
ERR_STR(ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS);
|
ERR_STR(ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS);
|
||||||
ERR_STR(PIPELINE_COMPILE_REQUIRED);
|
ERR_STR(PIPELINE_COMPILE_REQUIRED_EXT);
|
||||||
ERR_STR(ERROR_SURFACE_LOST_KHR);
|
ERR_STR(ERROR_SURFACE_LOST_KHR);
|
||||||
ERR_STR(ERROR_NATIVE_WINDOW_IN_USE_KHR);
|
ERR_STR(ERROR_NATIVE_WINDOW_IN_USE_KHR);
|
||||||
ERR_STR(SUBOPTIMAL_KHR);
|
ERR_STR(SUBOPTIMAL_KHR);
|
||||||
|
|
|
||||||
|
|
@ -556,17 +556,17 @@ struct wlr_vk_device *vulkan_device_create(struct wlr_vk_instance *ini,
|
||||||
.pQueuePriorities = &prio,
|
.pQueuePriorities = &prio,
|
||||||
};
|
};
|
||||||
|
|
||||||
VkDeviceQueueGlobalPriorityCreateInfoKHR global_priority;
|
VkDeviceQueueGlobalPriorityCreateInfoEXT global_priority;
|
||||||
bool has_global_priority = check_extension(avail_ext_props, avail_extc,
|
bool has_global_priority = check_extension(avail_ext_props, avail_extc,
|
||||||
VK_KHR_GLOBAL_PRIORITY_EXTENSION_NAME);
|
VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME);
|
||||||
if (has_global_priority) {
|
if (has_global_priority) {
|
||||||
// If global priorities are supported, request a high-priority context
|
// If global priorities are supported, request a high-priority context
|
||||||
global_priority = (VkDeviceQueueGlobalPriorityCreateInfoKHR){
|
global_priority = (VkDeviceQueueGlobalPriorityCreateInfoEXT){
|
||||||
.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR,
|
.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT,
|
||||||
.globalPriority = VK_QUEUE_GLOBAL_PRIORITY_HIGH_KHR,
|
.globalPriority = VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT,
|
||||||
};
|
};
|
||||||
qinfo.pNext = &global_priority;
|
qinfo.pNext = &global_priority;
|
||||||
extensions[extensions_len++] = VK_KHR_GLOBAL_PRIORITY_EXTENSION_NAME;
|
extensions[extensions_len++] = VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME;
|
||||||
wlr_log(WLR_DEBUG, "Requesting a high-priority device queue");
|
wlr_log(WLR_DEBUG, "Requesting a high-priority device queue");
|
||||||
} else {
|
} else {
|
||||||
wlr_log(WLR_DEBUG, "Global priorities are not supported, "
|
wlr_log(WLR_DEBUG, "Global priorities are not supported, "
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue