Merge branch 'master' into 117-path-rendering
diff --git a/extensions/ARB/ARB_copy_buffer.txt b/extensions/ARB/ARB_copy_buffer.txt
index c5bb24b..405a526 100644
--- a/extensions/ARB/ARB_copy_buffer.txt
+++ b/extensions/ARB/ARB_copy_buffer.txt
@@ -28,8 +28,8 @@
 
 Version
 
-    Last Modified Date: June 3, 2009
-    Author Revision: 6
+    Last Modified Date: September 6, 2017
+    Author Revision: 7
 
 Number
 
@@ -120,6 +120,23 @@
 
     None
 
+GLX Protocol
+
+    The following single command is sent to the server as
+    a glxsingle request:
+
+    CopyBufferSubData
+
+        1       CARD8           opcode
+        1       221             GLX opcode
+        2       10              request length
+        4       GLX_CONTEXT_TAG context tag
+        8       CARD64          readoffset
+        8       CARD64          writeoffset
+        8       CARD64          size
+        4       ENUM            readtarget
+        4       ENUM            writetarget
+
 Errors
 
     The error INVALID_VALUE is generated by CopyBufferSubData if
@@ -223,3 +240,5 @@
     Revision 6, 2009/06/03
      - Add buffer target list and fix capitalization differences on
        parameter names per feedback from Jonathan Knispel
+    Revision 7, 2017/09/06
+     - Add GLX protocol.
diff --git a/extensions/ARB/ARB_indirect_parameters.txt b/extensions/ARB/ARB_indirect_parameters.txt
index 34a8851..ded99b9 100644
--- a/extensions/ARB/ARB_indirect_parameters.txt
+++ b/extensions/ARB/ARB_indirect_parameters.txt
@@ -26,8 +26,8 @@
 
 Version
 
-    Last Modified Date: 20 June 2013
-    Revision: 3
+    Last Modified Date: 23 October 2017
+    Revision: 4
 
 Number
 
@@ -104,6 +104,20 @@
     --------------------    ---------------       ------------------------
     PARAMETER_BUFFER_ARB   draw parameters       10.5
 
+Additions to Chapter 7 of the OpenGL 4.3 (Core Profile) Specification
+(Programs and Shader)
+
+    Modifications to Section 7.12.2 "Shader Memory Access Synchronization"
+
+    Replace the bullet point describing COMMAND_BARRIER_BIT with
+
+        - COMMAND_BARRIER_BIT:  Command data sourced from buffer objects by
+          Draw*Indirect, MultiDraw*IndirectCount, and DispatchComputeIndirect
+          commands after the barrier will reflect data written by shaders
+          prior to the barrier.  The buffer objects affected by this bit
+          are derived from the DRAW_INDIRECT_BUFFER, DISPATCH_INDIRECT_BUFFER,
+          and PARAMETER_BUFFER_ARB bindings.
+
 Additions to Chapter 10 of the OpenGL 4.3 (Core Profile) Specification
 (Drawing Commands Using Vertex Arrays)
 
@@ -193,3 +207,4 @@
                                 Add issue (1)
      3    06/20/2013  pdaniell  Modify the <indirect> parameter type to
                                 const void *.
+     4    10/23/2017  nhaehnle  Add COMMAND_BARRIER_BIT language.
diff --git a/extensions/ARB/ARB_texture_buffer_object.txt b/extensions/ARB/ARB_texture_buffer_object.txt
index 14f84a0..0398bea 100644
--- a/extensions/ARB/ARB_texture_buffer_object.txt
+++ b/extensions/ARB/ARB_texture_buffer_object.txt
@@ -21,8 +21,8 @@
 
 Version
 
-    Last Modified Date:         7/9/2013
-    Revision:                   7
+    Last Modified Date:         06/04/2015
+    Revision:                   8
 
 Number
 
@@ -400,6 +400,19 @@
     ARB_half_float_pixel, 16-bit floating-point texture formats may be
     available using normal texture mechanisms, but not with buffer textures.
 
+GLX Protocol
+
+    The following rendering command is sent to the server as
+    a part of glXRender request:
+
+    TexBufferARB
+
+        2       16              rendering command length
+        2       367             rendering command opcode
+        4       ENUM            target
+        4       ENUM            internalformat
+        4       CARD32          buffer
+
 Errors
 
     INVALID_OPERATION is generated by TexBufferARB if <buffer> is non-zero and
@@ -710,6 +723,8 @@
 
     Rev.    Date    Author    Changes
     ----  --------  --------  -----------------------------------------
+      8   06/04/15  srahman   Add GLX protocol specification.
+
       7   07/09/13  Jon Leech Correct suffix on
                               TEXTURE_BUFFER_DATA_STORE_BINDING_ARB
                               (was EXT).
diff --git a/extensions/ARB/ARB_uniform_buffer_object.txt b/extensions/ARB/ARB_uniform_buffer_object.txt
index 6c1a06a..fb6af4d 100644
--- a/extensions/ARB/ARB_uniform_buffer_object.txt
+++ b/extensions/ARB/ARB_uniform_buffer_object.txt
@@ -42,8 +42,8 @@
 
 Version
 
