summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-10-27 19:54:49 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2017-10-20 11:28:17 +0100
commit5c5618338a3cf27343d1420fb78daec4b176b0d3 (patch)
treeb0d463625a6670128f1f01cdbf77a60d8a77ec9f /include
parent95ecf3df62372b5ba50d4b967994fff9464298ef (diff)
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 <chris@chris-wilson.co.uk> Acked-by: Ben Widawsky <ben@bwidawsk.net> # i915/i965 Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'include')
-rw-r--r--include/GL/internal/dri_interface.h6
1 files changed, 6 insertions, 0 deletions
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
*/