On 07/06/2018 08:45 AM, Adam Jackson wrote: > On Fri, 2018-07-06 at 10:29 +0100, Emil Velikov wrote: > >> Skimming through the egl_khr_create_context text, this relaxes some >> parts which are meant to be an error. >> For example >> >> * If either of <draw> or <read> is a valid surface and the other >> is EGL_NO_SURFACE, an EGL_BAD_MATCH error is generated. > > That seems like an invariant EGL promises for the driver, not something > the driver validates. eglMakeCurrent already says: > > if ((!draw_surf && draw != EGL_NO_SURFACE) || > (!read_surf && read != EGL_NO_SURFACE)) > RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE); > > glXMakeCurrent doesn't seem to have code to generate an error in that > case, anymore. The server would throw an error for the GLXMakeCurrent > request, but we don't always emit those for... bad reasons. Regardless > I'd say that check belongs in MakeContextCurrent, not the driver.
That is how we have typically divided up work. The libEGL / libGLX layer handles the API validation, and the driver tries not to crash. :) > - ajax > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev