From 5c5618338a3cf27343d1420fb78daec4b176b0d3 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 27 Oct 2016 19:54:49 +0100 Subject: egl,dri: Propagate context priority hint to driver->CreateContext 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 Acked-by: Ben Widawsky # i915/i965 Reviewed-by: Emil Velikov Reviewed-by: Eric Engestrom Reviewed-by: Kenneth Graunke --- include/GL/internal/dri_interface.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/GL/internal/dri_interface.h') diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index 7ed0169a984..98402eae057 100644 --- a/include/GL/internal/dri_interface.h +++ b/include/GL/internal/dri_interface.h @@ -1100,6 +1100,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 + /** * \name Reasons that __DRIdri2Extension::createContextAttribs might fail */ -- cgit v1.2.3