-    Last Modified Date:     2013/08/19
-    Author revision:        67
+    Last Modified Date:     2015/06/23
+    Author revision:        68
 
 Number
 
@@ -1084,7 +1084,167 @@
 
     ... return the value or values of the uniform at location <location>
     of the default uniform block for program object <program>...
-    
+
+GLX Protocol
+
+    GLX protocol for BindBufferRange, BindBufferBase and GetIntegeri_v
+    was added through NV_transform_feedback and EXT_draw_buffers2
+    protocol specs.
+
+    The following rendering commands are sent to the server as part of
+    a glXRender request:
+
+    UniformBlockBinding
+
+        2      16              rendering command length
+        2      366             rendering command opcode
+        4      CARD32          program
+        4      CARD32          uniformBlockIndex
+        4      CARD32          uniformBlockBinding
+
+    The following non-rendering commands are added:
+
+    GetUniformIndices
+
+        1      CARD8           opcode(X assigned)
+        1      215             GLX opcode
+        2      4+n+(s+p)/4     request length
+        4      GLX_CONTEXT_TAG context tag
+        4      CARD32          program
+        4      CARD32          uniformCount
+        n      LISTofINT32     lengths[n], n = uniformCount, lengths[i] = strlen(uniformNames[i]) + 1, 0 <= i < n.
+        s      LISTofCHAR      uniformNames, s = length[0]+...+length[n-1].
+                               array
+        p                      unused, p = pad(s)
+    =>
+        1      1               reply
+        1                      unused
+        2      CARD16          sequence number
+        4      n               reply length
+        4                      unused
+        4      CARD32          n (number of uniform Indices)
+
+        if (n == 1) this follows:
+
+        4      CARD32          uniformIndices
+        12                     unused
+
+        otherwise this follows:
+
+        16                     unused
+        4*n    LISTofCARD32    uniformIndices
+
+    GetActiveUniformsiv
+
+        1      CARD8           opcode(X assigned)
+        1      216             GLX opcode
+        2      5+n             request length
+        4      GLX_CONTEXT_TAG context tag
+        4      CARD32          program
+        4      INT32           uniformCount(n)
+        4      ENUM            pname
+        n      LISTofCARD32    uniformIndices
+
+    =>
+        1      1               reply
+        1                      unused
+        2      CARD16          sequence number
+        4      n               reply length
+        4                      unused
+
+        if (n == 1) this follows:
+
+        4      INT32           params
+        12                     unused
+
+        otherwise this follows:
+
+        16                     unused
+        4*n    LISTofINT32     params
+
+     GetActiveUniformName
+
+        1      CARD8           opcode(X assigned)
+        1      217             GLX opcode
+        2      5               request length
+        4      GLX_CONTEXT_TAG context tag
+        4      CARD32          program
+        4      CARD32          uniformIndex
+        4      INT32           bufsize
+    =>
+        1      1               reply
+        1                      unused
+        2      CARD16          sequence number
+        4      m               reply length, m = (n+p)/4
+        4                      unused
+        4      INT32           n
+        16                     unused
+        n      LISTofCHAR      uniformName, n = strlen(uniformName)+1
+        p                      unused, p=pad(n)
+
+     GetUniformBlockIndex
+
+        1      CARD8           opcode(X assigned)
+        1      218             GLX opcode
+        2      3+(n+p)/4       request length
+        4      GLX_CONTEXT_TAG context tag
+        4      CARD32          program
+        n      LISTofCHAR      uniformBlockName, n = strlen(uniformBlockName)+1
+        p                      unused, p=pad(n)
+    =>
+        1      1               reply
+        1                      unused
+        2      CARD16          sequence number
+        4      0               reply length
+        4      CARD32          return value
+        20                     unused
+
+    GetActiveUniformBlockiv
+
+        1      CARD8           opcode(X assigned)
+        1      219             GLX opcode
+        2      5               request length
+        4      GLX_CONTEXT_TAG context tag
+        4      CARD32          program
+        4      CARD32          uniformBlockIndex
+        4      ENUM            pname
+    =>
+        1      1               reply
+        1                      unused
+        2      CARD16          sequence number
+        4      n               reply length
+        4                      unused
+
+        if (n == 1) this follows:
+
+        4      INT32           params
+        12                     unused
+
+        otherwise this follows:
+
+        16                     unused
+        4*n    LISTofINT32     params
+
+    GetActiveUniformBlockName
+
+        1      CARD8           opcode(X assigned)
+        1      220             GLX opcode
+        2      5               request length
+        4      GLX_CONTEXT_TAG context tag
+        4      CARD32          program
+        4      CARD32          uniformBlockIndex
+        4      INT32           bufsize
+    =>
+        1      1               reply
+        1                      unused
+        2      CARD16          sequence number
+        4      m               reply length, m = (n+p)/4
+        4                      unused
+        4      INT32           n
+        16                     unused
+        n      LISTofCHAR      uniformBlockName, n = strlen(uniformBlockName)+1
+        p                      unused, p=pad(n)
+
 OpenGL Shading Language Spec v1.20.8 Updates
 
     Including the following line in a shader can be used to control the
