egl,dri: Propagate context priority hint to driver->CreateContext
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 27 Oct 2016 18:54:49 +0000 (19:54 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 20 Oct 2017 10:28:17 +0000 (11:28 +0100)
commit5c5618338a3cf27343d1420fb78daec4b176b0d3
treeb0d463625a6670128f1f01cdbf77a60d8a77ec9f
parent95ecf3df62372b5ba50d4b967994fff9464298ef
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>
16 files changed:
include/GL/internal/dri_interface.h
src/egl/drivers/dri2/egl_dri2.c
src/gallium/state_trackers/dri/dri_context.c
src/gallium/state_trackers/dri/dri_context.h
src/mesa/drivers/dri/common/dri_util.c
src/mesa/drivers/dri/common/dri_util.h
src/mesa/drivers/dri/i915/intel_screen.c
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/nouveau/nouveau_context.c
src/mesa/drivers/dri/nouveau/nouveau_context.h
src/mesa/drivers/dri/r200/r200_context.c
src/mesa/drivers/dri/r200/r200_context.h
src/mesa/drivers/dri/radeon/radeon_context.c
src/mesa/drivers/dri/radeon/radeon_context.h
src/mesa/drivers/dri/swrast/swrast.c