radv: Expose VK_EXT_global_priority
authorAndres Rodriguez <andresx7@gmail.com>
Fri, 20 Oct 2017 22:02:16 +0000 (18:02 -0400)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fri, 20 Oct 2017 23:01:44 +0000 (01:01 +0200)
Expose the extension string as supported

Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/common/ac_gpu_info.c
src/amd/common/ac_gpu_info.h
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_extensions.py

index 82ff18d4366f5b08916d2f017ad0531dbbce4233..2e5601255083d0cf871597310421a114a8dade10 100644 (file)
@@ -270,6 +270,7 @@ bool ac_query_gpu_info(int fd, amdgpu_device_handle dev,
        info->has_userptr = true;
        info->has_syncobj = has_syncobj(fd);
        info->has_sync_file = info->has_syncobj && info->drm_minor >= 21;
+       info->has_ctx_priority = info->drm_minor >= 22;
        info->num_render_backends = amdinfo->rb_pipes;
        info->clock_crystal_freq = amdinfo->gpu_counter_freq;
        if (!info->clock_crystal_freq) {
index 960fd74fcf04b12b86f69f676ee89dcf0f015f2f..92c94f046b53d44ded1ca43c974bc53cbd2c9d5a 100644 (file)
@@ -82,6 +82,7 @@ struct radeon_info {
        bool                        has_userptr;
        bool                        has_syncobj;
        bool                        has_sync_file;
+       bool                        has_ctx_priority;
 
        /* Shader cores. */
        uint32_t                    r600_max_quad_pipes; /* wave size / 16 */
index 307d5579573c2445527cfcd589cadee165c1cdb9..3748d51488f64a848602b46e16e596f50de84575 100644 (file)
@@ -989,6 +989,8 @@ VkResult radv_CreateDevice(
                const VkDeviceQueueGlobalPriorityCreateInfoEXT *global_priority =
                        vk_find_struct_const(queue_create->pNext, DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT);
 
+               assert(!global_priority || device->physical_device->rad_info.has_ctx_priority);
+
                device->queues[qfi] = vk_alloc(&device->alloc,
                                               queue_create->queueCount * sizeof(struct radv_queue), 8, VK_SYSTEM_ALLOCATION_SCOPE_DEVICE);
                if (!device->queues[qfi]) {
index cde91085b55edc77aacbf2d302c0ec6cc094a4a6..dfeb2880fc25bd1e96f379579a2c494a55da5bd9 100644 (file)
@@ -78,6 +78,7 @@ EXTENSIONS = [
     Extension('VK_KHR_xlib_surface',                      6, 'VK_USE_PLATFORM_XLIB_KHR'),
     Extension('VK_KHX_multiview',                         1, True),
     Extension('VK_EXT_debug_report',                      8, True),
+    Extension('VK_EXT_global_priority',                   1, 'device->rad_info.has_ctx_priority'),
     Extension('VK_AMD_draw_indirect_count',               1, True),
     Extension('VK_AMD_rasterization_order',               1, 'device->rad_info.chip_class >= VI && device->rad_info.max_se >= 2'),
 ]