@@ -3377,6 +3537,9 @@
 
 Revision History
 
+    (v68, 2015-06-23, srahman)
+        - Add GLX protocol specification.
+
     (v67, 2013-08-17, jon)
         - Add extra 'const' qualifier for GetUniformIndices <uniformNames>
           argument (Bug 10703).
diff --git a/extensions/EXT/EXT_draw_buffers2.txt b/extensions/EXT/EXT_draw_buffers2.txt
index 6706973..404bc87 100644
--- a/extensions/EXT/EXT_draw_buffers2.txt
+++ b/extensions/EXT/EXT_draw_buffers2.txt
@@ -18,8 +18,8 @@
 
 Version
 
-    Last Modified Date:         7/9/2008
-    NVIDIA Revision:            10
+    Last Modified Date:         10/02/2010
+    NVIDIA Revision:            11
 
 Number
 
@@ -190,7 +190,103 @@
 
 GLX Protocol
 
-    UNDER DEVELOPMENT
+    The following rendering commands are sent to the server as part of
+    a glXRender request:
+
+    ColorMaskIndexedEXT
+
+        2      12              rendering command length
+        2      352             rendering command opcode
+        4      CARD32          buf
+        1      BOOL            r
+        1      BOOL            g
+        1      BOOL            b
+        1      BOOL            a
+
+    EnableIndexedEXT
+
+        2      12              rendering length
+        2      353             rendering command opcode
+        4      ENUM            target
+        4      CARD32          index
+
+    DisableIndexedEXT
+
+        2      12    	       rendering length
+        2      354             rendering command opcode
+        4      ENUM            target
+        4      CARD32          index
+
+    The following new non-rendering commands are added:
+
+    GetBooleanIndexedvEXT
+
+        1      CARD8           opcode(X assigned)
+        1      210             GLX opcode
+        2      4               request length
+        4      GLX_CONTEXT_TAG context tag
+        4      ENUM            value
+        4      CARD32          index
+    =>
+        1                      reply
+        1                      unused
+        2      CARD16          sequence number
+        4      m               reply length, m = (n == 1 ? 0 :(n+p)/4)
+        4                      unused
+        4      CARD32          n (number of parameter components)
+
+        if (n == 1) this follows:
+
+        1      BOOL            data
+        15                     unused
+
+        otherwise this follows:
+
+        16                     unused
+        n*1    LISTofBOOL      data
+        p                      unused, p = pad(n)
+
+    GetIntegerIndexedvEXT
+
+        1      CARD8           opcode(X assigned)
+        1      211             GLX opcode
+        2      4               request length
+        4      GLX_CONTEXT_TAG context tag
+        4      ENUM            value
+        4      CARD32          index
+    =>
+        1                      reply
+        1                      unused
+        2      CARD16          sequence number
+        4      m               reply length, m = (n == 1 ? 0 : n)
+        4                      unused
+        4      CARD32          n (number of parameter components)
+
+        if (n == 1) this follows:
+
+        4      CARD32          data
+        12                     unused
+
+        otherwise this follows:
+
+        16                     unused
+        4*n    LISTofCARD32    data
+
+   IsEnabledIndexedEXT
+
+        1      CARD8           opcode(X assigned)
+        1      212             GLX opcode
+        2      4               request length
+        4      GLX_CONTEXT_TAG context tag
+        4      ENUM            target
+        4      CARD32          index
+   =>
+        1                      reply
+        1                      unused
+        2      CARD16          sequence number
+        4      0               reply length
+        4      BOOL32          return value
+        20                     unused
 
 Errors
 
@@ -315,6 +411,8 @@
 
     Rev.    Date    Author    Changes
     ----  --------  --------  -----------------------------------------
+    11    10/02/10  srahman   Added GLX protocol.
+
     10    07/11/08  joburgess Added a clarification of ColorMaskIndexedEXT / DrawBuffersARB interaction.
     
      9    02/09/07  pbrown    Updated status section (now released).
diff --git a/extensions/NV/NV_primitive_restart.txt b/extensions/NV/NV_primitive_restart.txt
index 95a6fc8..7b2a751 100644
--- a/extensions/NV/NV_primitive_restart.txt
+++ b/extensions/NV/NV_primitive_restart.txt
@@ -245,14 +245,17 @@
 
 GLX Protocol
 
-    One new GL command is added.
-
-    The following rendering command is sent to the server as part of a
-    glXRender request:
+    The following rendering commands are sent to the server as part of
+    glXRender requests:
 
         PrimitiveRestartNV
-            2           4               rendering command length
-            2           ????            rendering command opcode
+            2       4               rendering command length
+            2       364             rendering command opcode
+
+        PrimitiveRestartIndexNV
+            2       8               rendering command length
+            2       365             rendering command opcode
+            4       CARD32          index
 
 Errors
 
