On 11 April 2017 at 17:11, Chris Wilson <ch...@chris-wilson.co.uk> wrote:
> Jump through the layers of abstraction between egl and dri in order to
> feed the context priority attribute through to the backend. This
> requires us to read the value from the base _egl_context, convert it to
> a DRI attribute, parse it again in the generic context creator before
> passing it to the driver as a function parameter.
>
> In order to not require us to pass back the actual value of the context
> priority after creation, we impose that drivers should report the
> available set of priorities during screen setup (and then they may chose
> to fail if given an invalid value as that should have been checked at
> the user boundary.)
>
> Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
> ---
>  include/GL/internal/dri_interface.h            |  6 ++++
>  src/egl/drivers/dri2/egl_dri2.c                | 38 
> +++++++++++++++++++++-----
>  src/gallium/state_trackers/dri/dri_context.c   |  1 +
>  src/gallium/state_trackers/dri/dri_context.h   |  1 +
>  src/mesa/drivers/dri/common/dri_util.c         |  7 ++++-
>  src/mesa/drivers/dri/common/dri_util.h         |  9 +++---
>  src/mesa/drivers/dri/i915/intel_screen.c       | 11 ++++----
>  src/mesa/drivers/dri/i965/brw_context.c        |  7 +++--
>  src/mesa/drivers/dri/i965/brw_context.h        | 17 ++++++------
>  src/mesa/drivers/dri/nouveau/nouveau_context.c |  1 +
>  src/mesa/drivers/dri/nouveau/nouveau_context.h |  4 +--
>  src/mesa/drivers/dri/r200/r200_context.c       |  1 +
>  src/mesa/drivers/dri/r200/r200_context.h       |  1 +
>  src/mesa/drivers/dri/radeon/radeon_context.c   |  1 +
>  src/mesa/drivers/dri/radeon/radeon_context.h   |  1 +
>  src/mesa/drivers/dri/swrast/swrast.c           |  1 +
>  16 files changed, 77 insertions(+), 30 deletions(-)
>
> diff --git a/include/GL/internal/dri_interface.h 
> b/include/GL/internal/dri_interface.h
> index 9881ddcbb0..969d304a95 100644
> --- a/include/GL/internal/dri_interface.h
> +++ b/include/GL/internal/dri_interface.h
> @@ -1056,6 +1056,12 @@ struct __DRIdri2LoaderExtensionRec {
>  #define __DRI_CTX_RESET_LOSE_CONTEXT           1
>  /*@}*/
>
> +#define __DRI_CTX_ATTRIB_PRIORITY              4
> +
> +#define __DRI_CTX_PRIORITY_LOW                 0
> +#define __DRI_CTX_PRIORITY_MEDIUM              1
> +#define __DRI_CTX_PRIORITY_HIGH                        2
> +
Second Ben's question here - reuse the HAS_CTX_PRIO defines if you prefer.
Either way
Reviewed-by: Emil Velikov <emil.veli...@collabora.com>

As the series lands please add a note to docs/relnotes/17.1.0.html
(push it directly)

Thanks
Emil
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to