[Moving the thread from wayland-devel to mesa-dev]

On 2 March 2018 at 15:03, Chris Wilson <ch...@chris-wilson.co.uk> wrote:
> Quoting Emil Velikov (2018-03-02 14:52:28)
>> Hi Chris,
>>
>> On 1 March 2018 at 08:28, Chris Wilson <ch...@chris-wilson.co.uk> wrote:
>> > EGL_IMG_context_priority allows the client to request that their
>> > rendering be considered high priority. For ourselves, this is important
>> > as we are interactive and any delay in our rendering causes input-output
>>
>> > +       if (gr->has_context_priority) {
>> > +               EGLint value = EGL_CONTEXT_PRIORITY_MEDIUM_IMG;
>> > +
>> > +               eglQueryContext(gr->egl_display, gr->egl_context,
>> > +                               EGL_CONTEXT_PRIORITY_LEVEL_IMG, &value);
>> > +
>> > +               if (value != EGL_CONTEXT_PRIORITY_HIGH_IMG) {
>> > +                       weston_log("Failed to obtain a high priority 
>> > context.\n");
>> > +                       /* Not an error, continue on as normal */
>> > +               }
>> While this (and EGL spec) says "not an error" the i965 driver will
>> error out as the ioctl fails.
>
> The high priority attribute is filtered out from the allowed set of EGL
> attributes, so the request for a high priority context is silently
> converted back to normal. You don't get as far as hitting the ioctl.
>
I'm talking about the case where the initial calls to
brw_hw_context_set_priority() used to to get the mask succeed.
While a call to brw_hw_context_set_priority() while creating a context fails.

When and why that would happen, is an open question ;-)
Say, when 'too many' high priority contexts are created the i915 DRM
driver could bail on the set_param request?

Either way, I thought I point it out since it does come a bit strange.

-Emil

brwCreateContext(gl_api api,
                const struct gl_config *mesaVis,
                __DRIcontext *driContextPriv,
                const struct __DriverContextConfig *ctx_config,
                unsigned *dri_ctx_error,
                void *sharedContextPrivate)
{
...
     if (hw_priority != I915_CONTEXT_DEFAULT_PRIORITY &&
         brw_hw_context_set_priority(brw->bufmgr, brw->hw_ctx, hw_priority)) {
        fprintf(stderr,
                "Failed to set priority [%d:%d] for hardware context.\n",
                ctx_config->priority, hw_priority);
        intelDestroyContext(driContextPriv);
        return false;
     }
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to