diff --git a/xml/gl.xml b/xml/gl.xml
index 3833d0c..414197b 100644
--- a/xml/gl.xml
+++ b/xml/gl.xml
@@ -5578,7 +5578,8 @@
         <enum value="0x82FB" name="GL_CONTEXT_RELEASE_BEHAVIOR_KHR"/>
         <enum value="0x82FC" name="GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH"/>
         <enum value="0x82FC" name="GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR"/>
-            <unused start="0x82FD" end="0x830F" vendor="ARB"/>
+        <enum value="0x82FD" name="GL_ROBUST_GPU_TIMEOUT_MS_KHR" comment="Reserved for future"/>
+            <unused start="0x82FE" end="0x830F" vendor="ARB"/>
     </enums>
 
     <enums namespace="GL" start="0x8310" end="0x832F" vendor="SGI">
@@ -10356,6 +10357,7 @@
         <command>
             <proto>void <name>glBeginTransformFeedback</name></proto>
             <param group="PrimitiveType"><ptype>GLenum</ptype> <name>primitiveMode</name></param>
+            <glx type="render" opcode="357"/>
         </command>
         <command>
             <proto>void <name>glBeginTransformFeedbackEXT</name></proto>
@@ -10403,6 +10405,7 @@
             <param group="BufferTargetARB"><ptype>GLenum</ptype> <name>target</name></param>
             <param><ptype>GLuint</ptype> <name>index</name></param>
             <param><ptype>GLuint</ptype> <name>buffer</name></param>
+            <glx type="render" opcode="356"/>
         </command>
         <command>
             <proto>void <name>glBindBufferBaseEXT</name></proto>
@@ -10440,6 +10443,7 @@
             <param><ptype>GLuint</ptype> <name>buffer</name></param>
             <param group="BufferOffset"><ptype>GLintptr</ptype> <name>offset</name></param>
             <param group="BufferSize"><ptype>GLsizeiptr</ptype> <name>size</name></param>
+            <glx type="render" opcode="355"/>
         </command>
         <command>
             <proto>void <name>glBindBufferRangeEXT</name></proto>
@@ -11297,24 +11301,28 @@
             <param group="DrawBufferName"><ptype>GLint</ptype> <name>drawbuffer</name></param>
             <param><ptype>GLfloat</ptype> <name>depth</name></param>
             <param><ptype>GLint</ptype> <name>stencil</name></param>
+            <glx type="render" opcode="360"/>
         </command>
         <command>
             <proto>void <name>glClearBufferfv</name></proto>
             <param group="Buffer"><ptype>GLenum</ptype> <name>buffer</name></param>
             <param group="DrawBufferName"><ptype>GLint</ptype> <name>drawbuffer</name></param>
             <param len="COMPSIZE(buffer)">const <ptype>GLfloat</ptype> *<name>value</name></param>
+            <glx type="render" opcode="361"/>
         </command>
         <command>
             <proto>void <name>glClearBufferiv</name></proto>
             <param group="Buffer"><ptype>GLenum</ptype> <name>buffer</name></param>
             <param group="DrawBufferName"><ptype>GLint</ptype> <name>drawbuffer</name></param>
             <param len="COMPSIZE(buffer)">const <ptype>GLint</ptype> *<name>value</name></param>
+            <glx type="render" opcode="362"/>
         </command>
         <command>
             <proto>void <name>glClearBufferuiv</name></proto>
             <param group="Buffer"><ptype>GLenum</ptype> <name>buffer</name></param>
             <param group="DrawBufferName"><ptype>GLint</ptype> <name>drawbuffer</name></param>
             <param len="COMPSIZE(buffer)">const <ptype>GLuint</ptype> *<name>value</name></param>
+            <glx type="render" opcode="363"/>
         </command>
         <command>
             <proto>void <name>glClearColor</name></proto>
@@ -11963,6 +11971,7 @@
             <param group="Boolean"><ptype>GLboolean</ptype> <name>b</name></param>
             <param group="Boolean"><ptype>GLboolean</ptype> <name>a</name></param>
             <alias name="glColorMaski"/>
+            <glx type="render" opcode="352"/>
         </command>
         <command>
             <proto>void <name>glColorMaski</name></proto>
@@ -12716,6 +12725,7 @@
             <param group="BufferOffset"><ptype>GLintptr</ptype> <name>readOffset</name></param>
             <param group="BufferOffset"><ptype>GLintptr</ptype> <name>writeOffset</name></param>
             <param group="BufferSize"><ptype>GLsizeiptr</ptype> <name>size</name></param>
+            <glx type="single" opcode="221"/>
         </command>
         <command>
             <proto>void <name>glCopyBufferSubDataNV</name></proto>
@@ -13881,6 +13891,7 @@
             <param group="EnableCap"><ptype>GLenum</ptype> <name>target</name></param>
             <param><ptype>GLuint</ptype> <name>index</name></param>
             <alias name="glDisablei"/>
+            <glx type="render" opcode="354"/>
         </command>
         <command>
             <proto>void <name>glDisableVariantClientStateEXT</name></proto>
