<div dir="ltr"><div></div><div dir="ltr"><div dir="ltr"><div></div><div class="gmail_quote"><div>Hi all,</div><div>Thanks Adam for your interest in this.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> +New Tokens<br>
> +<br>
> +    Accepted as an <attribute> in EGLQueryRendererIntegerMESA and<br>
> +    EGLQueryCurrentRendererIntegerMESA:<br>
> +<br>
> +        EGL_RENDERER_VENDOR_ID_MESA                      0xXXXX<br>
> +        EGL_RENDERER_DEVICE_ID_MESA                      0xXXXX<br></blockquote><div> </div><div>except the above 2 tokens we aren't using any tokens in adriconf(<a href="https://github.com/jlHertel/adriconf/blob/master/DRIQuery.cpp#L46" target="_blank">https://github.com/jlHertel/adriconf/blob/master/DRIQuery.cpp#L46</a>) If we don't need all the below ones, I'll remove them. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> +        EGL_RENDERER_VERSION_MESA                        0xXXXX<br>
> +        EGL_RENDERER_ACCELERATED_MESA                    0xXXXX<br>
> +        EGL_RENDERER_VIDEO_MEMORY_MESA                   0xXXXX<br>
> +        EGL_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA    0xXXXX<br>
> +        EGL_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA    0xXXXX<br>
> +        EGL_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA    0xXXXX<br>
> + <br><br>
<br>
Normally these are reserved by creating a request against the EGL<br>
registry on github. However we happen to have a block of 16 enum values<br>
already reserved:<br>
<br>
>     <enums namespace="EGL" start="0x3290" end="0x329F" vendor="MESA" comment="Reserved for John K&#229;re Alsaker (Public bug 757)"><br>
>             <unused start="0x3290" end="0x329F"/><br>
>     </enums><br>
<br>
That "public bug 757" is for the abandoned EGL_MESA_image_sRGB<br>
extension:<br>
<br>
<a href="https://www.khronos.org/bugzilla/show_bug.cgi?id=757" rel="noreferrer" target="_blank">https://www.khronos.org/bugzilla/show_bug.cgi?id=757</a><br>
<br>
So I think it's safe to use enums from that range, and we'll still have<br>
two free. </blockquote><div>I'll assign these, once we finalize all the tokens.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> +        Bool EGLQueryRendererIntegerMESA(EGLDisplay *dpy, int screen, int renderer,<br>
> +                                         int attribute, unsigned int *value);<br></blockquote><div><a class="gmail_plusreply" id="m_-6649530580003263178gmail-plusReplyChip-0" href="mailto:nicolai.haehnle@amd.com" target="_blank">@Nicolai Hähnle</a> , <a class="gmail_plusreply" id="m_-6649530580003263178gmail-plusReplyChip-1" href="mailto:robdclark@gmail.com" target="_blank">@Rob Clark</a> </div><div>we are using only this queryRenderInteger function in adriconf. The rest 3 funcions can be exempted??</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
The corresponding eglQueryCurrentRendererIntegerMESA is not documented.<br>
I'm not entirely sure it should even exist, to be honest; I'd prefer if<br>
these attributes were instead newly legal values to pass to<br>
eglQueryContext. Too late to make that change for GLX I suppose.<br></blockquote><div> </div><div>What is the difference between EGLContext and EGLSurface?</div><div> <br></div><div>If you look at the usage of query fun in adriocnf(<a href="https://github.com/jlHertel/adriconf/blob/master/DRIQuery.cpp#L43" target="_blank">https://github.com/jlHertel/adriconf/blob/master/DRIQuery.cpp#L43</a>). we are iterating with all the available screens. In Wayland do we need to iterate through contexts?? </div><div><a class="gmail_plusreply" id="m_-6649530580003263178plusReplyChip-2" href="mailto:jean.hertel@hotmail.com" target="_blank">@Jean Hertel</a> In the above provided link, why are we passing 3rd argument(renderer) as 0 for all the screens?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> +    [Add to section section 3.3.7 "Rendering Contexts"]<br>
> +<br>
> +    The attribute name EGL_RENDERER_ID_MESA specified the index of the render<br>
> +    against which the context should be created.  The default value of<br>
> +    EGL_RENDERER_ID_MESA is 0.<br>
<br>
This startled me to read, I didn't think GLX_MESA_query_renderer had<br>
this. Turns out it does have this text in the extension spec, but the<br>
functionality is not actually implemented. Worse, there's no way to<br>
enumerate how many renderers a display (or display/screen in GLX) has.<br>
<br>
To address this, I would:<br>
<br>
1) Remove this text from both GLX and EGL extension specs<br>
   (Both here and above where the enums are listed)<br>
2) Update both specs with an explicit way to enumerate renderers<br>
   (probably something like "if renderer is -1 and the attribute is<br>
   XXX_RENDERER_COUNT_MESA, return one integer")<br>
3) Add a layered extension to add this functionality to CreateContext<br>
<br>
#2 and #3 are optional, I suppose. Probably it's better to have only<br>
one way to do that, and in EGL that way is probably using the EGL<br>
device extensions instead. But GLX doesn't have anything like that, so<br>
this functionality might make sense there.<br><br></blockquote><div><br></div><div>Thanks,</div><div>Veluri. </div></div></div></div><br></div>