[PATCH 3/5] glx: Consistently use ARB-suffixed names for ARB_multitexture functions

Jon TURNEY jon.turney at dronecode.org.uk
Fri Apr 18 04:27:44 PDT 2014


On 01/04/2014 14:32, Jon TURNEY wrote:
> On 18/12/2013 14:52, Jon TURNEY wrote:
>> On 17/12/2013 01:35, Ian Romanick wrote:
>>> On 12/08/2013 08:57 AM, Jon TURNEY wrote:
>>>> At the moment we have a mix of ARB and non-ARB suffixed forms for ARB_multitexture functions
>>>> e.g. glMultiTexCoord1fvARB and glMultiTexCoord1dv
>>>>
>>>> Consistently use the ARB-suffixed form, assuming that is present in all libGL
>>>> which provide the OpenGL 1.2.1 ABI we expect to be able to directly link with.
>>>
>>> I'm assuming the patch to glX_proto_recv.py is just stuck in your
>>> outbox?  Both those files clearly say:
>>>
>>> /* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */
>>
>> This depends on Ajax's code generator changes from [1], for the current code
>> in X server, which I don't think have landed yet.
>>
>> [1] http://cgit.freedesktop.org/~ajax/mesa/log/?h=glapi
>>
>> I think Ajax said he would try to update them to include this change before
>> doing so.
>>
>> I'm quite happy to do that work, but I haven't looked at it yet as I don't
>> want to duplicate effort.
> 
> I think this still hasn't landed in mesa.  While investigating a different
> issue, I wanted to re-run the generator, so attached is a patch to ensure
> direct calls are made to functions in the OpenGL ABI, bringing the generator
> into sync with this change.

The 'different issue' was that since the X server generated code has been
updated, glGetVertexAttrib[dfi]v appears to fail with indirect rendering, e.g.:

$ LIBGL_ALWAYS_INDIRECT=1 glean --quick -r results -o --tests vertattrib
X Error of failed request:  GLXUnsupportedPrivateRequest
  Major opcode of failed request:  150 (GLX)
  Minor opcode of failed request:  17 (X_GLXVendorPrivateWithReply)
  Serial number of failed request:  29
  Current serial number in output stream:  29

After noticing X server commit 34e6e601 (which removes NV_vertex_program), I
am a little uncertain if GL_ARB_vertex_program is supposed to be advertised,
but assuming that it is, this is a consequence of the "skip that which is
marked for skipping" change, which means that no server code is generated for
any of the GetVertexAttrib[dfi]v(|ARB|NV) variants.

I think the fix is just to remove the ignore flag from these 3 functions
(which were previously ignored because ARB_vertex_program shares the vendor
private opcodes with NV_vertex_program)

Attached is a patch to do that.
-------------- next part --------------
>From a044b1a7c729b6da9490fd6334b6bf3ad4ba4971 Mon Sep 17 00:00:00 2001
From: Jon TURNEY <jon.turney at dronecode.org.uk>
Date: Wed, 2 Apr 2014 16:16:44 +0100
Subject: [PATCH] Remove the ignore attribute from GetVertexAttrib[dfi]v.

Currently, GetVertexAttrib[dfi]v is marked ignore=true, GetVertexAttrib[dfi]vARB
is an alias of that, and GetVertexAttrib[dfi]vNV is marked exec=skip.

After "skip that which is marked for skipping", this means that no server code
will be generated for any of these variants.

Clients still think they can use GL_ARB_vertex_program and
glGetVertexAttrib[dfi]v, which fails, e.g.

$ LIBGL_ALWAYS_INDIRECT=1 glean --quick -r results -o --tests vertattrib
X Error of failed request:  GLXUnsupportedPrivateRequest
  Major opcode of failed request:  150 (GLX)
  Minor opcode of failed request:  17 (X_GLXVendorPrivateWithReply)
  Serial number of failed request:  29
  Current serial number in output stream:  29

Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
 src/mapi/glapi/gen/gl_API.xml | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index 47b9fcf..8aa35d8 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -5558,7 +5558,6 @@
         <param name="index" type="GLuint"/>
         <param name="pname" type="GLenum"/>
         <param name="params" type="GLdouble *" output="true" variable_param="pname"/>
-        <glx ignore="true"/>
         <glx handcode="client" vendorpriv="1301"/>
     </function>
 
@@ -5566,7 +5565,6 @@
         <param name="index" type="GLuint"/>
         <param name="pname" type="GLenum"/>
         <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
-        <glx ignore="true"/>
         <glx handcode="client" vendorpriv="1302"/>
     </function>
 
@@ -5574,7 +5572,6 @@
         <param name="index" type="GLuint"/>
         <param name="pname" type="GLenum"/>
         <param name="params" type="GLint *" output="true" variable_param="pname"/>
-        <glx ignore="true"/>
         <glx handcode="client" vendorpriv="1303"/>
     </function>
 
-- 
1.8.5.5




More information about the xorg-devel mailing list