[Mesa-dev] [PATCH 4/4] radeon: Determine the bo priority (MSAA, depth, UVD are high)

Andreas Hartmetz ahartmetz at gmail.com
Wed Jan 1 20:57:46 PST 2014


On Wednesday 01 January 2014 16:58:46 Lauri Kasanen wrote:

>
> @@ -257,6 +258,7 @@ struct radeon_winsys {
>                                         unsigned size,
>                                         unsigned alignment,
>                                         boolean use_reusable_pool,
> +                                       boolean high_prio,
>                                         enum radeon_bo_domain domain);
> 
>      struct radeon_winsys_cs_handle *(*buffer_get_cs_handle)(

Something I have learned about schedulers is that binary priorities
are not a good deal. They kind of encourage special case hacks and
two code paths, they can do less than numeric priorities, and they
are not significantly easier to implement if you want to do it
correctly. This is not exactly a scheduler, but it seems similar
enough.
So I think a numeric value and >= 3 priorities would be better here,
then you could also start assigning priority by things like buffer size
or really any heuristic that can produce some number. Even such
heuristics are easier to write when you don't need to limit the result
to true / false.



More information about the mesa-dev mailing list