diff options
author | Chris Wilson <[email protected]> | 2016-10-27 19:34:46 +0100 |
---|---|---|
committer | Chris Wilson <[email protected]> | 2017-10-20 11:28:17 +0100 |
commit | 95ecf3df62372b5ba50d4b967994fff9464298ef (patch) | |
tree | 037dad8e0033cdc58af98c1e257aaca9cacb068f /src/egl/main/egldisplay.h | |
parent | e2053b8e3d45af48f35973ddb55993353b597753 (diff) |
egl: Support IMG_context_priority
IMG_context_priority
https://www.khronos.org/registry/egl/extensions/IMG/EGL_IMG_context_priority.txt
"This extension allows an EGLContext to be created with a priority
hint. It is possible that an implementation will not honour the
hint, especially if there are constraints on the number of high
priority contexts available in the system, or system policy limits
access to high priority contexts to appropriate system privilege
level. A query is provided to find the real priority level assigned
to the context after creation."
The extension adds a new eglCreateContext attribute for choosing a
priority hint. This stub parses the attribute and copies into the base
struct _egl_context, and hooks up the query similarly.
Since the attribute is purely a hint, I have no qualms about the lack of
implementation before reporting back the value the user gave!
v2: Remember to set the default ContextPriority value to medium.
v3: Use the driRendererQuery interface to probe the backend for
supported priority values and use those to mask the EGL interface.
v4: Treat the priority attrib as a hint and gracefully mask any requests
not supported by the driver, the EGLContext will remain at medium
priority.
Signed-off-by: Chris Wilson <[email protected]>
Cc: Rob Clark <[email protected]>
Reviewed-by: Ben Widawsky <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/egl/main/egldisplay.h')
-rw-r--r-- | src/egl/main/egldisplay.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h index da5339b7bf9..952bfe53f00 100644 --- a/src/egl/main/egldisplay.h +++ b/src/egl/main/egldisplay.h @@ -105,6 +105,11 @@ struct _egl_extensions EGLBoolean EXT_image_dma_buf_import_modifiers; EGLBoolean EXT_swap_buffers_with_damage; + unsigned int IMG_context_priority; +#define __EGL_CONTEXT_PRIORITY_LOW_BIT 0 +#define __EGL_CONTEXT_PRIORITY_MEDIUM_BIT 1 +#define __EGL_CONTEXT_PRIORITY_HIGH_BIT 2 + EGLBoolean KHR_cl_event2; EGLBoolean KHR_config_attribs; EGLBoolean KHR_create_context; |