http://bugs.freedesktop.org/show_bug.cgi?id=9823





------- Comment #2 from [EMAIL PROTECTED]  2007-03-28 18:40 PST -------
The cause is at __glGetBooleanv_size() (GL/glx/indirect_size_get.c, at
xserver-side), the alias of __glGetFloatv_size(), which is short of considering
GL_CLIENT_ATTRIB_STACK_DEPTH (and GL_MAX_CLIENT_ATTRIB_STACK_DEPTH, by the
way).
__glXDisp_GetFloatv() (GL/glx/indirect_dispatch.c) calls _glGetFloatv_size() to
get "compsize" at first and calls __glXSendReply() which fills the fields of
"reply" and writes the "reply" to client (see the copied code below). The field
"size" is just filled with value of "compsize". -- Which is consistent with
what was mentioned in this bug's discription.
-------------------------
        const GLuint compsize = __glGetFloatv_size(pname);
        GLfloat answerBuffer[200];
        GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer,
sizeof(answerBuffer), 4);

        if (params == NULL) return BadAlloc;
        __glXClearErrorOccured();

        CALL_GetFloatv( GET_DISPATCH(), (
            pname,
            params
        ) );
        __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
-------------------------

However file indirect_size_get.c is generated by
src/mesa/glapi/glX_proto_size.py, which utilizing the file
(src/mesa/glapi/gl_API.xml). I think add this patch to gl_API.xml will be OK to
generate indirect_size_get.c: 
-------------------------
diff --git a/src/mesa/glapi/gl_API.xml b/src/mesa/glapi/gl_API.xml
index 2821503..b7c1a7c 100644
--- a/src/mesa/glapi/gl_API.xml
+++ b/src/mesa/glapi/gl_API.xml
@@ -317,7 +317,9 @@
     <enum name="ATTRIB_STACK_DEPTH"            count="1"  value="0x0BB0">
         <size name="Get" mode="get"/>
     </enum>
-    <enum name="CLIENT_ATTRIB_STACK_DEPTH"                value="0x0BB1"/>
+    <enum name="CLIENT_ATTRIB_STACK_DEPTH"     count="1"  value="0x0BB1">
+        <size name="Get" mode="get"/>
+    </enum>
     <enum name="ALPHA_TEST"                    count="1"  value="0x0BC0">
         <size name="Get" mode="get"/>
     </enum>
@@ -577,7 +579,9 @@
     <enum name="MAX_VIEWPORT_DIMS"             count="2"  value="0x0D3A">
         <size name="Get" mode="get"/>
     </enum>
-    <enum name="MAX_CLIENT_ATTRIB_STACK_DEPTH"            value="0x0D3B"/>
+    <enum name="MAX_CLIENT_ATTRIB_STACK_DEPTH" count="1"  value="0x0D3B">
+        <size name="Get" mode="get"/>
+    </enum>
     <enum name="SUBPIXEL_BITS"                 count="1"  value="0x0D50">
         <size name="Get" mode="get"/>
     </enum>
-------------------------
This patch just ONLY ensures that the server can respond client's request with
a valid size value. Since  glPushClientAttrib() and glPopClientAttrib()
operates those attribute at client-side locally, get_client_data()
(src/glx/x11/single2.c) should also consider process
GL_CLIENT_ATTRIB_STACK_DEPTH. But current implementation doesn't.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to