On Thu, 2018-11-08 at 02:42 +0530, Veluri Mithun wrote: > Hi all, > Thanks Adam for your interest in this. > > > > +New Tokens > > > + > > > + Accepted as an <attribute> in EGLQueryRendererIntegerMESA and > > > + EGLQueryCurrentRendererIntegerMESA: > > > + > > > + EGL_RENDERER_VENDOR_ID_MESA 0xXXXX > > > + EGL_RENDERER_DEVICE_ID_MESA 0xXXXX > > > except the above 2 tokens we aren't using any tokens in adriconf( > https://github.com/jlHertel/adriconf/blob/master/DRIQuery.cpp#L46) If > we don't need all the below ones, I'll remove them.
adriconf is not the only user of GLX_MESA_query_renderer. glxinfo uses it and prints everything it can query, eglinfo would probably want to do likewise. > > The corresponding eglQueryCurrentRendererIntegerMESA is not documented. > > I'm not entirely sure it should even exist, to be honest; I'd prefer if > > these attributes were instead newly legal values to pass to > > eglQueryContext. Too late to make that change for GLX I suppose. > > What is the difference between EGLContext and EGLSurface? Surfaces are window-system objects you can draw to. Contexts are objects that describe how you'll draw (shader pipeline, blend modes, etc.) The "current renderer" is the renderer associated with the current context. Which means a call like: eglQueryCurrentRendererIntegerMESA(EGL_RENDERER_VERSION_MESA, &value); Would be equivalent to: eglQueryContext(eglGetCurrentDisplay(), eglGetCurrentContext(), EGL_RENDERER_VERSION_MESA, &value); Which is why I said QueryCurrentRendererInteger is redundant. The other three are not redundant. > If you look at the usage of query fun in adriocnf( > https://github.com/jlHertel/adriconf/blob/master/DRIQuery.cpp#L43). > we are iterating with all the available screens. In Wayland do we > need to iterate through contexts?? No; the question doesn't really make sense. GLX has screens only because X11 has screens, they're sub-objects of the display. An EGLDisplay corresponds to an X11 display+screen combination, so there's nothing to iterate over. Contexts aren't pre-existing objects like screens, they're things the application explicitly creates. Notice that adriconf does not create a context at all. This is sort of the point of GLX_MESA_query_renderer: most of the information it supplies _could_ be discovered by querying an existing context, but you'd rather know what kind of context you _can_ create before you do it. > @Jean Hertel In the above provided link, why are we passing 3rd > argument(renderer) as 0 for all the screens? As I said in my previous email: the GLX extension spec claims to allow multiple renderers for a given display (and even to force a binding to a particular one at creation time), but Mesa does not in fact implement that, and it would be a difficult feature to use in any case because there's no way to query how many renderers a display+screen actually has. - ajax _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev