diff options
author | Chris Wilson <[email protected]> | 2017-04-11 16:17:36 +0100 |
---|---|---|
committer | Chris Wilson <[email protected]> | 2017-10-20 11:28:17 +0100 |
commit | f72392231b227f2d08d1dc73cb590f41ffc32492 (patch) | |
tree | af5089e105f8dd09ed3ed2b3a4f9abb74e90d801 /src/mesa | |
parent | 1617fca6d12e418e02d18733dd0d1964c7ecbda9 (diff) |
i965: Report supported context priorities to EGL/DRI
Hook up the RendererQuery for __DRI2_RENDERER_HAS_CONTEXT_PRIORITY to
report the available DRM_I915_GEM_CONTEXT_SETPARAM options based on the
per-client default context. The kernel will validate the request to change
the property, so we get an accurate reflection of available support
(based on kernel version and privilege) and we should only have to do it
once during screen setup -- although the SETPARAM should be fast, they
are still an ioctl each.
Signed-off-by: Chris Wilson <[email protected]>
Cc: Kenneth Graunke <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_screen.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index 28e83cf9b21..5975b91a766 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -1371,6 +1371,19 @@ brw_query_renderer_integer(__DRIscreen *dri_screen, case __DRI2_RENDERER_HAS_TEXTURE_3D: value[0] = 1; return 0; + case __DRI2_RENDERER_HAS_CONTEXT_PRIORITY: + value[0] = 0; + if (brw_hw_context_set_priority(screen->bufmgr, + 0, BRW_CONTEXT_HIGH_PRIORITY) == 0) + value[0] |= __DRI2_RENDERER_HAS_CONTEXT_PRIORITY_HIGH; + if (brw_hw_context_set_priority(screen->bufmgr, + 0, BRW_CONTEXT_LOW_PRIORITY) == 0) + value[0] |= __DRI2_RENDERER_HAS_CONTEXT_PRIORITY_LOW; + /* reset to default last, just in case */ + if (brw_hw_context_set_priority(screen->bufmgr, + 0, BRW_CONTEXT_MEDIUM_PRIORITY) == 0) + value[0] |= __DRI2_RENDERER_HAS_CONTEXT_PRIORITY_MEDIUM; + return 0; default: return driQueryRendererIntegerCommon(dri_screen, param, value); } |