-
Carlos Garnacho authored
Querying those once at screen setup time might yield the wrong results if there are EGLContexts being created at a separate thread with differing capabilities than the one calling eglInitialize(). There's two ways in which it may go wrong: - The eglCreateContext thread has capabilities, but the thread where eglInitialize was called did not: The priority will be silently ignored, despite the ioctl still being able to succeed there. - The eglInitialize thread had capabilities at the time of being called, but the eglCreateContext thread does not preserve them: The context will try to set the ioctl, but fail hard, and result on no context being created. This seems to go against EGL_IMG_context_priority extension. It seems a better way that would provide the right results on mixed threads with different capabilities is to query the allowed values at context creation time. At this moment we can still reset the user-set priority on failure (as future queries should return the assigned priority), and be sure that the value is handled relative to the calling thread. Also, drop a comment that no longer really applies after this change.
71d86223