@@ -14542,6 +14553,7 @@
             <param group="EnableCap"><ptype>GLenum</ptype> <name>target</name></param>
             <param><ptype>GLuint</ptype> <name>index</name></param>
             <alias name="glEnablei"/>
+            <glx type="render" opcode="353"/>
         </command>
         <command>
             <proto>void <name>glEnableVariantClientStateEXT</name></proto>
@@ -14658,6 +14670,7 @@
         </command>
         <command>
             <proto>void <name>glEndTransformFeedback</name></proto>
+            <glx type="render" opcode="358"/>
         </command>
         <command>
             <proto>void <name>glEndTransformFeedbackEXT</name></proto>
@@ -15855,6 +15868,7 @@
             <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
             <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
             <param len="bufSize"><ptype>GLchar</ptype> *<name>uniformBlockName</name></param>
+            <glx type="single" opcode="220"/>
         </command>
         <command>
             <proto>void <name>glGetActiveUniformBlockiv</name></proto>
@@ -15862,6 +15876,7 @@
             <param><ptype>GLuint</ptype> <name>uniformBlockIndex</name></param>
             <param group="UniformBlockPName"><ptype>GLenum</ptype> <name>pname</name></param>
             <param len="COMPSIZE(program,uniformBlockIndex,pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="single" opcode="219"/>
         </command>
         <command>
             <proto>void <name>glGetActiveUniformName</name></proto>
@@ -15870,6 +15885,7 @@
             <param><ptype>GLsizei</ptype> <name>bufSize</name></param>
             <param len="1"><ptype>GLsizei</ptype> *<name>length</name></param>
             <param len="bufSize"><ptype>GLchar</ptype> *<name>uniformName</name></param>
+            <glx type="single" opcode="217"/>
         </command>
         <command>
             <proto>void <name>glGetActiveUniformsiv</name></proto>
@@ -15878,6 +15894,7 @@
             <param len="uniformCount">const <ptype>GLuint</ptype> *<name>uniformIndices</name></param>
             <param group="UniformPName"><ptype>GLenum</ptype> <name>pname</name></param>
             <param len="COMPSIZE(uniformCount,pname)"><ptype>GLint</ptype> *<name>params</name></param>
+            <glx type="single" opcode="216"/>
         </command>
         <command>
             <proto>void <name>glGetActiveVaryingNV</name></proto>
@@ -15932,6 +15949,7 @@
             <param><ptype>GLuint</ptype> <name>index</name></param>
             <param group="Boolean" len="COMPSIZE(target)"><ptype>GLboolean</ptype> *<name>data</name></param>
             <alias name="glGetBooleani_v"/>
+            <glx type="single" opcode="210"/>
         </command>
         <command>
             <proto>void <name>glGetBooleani_v</name></proto>
@@ -16650,6 +16668,7 @@
             <param><ptype>GLuint</ptype> <name>index</name></param>
             <param len="COMPSIZE(target)"><ptype>GLint</ptype> *<name>data</name></param>
             <alias name="glGetIntegeri_v"/>
+            <glx type="single" opcode="211"/>
         </command>
         <command>
             <proto>void <name>glGetIntegeri_v</name></proto>
@@ -18050,6 +18069,7 @@
             <proto group="String">const <ptype>GLubyte</ptype> *<name>glGetStringi</name></proto>
             <param group="StringName"><ptype>GLenum</ptype> <name>name</name></param>
             <param><ptype>GLuint</ptype> <name>index</name></param>
+            <glx type="single" opcode="214"/>
         </command>
         <command>
             <proto><ptype>GLuint</ptype> <name>glGetSubroutineIndex</name></proto>
@@ -18430,6 +18450,7 @@
             <param len="1"><ptype>GLsizei</ptype> *<name>size</name></param>
             <param len="1"><ptype>GLenum</ptype> *<name>type</name></param>
             <param len="bufSize"><ptype>GLchar</ptype> *<name>name</name></param>
+            <glx type="single" opcode="213"/>
         </command>
         <command>
             <proto>void <name>glGetTransformFeedbackVaryingEXT</name></proto>
@@ -18479,6 +18500,7 @@
             <proto><ptype>GLuint</ptype> <name>glGetUniformBlockIndex</name></proto>
             <param><ptype>GLuint</ptype> <name>program</name></param>
             <param len="COMPSIZE()">const <ptype>GLchar</ptype> *<name>uniformBlockName</name></param>
+            <glx type="single" opcode="218"/>
         </command>
         <command>
             <proto><ptype>GLint</ptype> <name>glGetUniformBufferSizeEXT</name></proto>
@@ -18491,6 +18513,7 @@
             <param><ptype>GLsizei</ptype> <name>uniformCount</name></param>
             <param len="COMPSIZE(uniformCount)">const <ptype>GLchar</ptype> *const*<name>uniformNames</name></param>
             <param len="COMPSIZE(uniformCount)"><ptype>GLuint</ptype> *<name>uniformIndices</name></param>
+            <glx type="single" opcode="215"/>
         </command>
         <command>
             <proto><ptype>GLint</ptype> <name>glGetUniformLocation</name></proto>
