[PATCH] glproto: Document GLX_ARB_create_context and GLX_ARB_create_context_profile protocol

Ian Romanick idr at freedesktop.org
Fri Dec 2 22:16:59 PST 2011


On 11/28/2011 12:05 PM, Dave Airlie wrote:
>>
>> Also add the struct names (in addition to the typedef names).  Most of
>> the other protocol structures have this, but some lack it.  I'm not
>> sure if this means the glproto package version should be bumped or not.
>
> I think I messed up adding these also, as I didn't add Req to the
> right places I don't think.
>
> Nothing uses these yet anyways so they should be changeable, I had

So... you think it would be safe to rename n0, n1, and n2 to something 
more descriptive? :)

> started looking at those extensions locally a good while back, but
> they weren't as urgent back then.
>
> Dave.
>
>>
>> Signed-off-by: Ian Romanick<ian.d.romanick at intel.com>
>> ---
>>   glxproto.h |   58 +++++++++++++++++++++++++++++++++++++++++++++-------------
>>   1 files changed, 45 insertions(+), 13 deletions(-)
>>
>> diff --git a/glxproto.h b/glxproto.h
>> index 0446217..26a6cce 100644
>> --- a/glxproto.h
>> +++ b/glxproto.h
>> @@ -1288,15 +1288,34 @@ typedef struct {
>>   } xGLXHyperpipeConfigSGIXReply;
>>   #define sz_xGLXHyperpipeConfigSGIXReply 32
>>
>> -/*
>> - * GLX_ARB_create_context
>> +/**
>> + * \name Protocol structures for GLX_ARB_create_context and
>>   * GLX_ARB_create_context_profile
>>   */
>> -
>> -/*
>> - * glXSetClientInfoARB
>> +/*@{*/
>> +/**
>> + * Protocol header for glXSetClientInfoARB
>> + *
>> + * This structure is follwed by \c n0 * 2 \c CARD32 values listing the OpenGL
>> + * versions supported by the client.  The pairs of values are an OpenGL major
>> + * version followed by a minor version.  For example,
>> + *
>> + *      CARD32 versions[4] = { 2, 1, 3, 0 };
>> + *
>> + * says that the client supports OpenGL 2.1 and OpenGL 3.0.
>> + *
>> + * These are followed by \c n1 bytes of \c STRING8 containing the OpenGL
>> + * extension string supported by the client and up to 3 bytes of padding.
>> + *
>> + * The list of OpenGL extensions is followed by \c n2 bytes of \c STRING8
>> + * containing the GLX extension string supported by the client and up to 3
>> + * bytes of padding.
>> + *
>> + * This protocol replaces \c GLXClientInfo.
>> + *
>> + * \sa GLXClientInfo, GLXSetClientInfo2ARB
>>   */
>> -typedef struct {
>> +typedef struct GLXSetClientInfoARB {
>>      CARD8      reqType;
>>      CARD8      glxCode;
>>      CARD16     length B16;
>> @@ -1311,10 +1330,13 @@ typedef struct {
>>   } xGLXSetClientInfoARB;
>>   #define sz_xGLXSetClientInfoARB 24
>>
>> -/*
>> -** glXCreateContextAttribsARB
>> -*/
>> -typedef struct {
>> +/**
>> + * Protocol head for glXCreateContextAttribsARB
>> + *
>> + * This protocol replaces \c GLXCreateContext, \c GLXCreateNewContext, and
>> + * \c GLXCreateContextWithConfigSGIX.
>> + */
>> +typedef struct GLXCreateContextAttribsARB {
>>      CARD8      reqType;
>>      CARD8      glxCode;
>>      CARD16     length B16;
>> @@ -1330,10 +1352,18 @@ typedef struct {
>>   } xGLXCreateContextAttribsARB;
>>   #define sz_xGLXCreateContextAttribsARB 28
>>
>> -/*
>> - * glXSetClientInfo2ARB
>> +/**
>> + * Protocol header for glXSetClientInfo2ARB
>> + *
>> + * The glXSetClientInfo2ARB protocol differs from glXSetClientInfoARB in that
>> + * the list of OpenGL versions supported by the client is 3 \c CARD32 values
>> + * per version: major version, minor version, and supported profile mask.
>> + *
>> + * This protocol replaces \c GLXClientInfo and \c GLXSetClientInfoARB.
>> + *
>> + * \sa GLXClientInfo, GLXSetClientInfoARB
>>   */
>> -typedef struct {
>> +typedef struct GLXSetClientInfo2ARB {
>>      CARD8      reqType;
>>      CARD8      glxCode;
>>      CARD16     length B16;
>> @@ -1347,6 +1377,8 @@ typedef struct {
>>      */
>>   } xGLXSetClientInfo2ARB;
>>   #define sz_xGLXSetClientInfo2ARB 24
>> +/*@}*/
>> +
>>   /************************************************************************/
>>
>>   /*
>> --
>> 1.7.6.4
>>
>> _______________________________________________
>> xorg-devel at lists.x.org: X.Org development
>> Archives: http://lists.x.org/archives/xorg-devel
>> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>>



More information about the xorg-devel mailing list