Hi Chris, On 11 April 2017 at 17:11, Chris Wilson <[email protected]> wrote: > Hook up the RendererQuery for __DRI2_RENDERER_HAS_CONTEXT_PRIORITY to > report the available DRM_I915_GEM_CONTEXT_SETPARAM options based on the > the default context. The kernel will valid the request to change > context, 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]> > --- > src/mesa/drivers/dri/i965/intel_screen.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/intel_screen.c > b/src/mesa/drivers/dri/i965/intel_screen.c > index 96e7a39863..cb0fb21193 100644 > --- a/src/mesa/drivers/dri/i965/intel_screen.c > +++ b/src/mesa/drivers/dri/i965/intel_screen.c > @@ -1007,6 +1007,16 @@ 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, 1) == 0) > + value[0] |= __DRI2_RENDERER_HAS_CONTEXT_PRIORITY_HIGH; > + if (brw_hw_context_set_priority(screen->bufmgr, 0, -1) == 0) > + value[0] |= __DRI2_RENDERER_HAS_CONTEXT_PRIORITY_LOW; With patch 3/4 we use ±1023/2 while here do ±1.
Should we use both same values in both places? Alternatively we might want a trivial comment explaining why. Either way, patch is Reviewed-by: Emil Velikov <[email protected]> -Emil _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