@@ -19567,6 +19590,7 @@
             <param group="EnableCap"><ptype>GLenum</ptype> <name>target</name></param>
             <param><ptype>GLuint</ptype> <name>index</name></param>
             <alias name="glIsEnabledi"/>
+            <glx type="single" opcode="212"/>
         </command>
         <command>
             <proto group="Boolean"><ptype>GLboolean</ptype> <name>glIsEnabledi</name></proto>
@@ -23221,9 +23245,11 @@
         <command>
             <proto>void <name>glPrimitiveRestartIndexNV</name></proto>
             <param><ptype>GLuint</ptype> <name>index</name></param>
+            <glx type="render" opcode="365"/>
         </command>
         <command>
             <proto>void <name>glPrimitiveRestartNV</name></proto>
+            <glx type="render" opcode="364"/>
         </command>
         <command>
             <proto>void <name>glPrioritizeTextures</name></proto>
@@ -26378,6 +26404,7 @@
             <param group="InternalFormat"><ptype>GLenum</ptype> <name>internalformat</name></param>
             <param><ptype>GLuint</ptype> <name>buffer</name></param>
             <alias name="glTexBuffer"/>
+            <glx type="render" opcode="367"/>
         </command>
         <command>
             <proto>void <name>glTexBufferEXT</name></proto>
@@ -28147,6 +28174,7 @@
             <param><ptype>GLsizei</ptype> <name>count</name></param>
             <param len="count">const <ptype>GLchar</ptype> *const*<name>varyings</name></param>
             <param><ptype>GLenum</ptype> <name>bufferMode</name></param>
+            <glx type="render" opcode="359"/>
         </command>
         <command>
             <proto>void <name>glTransformFeedbackVaryingsEXT</name></proto>
@@ -28775,6 +28803,7 @@
             <param><ptype>GLuint</ptype> <name>program</name></param>
             <param><ptype>GLuint</ptype> <name>uniformBlockIndex</name></param>
             <param><ptype>GLuint</ptype> <name>uniformBlockBinding</name></param>
+            <glx type="render" opcode="366"/>
         </command>
         <command>
             <proto>void <name>glUniformBufferEXT</name></proto>
diff --git a/xml/glxproto.reserved.txt b/xml/glxproto.reserved.txt
index 0fa8339..55ced01 100644
--- a/xml/glxproto.reserved.txt
+++ b/xml/glxproto.reserved.txt
@@ -104,6 +104,8 @@
        206     209  ARB_vertex_array_object
        210     212  EXT_draw_buffers2
        213     214  OpenGL 3.0 core
+       215     220  ARB_uniform_buffer_object
+       221          ARB_copy_buffer
 
 OpenGL Rendering Opcodes (16 Bits)
 ==================================
@@ -135,6 +137,9 @@
        350     351  ARB_vertex_array_object
        352     354  EXT_draw_buffers2
        355     363  OpenGL 3.0 core
+       364     365  NV_primitive_restart
+       366          ARB_uniform_buffer_object
+       367          ARB_texture_buffer_object
   1008-1023 Reserved to IBM (unknown usage)
   1024-1039 Reserved to HP (originally Compaq) (unknown usage)
   1040-2047 Unused
@@ -287,3 +292,409 @@
 15              Intel (GLX_BufferSwapINTEL)
 16              SGI (GLX_PbufferClobberSGIX)
 64              SGI
