<br><br><div class="gmail_quote">2013/1/5 Ian Romanick <span dir="ltr"><<a href="mailto:idr@freedesktop.org" target="_blank">idr@freedesktop.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 12/05/2012 04:17 AM, Tomasz Lis wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2012/12/4 Jon TURNEY <<a href="mailto:jon.turney@dronecode.org.uk" target="_blank">jon.turney@dronecode.org.uk</a><br>
<mailto:<a href="mailto:jon.turney@dronecode.org.uk" target="_blank">jon.turney@dronecode.<u></u>org.uk</a>>><div class="im"><br>
<br>
On 04/12/2012 15:28, Tomasz Lis wrote:<br>
> These are not all the changes, sorry for that.<br>
><br>
> It seems I don't know how to correctly re-send the patch.<br>
><br>
> 2012/12/4 <<a href="mailto:listom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" target="_blank">listom-<u></u>Re5JQEeQqe8AvxtiuMwx3w@public.<u></u>gmane.org</a><br></div>
<mailto:<a href="mailto:listom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" target="_blank">listom-<u></u>Re5JQEeQqe8AvxtiuMwx3w@public.<u></u>gmane.org</a>>><br>
><br>
>> From: Tomasz Lis<br>
<<a href="mailto:tomasz.lis-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org" target="_blank">tomasz.lis-<u></u>ral2JQCrhuEAvxtiuMwx3w@public.<u></u>gmane.org</a><br>
<mailto:<a href="mailto:tomasz.lis-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org" target="_blank">tomasz.lis-<u></u>ral2JQCrhuEAvxtiuMwx3w@public.<u></u>gmane.org</a>>><div class="im"><br>
>><br>
>> Changes to correctly initialize the sRGB capability attribute and<br>
>> transfer it between XServer and the client. Modifications include<br>
>> extension string, transferring visual config attribs and fbconfig<br>
>> attribs. Also, attribute is initialized in the modules which do not<br>
>> really use it (xquartz and xwin).<br>
>> This version advertises both ARB and EXT strings, and initializes<br>
>> the capability to default value of FALSE.<br>
<br>
Your updated patch doesn't seem to address idr's comment that you<br>
must not<br>
send the GLX_FRAMEBUFFER_SRGB_CAPABLE_<u></u>EXT token to clients that don't<br>
understand it.<br>
<br>
I am not sure of the mechanism for a client to indicate this<br>
understanding.<br>
<br>
This is true, the issue isn't closed yet.<br>
Please refer to the discussion over previous version of the patch. It<br>
ended with me asking:<br>
<br>
Do you still think we need a change here? Do you think we should filter<br>
whole configs, or only attributes within configs?<br>
Do you have a concept on how to implement it?<br>
This seem to be a big issue, maybe we could commit the changes as they<br>
are, and then think about a solution?<br>
</div></blockquote>
<br>
I looked into this a bit more. The problem is that without GLX_ARB_create_context, the client doesn't tell the server what extensions it supports. That effectively makes it impossible to do this checking without that extension.<br>
<br>
Since Mesa already supports that extension, I think it's okay to rely on it. However, we currently just drop the client's GLX extension list after receiving it. We'll have to keep track of it (probably by converting the strings to flags, as is done with GL extensions).<br>
<br>
I believe we should take the following steps.<br>
<br>
1. For configs that have the default value, do not send the extension attribute to the client. This allows the client to just drop configs that contain unknown attributes. This also means that some "padding" attributes will have to be inserted so that every config has the same number of attributes.<br>
<br>
2. Modify Mesa's libGL to drop configs with unknown attributes (and back-port the patch to at least the 9.0 release tree).<br>
<br>
3. For now, send extension attributes for configs that have non-default values to the client.<br>
<br>
4. Add xserver infrastructure to track the client-supported GLX extensions.<br>
<br>
5. Only send configs with non-default valued extension attributes if the client supports the required extension.<br>
<br>
Tomasz, can you handle steps 1 and 3 in your patch series?<br>
<br></blockquote><div>I don't really think it's a good idea to keep the constant amount of attributes while not sending some of them - but it's up to you, I can agree to your solution.<br><br>The question is - what should be the padding value? We could use GL_FALSE or GLX_DONT_CARE as attribute ID, or define our own value. I recommend null-terminating the list, with either GL_FALSE or our own new define - ie. GLX_END_LIST. Bringing our own definition requires to add it to a header, glx.h or glxext.h - so using GL_FALSE is simpler. Also, I think it would be best if the list was always null-terminated - even if no attributes are skipped.<br>
<br>Remember that the padding attribute ID must be ignored by MESA (so it influences step 2 on your list).<br><br>Let me know which solution you prefer.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
>><br>
>> Signed-off-by: Tomasz Lis<br>
<<a href="mailto:tomasz.lis-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org" target="_blank">tomasz.lis-<u></u>ral2JQCrhuEAvxtiuMwx3w@public.<u></u>gmane.org</a><br>
<mailto:<a href="mailto:tomasz.lis-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org" target="_blank">tomasz.lis-<u></u>ral2JQCrhuEAvxtiuMwx3w@public.<u></u>gmane.org</a>>><div><div class="h5"><br>
>> ---<br>
>> glx/extension_string.c | 2 ++<br>
>> glx/extension_string.h | 2 ++<br>
>> glx/glxcmds.c | 7 +++++--<br>
>> glx/glxdri2.c | 7 +++++++<br>
>> glx/glxdricommon.c | 4 +++-<br>
>> glx/glxscreens.c | 2 ++<br>
>> glx/glxscreens.h | 3 +++<br>
>> hw/xquartz/GL/visualConfigs.c | 3 +++<br>
>> hw/xwin/glx/indirect.c | 2 ++<br>
>> 9 files changed, 29 insertions(+), 3 deletions(-)<br>
>><br>
>> diff --git a/glx/extension_string.c b/glx/extension_string.c<br>
>> index 544ca1f..70dc915 100644<br>
>> --- a/glx/extension_string.c<br>
>> +++ b/glx/extension_string.c<br>
>> @@ -71,9 +71,11 @@ static const struct extension_info<br>
>> known_glx_extensions[] = {<br>
>> { GLX(ARB_create_context), VER(0,0), N, },<br>
>> { GLX(ARB_create_context_<u></u>profile), VER(0,0), N, },<br>
>> { GLX(ARB_create_context_<u></u>robustness), VER(0,0), N, },<br>
>> + { GLX(ARB_framebuffer_sRGB), VER(1,1), N, },<br>
>> { GLX(ARB_multisample), VER(1,4), Y, },<br>
>><br>
>> { GLX(EXT_create_context_es2_<u></u>profile), VER(0,0), N, },<br>
>> + { GLX(EXT_framebuffer_sRGB), VER(1,1), N, },<br>
<br>
According to the comments above, writing VER(1,1) here means that this<br>
extension is required in GLX 1.1 (although this data is not used in<br>
the X<br>
server). I don't think that's true, and you should be writing VER(0,0).<br>
<br>
I'm not entirely sure that this should be reported as a GLX<br>
extension at all.<br>
<br>
<br>
The ARB_framebuffer_sRGB spec says it is GLX extension.<br>
But you are completely right with the versions - OGL 1.3 has no relation<br>
to this extension, so GLX specs up to 1.4 definitely don't require it.<br>
Agreed to change required GLX version to (0,0).<br>
<br>
>> --- a/glx/glxscreens.c<br>
>> +++ b/glx/glxscreens.c<br>
>> @@ -164,7 +164,9 @@ static char GLXServerVendorName[] = "SGI";<br>
>> unsigned glxMajorVersion = SERVER_GLX_MAJOR_VERSION;<br>
>> unsigned glxMinorVersion = SERVER_GLX_MINOR_VERSION;<br>
>> static char GLXServerExtensions[] =<br>
>> + "GLX_ARB_framebuffer_sRGB "<br>
>> "GLX_ARB_multisample "<br>
>> + "GLX_EXT_framebuffer_sRGB "<br>
>> "GLX_EXT_visual_info "<br>
>> "GLX_EXT_visual_rating "<br>
>> "GLX_EXT_import_context "<br>
<br>
This is the static list of extensions reported for swrast. I don't<br>
think this<br>
extension belongs here.<br>
<br>
<br>
You're right. Agreed to remove.<br>
<br>
______________________________<u></u>_________________<br>
<a href="mailto:xorg-devel@lists.x.org" target="_blank">xorg-devel@lists.x.org</a>: X.Org development<br>
Archives: <a href="http://lists.x.org/archives/xorg-devel" target="_blank">http://lists.x.org/archives/<u></u>xorg-devel</a><br>
Info: <a href="http://lists.x.org/mailman/listinfo/xorg-devel" target="_blank">http://lists.x.org/mailman/<u></u>listinfo/xorg-devel</a><br>
</div></div></blockquote>
<br>
</blockquote></div><br>