diff --git a/src/intel/vulkan/anv_physical_device.c b/src/intel/vulkan/anv_physical_device.c index 98ab979e568..6f5d47dda4b 100644 --- a/src/intel/vulkan/anv_physical_device.c +++ b/src/intel/vulkan/anv_physical_device.c @@ -3030,11 +3030,11 @@ void anv_GetPhysicalDeviceQueueFamilyProperties2( (VkQueueFamilyGlobalPriorityPropertiesKHR *)ext; /* Deliberately sorted low to high */ - VkQueueGlobalPriorityKHR all_priorities[] = { - VK_QUEUE_GLOBAL_PRIORITY_LOW_KHR, - VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR, - VK_QUEUE_GLOBAL_PRIORITY_HIGH_KHR, - VK_QUEUE_GLOBAL_PRIORITY_REALTIME_KHR, + VkQueueGlobalPriority all_priorities[] = { + VK_QUEUE_GLOBAL_PRIORITY_LOW, + VK_QUEUE_GLOBAL_PRIORITY_MEDIUM, + VK_QUEUE_GLOBAL_PRIORITY_HIGH, + VK_QUEUE_GLOBAL_PRIORITY_REALTIME, }; uint32_t count = 0; diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index d57715a7f86..6fb20836071 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -1513,7 +1513,7 @@ struct anv_physical_device { * end. */ uint32_t n_perf_query_commands; - VkQueueGlobalPriorityKHR max_context_priority; + VkQueueGlobalPriority max_context_priority; uint64_t gtt_size; uint64_t page_size; diff --git a/src/intel/vulkan/i915/anv_device.c b/src/intel/vulkan/i915/anv_device.c index f5ed23595c2..c0ce6fa83d6 100644 --- a/src/intel/vulkan/i915/anv_device.c +++ b/src/intel/vulkan/i915/anv_device.c @@ -30,16 +30,16 @@ #include "drm-uapi/i915_drm.h" static int -vk_priority_to_i915(VkQueueGlobalPriorityKHR priority) +vk_priority_to_i915(VkQueueGlobalPriority priority) { switch (priority) { - case VK_QUEUE_GLOBAL_PRIORITY_LOW_KHR: + case VK_QUEUE_GLOBAL_PRIORITY_LOW: return INTEL_CONTEXT_LOW_PRIORITY; - case VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR: + case VK_QUEUE_GLOBAL_PRIORITY_MEDIUM: return INTEL_CONTEXT_MEDIUM_PRIORITY; - case VK_QUEUE_GLOBAL_PRIORITY_HIGH_KHR: + case VK_QUEUE_GLOBAL_PRIORITY_HIGH: return INTEL_CONTEXT_HIGH_PRIORITY; - case VK_QUEUE_GLOBAL_PRIORITY_REALTIME_KHR: + case VK_QUEUE_GLOBAL_PRIORITY_REALTIME: return INTEL_CONTEXT_REALTIME_PRIORITY; default: UNREACHABLE("Invalid priority"); @@ -59,7 +59,7 @@ anv_gem_set_context_param(int fd, uint32_t context, uint32_t param, uint64_t val } static bool -anv_gem_has_context_priority(int fd, VkQueueGlobalPriorityKHR priority) +anv_gem_has_context_priority(int fd, VkQueueGlobalPriority priority) { return !anv_gem_set_context_param(fd, 0, I915_CONTEXT_PARAM_PRIORITY, priority); @@ -128,13 +128,13 @@ anv_i915_physical_device_get_parameters(struct anv_physical_device *device) } /* Start with medium; sorted low to high */ - const VkQueueGlobalPriorityKHR priorities[] = { - VK_QUEUE_GLOBAL_PRIORITY_LOW_KHR, - VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR, - VK_QUEUE_GLOBAL_PRIORITY_HIGH_KHR, - VK_QUEUE_GLOBAL_PRIORITY_REALTIME_KHR, + const VkQueueGlobalPriority priorities[] = { + VK_QUEUE_GLOBAL_PRIORITY_LOW, + VK_QUEUE_GLOBAL_PRIORITY_MEDIUM, + VK_QUEUE_GLOBAL_PRIORITY_HIGH, + VK_QUEUE_GLOBAL_PRIORITY_REALTIME, }; - device->max_context_priority = VK_QUEUE_GLOBAL_PRIORITY_LOW_KHR; + device->max_context_priority = VK_QUEUE_GLOBAL_PRIORITY_LOW; for (unsigned i = 0; i < ARRAY_SIZE(priorities); i++) { if (!anv_gem_has_context_priority(fd, priorities[i])) break; @@ -230,7 +230,7 @@ VkResult anv_i915_set_queue_parameters( struct anv_device *device, uint32_t context_id, - const VkDeviceQueueGlobalPriorityCreateInfoKHR *queue_priority) + const VkDeviceQueueGlobalPriorityCreateInfo *queue_priority) { struct anv_physical_device *physical_device = device->physical; @@ -243,9 +243,9 @@ anv_i915_set_queue_parameters( anv_gem_set_context_param(device->fd, context_id, I915_CONTEXT_PARAM_RECOVERABLE, false); - VkQueueGlobalPriorityKHR priority = + VkQueueGlobalPriority priority = queue_priority ? queue_priority->globalPriority : - VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR; + VK_QUEUE_GLOBAL_PRIORITY_MEDIUM; /* As per spec, the driver implementation may deny requests to acquire * a priority above the default priority (MEDIUM) if the caller does not @@ -316,10 +316,10 @@ anv_i915_device_setup_context(struct anv_device *device, return result; /* Check if client specified queue priority. */ - const VkDeviceQueueGlobalPriorityCreateInfoKHR *queue_priority = + const VkDeviceQueueGlobalPriorityCreateInfo *queue_priority = num_queues == 0 ? NULL : vk_find_struct_const(pCreateInfo->pQueueCreateInfos[0].pNext, - DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR); + DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO); result = anv_i915_set_queue_parameters(device, device->context_id, queue_priority); diff --git a/src/intel/vulkan/i915/anv_device.h b/src/intel/vulkan/i915/anv_device.h index 0d871a41199..e05cf636de8 100644 --- a/src/intel/vulkan/i915/anv_device.h +++ b/src/intel/vulkan/i915/anv_device.h @@ -44,4 +44,4 @@ VkResult anv_i915_device_setup_vm(struct anv_device *device); VkResult anv_i915_set_queue_parameters( struct anv_device *device, uint32_t context_id, - const VkDeviceQueueGlobalPriorityCreateInfoKHR *queue_priority); + const VkDeviceQueueGlobalPriorityCreateInfo *queue_priority); diff --git a/src/intel/vulkan/i915/anv_queue.c b/src/intel/vulkan/i915/anv_queue.c index 274f8321bf7..97961cdbe2e 100644 --- a/src/intel/vulkan/i915/anv_queue.c +++ b/src/intel/vulkan/i915/anv_queue.c @@ -94,9 +94,9 @@ anv_i915_create_engine(struct anv_device *device, } /* Check if client specified queue priority. */ - const VkDeviceQueueGlobalPriorityCreateInfoKHR *queue_priority = + const VkDeviceQueueGlobalPriorityCreateInfo *queue_priority = vk_find_struct_const(pCreateInfo->pNext, - DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR); + DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO); VkResult result = anv_i915_set_queue_parameters(device, queue->context_id, diff --git a/src/intel/vulkan/xe/anv_device.c b/src/intel/vulkan/xe/anv_device.c index 82374adbc3c..ff113cf4ca6 100644 --- a/src/intel/vulkan/xe/anv_device.c +++ b/src/intel/vulkan/xe/anv_device.c @@ -62,19 +62,19 @@ VkResult anv_xe_device_setup_vm(struct anv_device *device) return VK_SUCCESS; } -static VkQueueGlobalPriorityKHR +static VkQueueGlobalPriority drm_sched_priority_to_vk_priority(enum drm_sched_priority drm_sched_priority) { switch (drm_sched_priority) { case DRM_SCHED_PRIORITY_MIN: - return VK_QUEUE_GLOBAL_PRIORITY_LOW_KHR; + return VK_QUEUE_GLOBAL_PRIORITY_LOW; case DRM_SCHED_PRIORITY_NORMAL: - return VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR; + return VK_QUEUE_GLOBAL_PRIORITY_MEDIUM; case DRM_SCHED_PRIORITY_HIGH: - return VK_QUEUE_GLOBAL_PRIORITY_HIGH_KHR; + return VK_QUEUE_GLOBAL_PRIORITY_HIGH; default: UNREACHABLE("Invalid drm_sched_priority"); - return VK_QUEUE_GLOBAL_PRIORITY_LOW_KHR; + return VK_QUEUE_GLOBAL_PRIORITY_LOW; } } diff --git a/src/intel/vulkan/xe/anv_queue.c b/src/intel/vulkan/xe/anv_queue.c index 7449af7f248..72c9eb9373d 100644 --- a/src/intel/vulkan/xe/anv_queue.c +++ b/src/intel/vulkan/xe/anv_queue.c @@ -35,14 +35,14 @@ #include "drm-uapi/gpu_scheduler.h" static enum drm_sched_priority -anv_vk_priority_to_drm_sched_priority(VkQueueGlobalPriorityKHR vk_priority) +anv_vk_priority_to_drm_sched_priority(VkQueueGlobalPriority vk_priority) { switch (vk_priority) { - case VK_QUEUE_GLOBAL_PRIORITY_LOW_KHR: + case VK_QUEUE_GLOBAL_PRIORITY_LOW: return DRM_SCHED_PRIORITY_MIN; - case VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR: + case VK_QUEUE_GLOBAL_PRIORITY_MEDIUM: return DRM_SCHED_PRIORITY_NORMAL; - case VK_QUEUE_GLOBAL_PRIORITY_HIGH_KHR: + case VK_QUEUE_GLOBAL_PRIORITY_HIGH: return DRM_SCHED_PRIORITY_HIGH; default: UNREACHABLE("Invalid priority"); @@ -75,19 +75,19 @@ create_engine(struct anv_device *device, &physical->queue.families[queue_family_index]; const struct intel_query_engine_info *engines = physical->engine_info; struct drm_xe_engine_class_instance *instances; - const VkDeviceQueueGlobalPriorityCreateInfoKHR *queue_priority = + const VkDeviceQueueGlobalPriorityCreateInfo *queue_priority = vk_find_struct_const(pCreateInfo->pNext, - DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR); - const VkQueueGlobalPriorityKHR priority = queue_priority ? - queue_priority->globalPriority : - VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR; + DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO); + const VkQueueGlobalPriority priority = queue_priority ? + queue_priority->globalPriority : + VK_QUEUE_GLOBAL_PRIORITY_MEDIUM; /* As per spec, the driver implementation may deny requests to acquire * a priority above the default priority (MEDIUM) if the caller does not * have sufficient privileges. In this scenario VK_ERROR_NOT_PERMITTED_KHR * is returned. */ - if (physical->max_context_priority >= VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR) { + if (physical->max_context_priority >= VK_QUEUE_GLOBAL_PRIORITY_MEDIUM) { if (priority > physical->max_context_priority) return vk_error(device, VK_ERROR_NOT_PERMITTED_KHR); }