+
+GLX protocol encoding for GL >= 2.0
+===================================
+
+(This section - this whole file really - should eventually be incorporated
+in a proper update of the GLX protocol specification.)
+
+OpenGL 2.0
+----------
+
+    DeleteShader
+
+        1           CARD8           opcode (X assigned)
+        1           195             GLX opcode
+        2           3               request length
+        4           GLX_CONTEXT_TAG context tag
+        4           CARD32          shader
+
+    IsShader
+
+        1           CARD8           opcode (X assigned)
+        1           196             GLX opcode
+        2           3               request length
+        4           GLX_CONTEXT_TAG context tag
+        4           CARD32          shader
+      =>
+        1           1               reply
+        1                           unused
+        2           CARD16          sequence number
+        4           0               reply length
+        4           BOOL32          return value
+        20                          unused
+
+    IsProgram
+
+        1           CARD8           opcode (X assigned)
+        1           197             GLX opcode
+        2           3               request length
+        4           GLX_CONTEXT_TAG context tag
+        4           CARD32          program
+      =>
+        1           1               reply
+        1                           unused
+        2           CARD16          sequence number
+        4           0               reply length
+        4           BOOL32          return value
+        20                          unused
+
+    GetShaderiv
+
+        1           CARD8           opcode (X assigned)
+        1           198             GLX opcode
+        2           4               request length
+        4           GLX_CONTEXT_TAG context tag
+        4           CARD32          program
+        4           CARD32          pname
+      =>
+        1           1               reply
+        1                           unused
+        2           CARD16          sequence number
+        4           m               reply length, m = (n == 1 ? 0 : n)
+        4                           unused
+        4           CARD32          n
+
+        if (n == 1) this follows:
+
+        4           CARD32          params
+        12                          unused
+
+        otherwise this follows:
+
+        16                          unused
+        n*4         LISTOFCARD32    params
+
+        Note that n may be 0, indicating that a GL error occurred.
+
+    GetProgramiv
+
+        1           CARD8           opcode (X assigned)
+        1           199             GLX opcode
+        2           4               request length
+        4           GLX_CONTEXT_TAG context tag
+        4           CARD32          program
+        4           CARD32          pname
+      =>
+        1           1               reply
+        1                           unused
+        2           CARD16          sequence number
+        4           m               reply length, m = (n == 1 ? 0 : n)
+        4                           unused
+        4           CARD32          n
+
+        if (n == 1) this follows:
+
+        4           CARD32          params
+        12                          unused
+
+        otherwise this follows:
+
+        16                          unused
+        n*4         LISTofCARD32    params
+
+        Note that n may be 0, indicating that a GL error occurred.
+
+    GetShaderInfoLog
+
+        1           CARD8           opcode (X assigned)
+        1           200             GLX opcode
+        2           4               request length
+        4           GLX_CONTEXT_TAG context tag
+        4           CARD32          shader
+        4           CARD32          bufSize
+      =>
+        1           1               reply
+        1                           unused
+        2           CARD16          sequence number
+        4           m               reply length, m = (n + p) / 4
+        4                           unused
+        4           CARD32          n, n = length + 1
+        16                          unused
+        n           LISTofBYTE      infoLog
+        p                           unused, p=pad(n)
+
+        Note that n may be 0, indicating that a GL error occurred.
+
+    GetProgramInfoLog
+
+        1           CARD8           opcode (X assigned)
+        1           201             GLX opcode
+        2           4               request length
+        4           GLX_CONTEXT_TAG context tag
+        4           CARD32          program
+        4           CARD32          bufSize
+      =>
+        1           1               reply
+        1                           unused
+        2           CARD16          sequence number
+        4           m               reply length, m = (n + p) / 4
+        4                           unused
+        4           CARD32          n, n = length + 1
+        16                          unused
+        n           LISTofBYTE      infoLog
+        p                           unused, p=pad(n)
+
+        Note that n may be 0, indicating that a GL error occurred.
+
+    DeleteProgram
+
+        1           CARD8           opcode (X assigned)
+        1           202             GLX opcode
+        2           3               request length
+        4           GLX_CONTEXT_TAG context tag
+        4           CARD32          program
+
+OpenGL 2.1
+----------
+
+    UniformMatrix2x3fv
+
+        2           16+4*count*2*3  rendering command length
+        2           305             rendering command opcode
+        4           CARD32          location
+        4           CARD32          count
+        1           BOOL            transpose
+        3                           unused
+        4*count*2*3 LISTofFLOAT32   value
+
+    If the command is encoded in a glXRenderLarge request, the
+    command opcode and command length fields above are expanded to
+    4 bytes each:
+
+        4           20+4*count*2*2  rendering command length
+        4           305             rendering command opcode
+
+    UniformMatrix3x2fv
+
+        2           16+4*count*3*2  rendering command length
+        2           306             rendering command opcode
+        4           CARD32          location
+        4           CARD32          count
+        1           BOOL            transpose
+        3                           unused
+        4*count*3*2 LISTofFLOAT32   value
+
+    If the command is encoded in a glXRenderLarge request, the
+    command opcode and command length fields above are expanded to
+    4 bytes each:
+
+        4           20+4*count*3*2  rendering command length
+        4           306             rendering command opcode
+
+    UniformMatrix2x4fv
+
+        2           16+4*count*2*4  rendering command length
+        2           307             rendering command opcode
+        4           CARD32          location
+        4           CARD32          count
+        1           BOOL            transpose
+        3                           unused
+        4*count*2*4 LISTofFLOAT32   value
+
+    If the command is encoded in a glXRenderLarge request, the
+    command opcode and command length fields above are expanded to
+    4 bytes each:
+
+        4           20+4*count*2*4  rendering command length
+        4           307             rendering command opcode
+
+    UniformMatrix4x2fv
+
+        2           16+4*count*4*2  rendering command length
+        2           308             rendering command opcode
+        4           CARD32          location
+        4           CARD32          count
+        1           BOOL            transpose
+        3                           unused
+        4*count*4*2 LISTofFLOAT32   value
+
+    If the command is encoded in a glXRenderLarge request, the
+    command opcode and command length fields above are expanded to
+    4 bytes each:
+
+        4           20+4*count*4*2  rendering command length
+        4           308             rendering command opcode
+
+    UniformMatrix3x4fv
+
+        2           16+4*count*3*4  rendering command length
+        2           309             rendering command opcode
+        4           CARD32          location
+        4           CARD32          count
+        1           BOOL            transpose
+        3                           unused
+        4*count*3*4 LISTofFLOAT32   value
+
+    If the command is encoded in a glXRenderLarge request, the
+    command opcode and command length fields above are expanded to
+    4 bytes each:
+
+        4           20+4*count*3*4  rendering command length
+        4           309             rendering command opcode
+
+    UniformMatrix4x3fv
+
+        2           16+4*count*4*3  rendering command length
+        2           310             rendering command opcode
+        4           CARD32          location
+        4           CARD32          count
+        1           BOOL            transpose
+        3                           unused
+        4*count*4*3 LISTofFLOAT32   value
+
+    If the command is encoded in a glXRenderLarge request, the
+    command opcode and command length fields above are expanded to
+    4 bytes each:
+
+        4           20+4*count*4*3  rendering command length
+        4           310             rendering command opcode
+
+OpenGL 3.0
+----------
+
+    The following rendering commands are sent to the sever as part of a
+    glXRender request:
+
+        BindBufferRange
+
+            2           32              rendering command length
+            2           355             rendering command opcode
+            8           INT64           offset
+            8           INT64           size
+            4           ENUM            target
+            4           CARD32          index
+            4           CARD32          buffer
+
+        BindBufferBase
+
+            2           16              rendering command length
+            2           356             rendering command opcode
+            4           ENUM            target
+            4           CARD32          index
+            4           CARD32          buffer
+
+        BeginTransformFeedback
+
+            2           8               rendering command length
+            2           357             rendering command opcode
+            4           ENUM            primitiveMode
+
+        EndTransformFeedback
+
+            2           4               rendering command length
+            2           358             rendering command opcode
+
+        ClearBufferfi
+
+            2           20              rendering command length
+            2           360             rendering command opcode
+            4           ENUM            buffer
+            4           CARD32          drawbuffer
+            4           FLOAT32         depth
+            4           CARD32          stencil
+
+        ClearBufferfv
+
+            2           12+(4*n)        rendering command length
+            2           361             rendering command opcode
+            4           ENUM            buffer
+                        0x1800   n=4    GL_COLOR
+                        0x1801   n=1    GL_STENCIL
+                        0x1802   n=1    GL_DEPTH
+                        else     n=0
+            4           CARD32          drawbuffer
+            4*n         LISTofFLOAT32   value
+
+        ClearBufferiv
+
+            2           12+(4*n)        rendering command length
+            2           362             rendering command opcode
+            4           ENUM            buffer
+                        0x1800   n=4    GL_COLOR
+                        0x1801   n=1    GL_STENCIL
+                        0x1802   n=1    GL_DEPTH
+                        else     n=0
+            4           CARD32          drawbuffer
+            4*n         LISTofINT32     value
+
+        ClearBufferuiv
+
+            2           12+(4*n)        rendering command length
+            2           363             rendering command opcode
+            4           ENUM            buffer
+                        0x1800   n=4    GL_COLOR
+                        0x1801   n=1    GL_STENCIL
+                        0x1802   n=1    GL_DEPTH
+                        else     n=0
+            4           CARD32          drawbuffer
+            4*n         LISTofCARD32    value
+
+    The following rendering commands can be sent in a glXRender
+    or glXRenderLarge request.
+
+        TransformFeedbackVaryings
+
+            2      16+(n*4)+s+p    rendering command length
+            2      359             rendering command opcode
+            4      CARD32          program
+            4      INT32           count
+            4      ENUM            buffermode
+            n*4    LISTofINT32     lengths[n], n = count
+            s      LISTofCHAR      varyings, s = sum of all entries in the lengths
+                                   array
+            p                      unused, p = pad(s)
+
+    If the command is encoded in a glXRenderLarge request, the command
+    opcode and command length fields are expanded to 4 bytes each.
+
+            4      20+(n*4)+s+p    rendering command length
+            4      359             rendering command opcode
+
+    lengths[i] is calculated as strlen(varyings[i]) + 1. The NUL terminator
+    is included when sending the varyings.
+
+    The following single commands are sent to the server as part of a
+    glXSingle request:
+
+        GetTransformFeedbackVarying
+
+            1      CARD8           opcode(X assigned)
+            1      213             GLX opcode
+            2      5               request length
+            4      GLX_CONTEXT_TAG context tag
+            4      CARD32          program
+            4      CARD32          index
+            4      CARD32          bufsize
+            =>
+            1      1               reply
+            1                      unused
+            2      CARD16          sequence number
+            4      m               reply length, m = (n == 0 ? 0 : (n + p) / 4)
+            4                      unused
+            4      n-1             length
+            4      INT32           size
+            4      INT32           type
+            8                      unused
+            n      LISTofCHAR      name, n = strlen(name)+1
+            p                      unused, p = pad(m)
+
+        GetStringi
+
+            1           CARD8           opcode (X assigned)
+            1           214             GLX opcode
+            2           4               request length
+            4           GLX_CONTEXT_TAG context tag
+            4           ENUM            name
+            4           CARD32          index
+          =>
+            1           1               reply
+            1           1               unused
+            2           CARD16          sequence number
+            4           m               reply length, m = (n + p) / 4
+            4                           unused
+            4           CARD32          n
+            16                          unused
+            n           STRING8         string
+            p                           unused, p=pad(n)