[Mesa-dev] [PATCH] anv: implement VK_EXT_global_priority extension

Tapani Pälli tapani.palli at intel.com
Fri Jan 19 11:05:22 UTC 2018



On 01/19/2018 01:00 PM, Chris Wilson wrote:
> Quoting Tapani Pälli (2018-01-19 10:44:49)
>> diff --git a/src/intel/vulkan/anv_gem.c b/src/intel/vulkan/anv_gem.c
>> index 34c0989108..46069dcdc7 100644
>> --- a/src/intel/vulkan/anv_gem.c
>> +++ b/src/intel/vulkan/anv_gem.c
>> @@ -302,6 +302,55 @@ close_and_return:
>>      return swizzled;
>>   }
>>   
>> +static int
>> +vk_priority_to_anv(int priority)
>> +{
>> +   switch (priority) {
>> +   case VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT:
>> +      return ANV_CONTEXT_LOW_PRIORITY;
>> +   case VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT:
>> +      return ANV_CONTEXT_MEDIUM_PRIORITY;
>> +   case VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT:
>> +      return ANV_CONTEXT_HIGH_PRIORITY;
>> +   case VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT:
> 
> /* We don't have a strict notion of RT (yet, and when we do it is likely
>   * to be more complicated than a mere priority value!), but we can give
>   * it the absolute most priority available to us. By convention, this
>   * is higher than any other client, except for blocked interactive
>   * clients.
>   */
> #define ANV_CONTEXT_RT_PRIORITY I915_CONTEXT_MAX_USER_PRIORITY
> 	return ANV_CONTEXT_RT_PRIORITY;

OK, will add this.

Thanks Chris!

// Tapani


More information about the mesa-dev mailing list