On Thu, Nov 13, 2003 at 04:40:30PM -0800, Torrey Lyons wrote:
>At 10:01 AM -0800 11/10/03, Ian Romanick wrote:
>>Frank Gießler wrote:
>>>with my current CVS snapshot (Changelog up to 
>>>#530), glxgears gives me the following at 
>>>startup:
>>>
>>>X Error of failed request:  BadLength (poly 
>>>request too large or internal Xlib length error)
>>>   Major opcode of failed request:  144 (GLX)
>>>   Minor opcode of failed request:  1 (X_GLXRender)
>>>   Serial number of failed request:  22
>>>   Current serial number in output stream:  23
>>>
>>>This used to work before. I've seen this on 
>>>both OS/2 and SuSE Linux 8.2 (XFree CVS built 
>>>without DRI). Any idea what this means and/or 
>>>where I should look?
>>
>>Can you give any details to help reproduce this 
>>error?  There is a reported bug in this area, 
>>but I thought that it was fixed.  Your 
>>XF86Config would also be useful.
>>
>>http://bugs.xfree86.org/show_bug.cgi?id=439
>
>I'll put this on Bugzilla as well, but it is 
>quite easy on XDarwin to reproduce this error. 
>GLX fails consistently with indirect rendering 
>and worked properly in 4.3.0. Only direct 
>rendering works now.
>
>[65:~] torrey% glxgears
>2006 frames in 5.0 seconds = 401.200 FPS
>^C
>[65:~] torrey% setenv LIBGL_ALWAYS_INDIRECT 1
>[65:~] torrey% glxgears
>X Error of failed request:  BadLength (poly 
>request too large or internal Xlib length error)
>   Major opcode of failed request:  151 (GLX)
>   Minor opcode of failed request:  1 (X_GLXRender)
>   Serial number of failed request:  22
>   Current serial number in output stream:  23
>
>This bug is still present in the top of the tree.

The patch below fixes the problem.  The command lengths for several
rendering requests were getting set incorrectly because of mis-ordered
variable initialisations.  I'm committing it now.

Index: g_render.c
===================================================================
RCS file: /home/x-cvs/xc/lib/GL/glx/g_render.c,v
retrieving revision 1.5
diff -u -r1.5 g_render.c
--- g_render.c  28 Sep 2003 20:15:01 -0000      1.5
+++ g_render.c  14 Nov 2003 04:17:00 -0000
@@ -1639,8 +1639,8 @@
 void glFogfv(GLenum pname, const GLfloat *params)
 {
        __GLX_DECLARE_VARIABLES();
-       compsize = __glFogfv_size(pname);
        __GLX_LOAD_VARIABLES();
+       compsize = __glFogfv_size(pname);
        cmdlen = 8+compsize*4;
        __GLX_BEGIN(X_GLrop_Fogfv,cmdlen);
        __GLX_PUT_LONG(4,pname);
@@ -1661,8 +1661,8 @@
 void glFogiv(GLenum pname, const GLint *params)
 {
        __GLX_DECLARE_VARIABLES();
-       compsize = __glFogiv_size(pname);
        __GLX_LOAD_VARIABLES();
+       compsize = __glFogiv_size(pname);
        cmdlen = 8+compsize*4;
        __GLX_BEGIN(X_GLrop_Fogiv,cmdlen);
        __GLX_PUT_LONG(4,pname);
@@ -1703,8 +1703,8 @@
 void glLightfv(GLenum light, GLenum pname, const GLfloat *params)
 {
        __GLX_DECLARE_VARIABLES();
-       compsize = __glLightfv_size(pname);
        __GLX_LOAD_VARIABLES();
+       compsize = __glLightfv_size(pname);
        cmdlen = 12+compsize*4;
        __GLX_BEGIN(X_GLrop_Lightfv,cmdlen);
        __GLX_PUT_LONG(4,light);
@@ -1727,8 +1727,8 @@
 void glLightiv(GLenum light, GLenum pname, const GLint *params)
 {
        __GLX_DECLARE_VARIABLES();
-       compsize = __glLightiv_size(pname);
        __GLX_LOAD_VARIABLES();
+       compsize = __glLightiv_size(pname);
        cmdlen = 12+compsize*4;
        __GLX_BEGIN(X_GLrop_Lightiv,cmdlen);
        __GLX_PUT_LONG(4,light);
@@ -1750,8 +1750,8 @@
 void glLightModelfv(GLenum pname, const GLfloat *params)
 {
        __GLX_DECLARE_VARIABLES();
-       compsize = __glLightModelfv_size(pname);
        __GLX_LOAD_VARIABLES();
+       compsize = __glLightModelfv_size(pname);
        cmdlen = 8+compsize*4;
        __GLX_BEGIN(X_GLrop_LightModelfv,cmdlen);
        __GLX_PUT_LONG(4,pname);
@@ -1772,8 +1772,8 @@
 void glLightModeliv(GLenum pname, const GLint *params)
 {
        __GLX_DECLARE_VARIABLES();
-       compsize = __glLightModeliv_size(pname);
        __GLX_LOAD_VARIABLES();
+       compsize = __glLightModeliv_size(pname);
        cmdlen = 8+compsize*4;
        __GLX_BEGIN(X_GLrop_LightModeliv,cmdlen);
        __GLX_PUT_LONG(4,pname);
@@ -1814,8 +1814,8 @@
 void glMaterialfv(GLenum face, GLenum pname, const GLfloat *params)
 {
        __GLX_DECLARE_VARIABLES();
-       compsize = __glMaterialfv_size(pname);
        __GLX_LOAD_VARIABLES();
+       compsize = __glMaterialfv_size(pname);
        cmdlen = 12+compsize*4;
        __GLX_BEGIN(X_GLrop_Materialfv,cmdlen);
        __GLX_PUT_LONG(4,face);
@@ -1838,8 +1838,8 @@
 void glMaterialiv(GLenum face, GLenum pname, const GLint *params)
 {
        __GLX_DECLARE_VARIABLES();
-       compsize = __glMaterialiv_size(pname);
        __GLX_LOAD_VARIABLES();
+       compsize = __glMaterialiv_size(pname);
        cmdlen = 12+compsize*4;
        __GLX_BEGIN(X_GLrop_Materialiv,cmdlen);
        __GLX_PUT_LONG(4,face);
@@ -1902,8 +1902,8 @@
 void glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
 {
        __GLX_DECLARE_VARIABLES();
-       compsize = __glTexParameterfv_size(pname);
        __GLX_LOAD_VARIABLES();
+       compsize = __glTexParameterfv_size(pname);
        cmdlen = 12+compsize*4;
        __GLX_BEGIN(X_GLrop_TexParameterfv,cmdlen);
        __GLX_PUT_LONG(4,target);
@@ -1926,8 +1926,8 @@
 void glTexParameteriv(GLenum target, GLenum pname, const GLint *params)
 {
        __GLX_DECLARE_VARIABLES();
-       compsize = __glTexParameteriv_size(pname);
        __GLX_LOAD_VARIABLES();
+       compsize = __glTexParameteriv_size(pname);
        cmdlen = 12+compsize*4;
        __GLX_BEGIN(X_GLrop_TexParameteriv,cmdlen);
        __GLX_PUT_LONG(4,target);
@@ -1950,8 +1950,8 @@
 void glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params)
 {
        __GLX_DECLARE_VARIABLES();
-       compsize = __glTexEnvfv_size(pname);
        __GLX_LOAD_VARIABLES();
+       compsize = __glTexEnvfv_size(pname);
        cmdlen = 12+compsize*4;
        __GLX_BEGIN(X_GLrop_TexEnvfv,cmdlen);
        __GLX_PUT_LONG(4,target);
@@ -1974,8 +1974,8 @@
 void glTexEnviv(GLenum target, GLenum pname, const GLint *params)
 {
        __GLX_DECLARE_VARIABLES();
-       compsize = __glTexEnviv_size(pname);
        __GLX_LOAD_VARIABLES();
+       compsize = __glTexEnviv_size(pname);
        cmdlen = 12+compsize*4;
        __GLX_BEGIN(X_GLrop_TexEnviv,cmdlen);
        __GLX_PUT_LONG(4,target);
@@ -1998,8 +1998,8 @@
 void glTexGendv(GLenum coord, GLenum pname, const GLdouble *params)
 {
        __GLX_DECLARE_VARIABLES();
-       compsize = __glTexGendv_size(pname);
        __GLX_LOAD_VARIABLES();
+       compsize = __glTexGendv_size(pname);
        cmdlen = 12+compsize*8;
        __GLX_BEGIN(X_GLrop_TexGendv,cmdlen);
        __GLX_PUT_LONG(4,coord);
@@ -2022,8 +2022,8 @@
 void glTexGenfv(GLenum coord, GLenum pname, const GLfloat *params)
 {
        __GLX_DECLARE_VARIABLES();
-       compsize = __glTexGenfv_size(pname);
        __GLX_LOAD_VARIABLES();
+       compsize = __glTexGenfv_size(pname);
        cmdlen = 12+compsize*4;
        __GLX_BEGIN(X_GLrop_TexGenfv,cmdlen);
        __GLX_PUT_LONG(4,coord);
@@ -2046,8 +2046,8 @@
 void glTexGeniv(GLenum coord, GLenum pname, const GLint *params)
 {
        __GLX_DECLARE_VARIABLES();
-       compsize = __glTexGeniv_size(pname);
        __GLX_LOAD_VARIABLES();
+       compsize = __glTexGeniv_size(pname);
        cmdlen = 12+compsize*4;
        __GLX_BEGIN(X_GLrop_TexGeniv,cmdlen);
        __GLX_PUT_LONG(4,coord);
@@ -2838,8 +2838,8 @@
 void glColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params)
 {
        __GLX_DECLARE_VARIABLES();
-       compsize = __glColorTableParameterfv_size(pname);
        __GLX_LOAD_VARIABLES();
+       compsize = __glColorTableParameterfv_size(pname);
        cmdlen = 12+compsize*4;
        __GLX_BEGIN(X_GLrop_ColorTableParameterfv,cmdlen);
        __GLX_PUT_LONG(4,target);
@@ -2851,8 +2851,8 @@
 void glColorTableParameteriv(GLenum target, GLenum pname, const GLint *params)
 {
        __GLX_DECLARE_VARIABLES();
-       compsize = __glColorTableParameteriv_size(pname);
        __GLX_LOAD_VARIABLES();
+       compsize = __glColorTableParameteriv_size(pname);
        cmdlen = 12+compsize*4;
        __GLX_BEGIN(X_GLrop_ColorTableParameteriv,cmdlen);
        __GLX_PUT_LONG(4,target);
@@ -2901,8 +2901,8 @@
 void glConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params)
 {
        __GLX_DECLARE_VARIABLES();
-       compsize = __glConvolutionParameterfv_size(pname);
        __GLX_LOAD_VARIABLES();
+       compsize = __glConvolutionParameterfv_size(pname);
        cmdlen = 12+compsize*4;
        __GLX_BEGIN(X_GLrop_ConvolutionParameterfv,cmdlen);
        __GLX_PUT_LONG(4,target);
@@ -2925,8 +2925,8 @@
 void glConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params)
 {
        __GLX_DECLARE_VARIABLES();
-       compsize = __glConvolutionParameteriv_size(pname);
        __GLX_LOAD_VARIABLES();
+       compsize = __glConvolutionParameteriv_size(pname);
        cmdlen = 12+compsize*4;
        __GLX_BEGIN(X_GLrop_ConvolutionParameteriv,cmdlen);
        __GLX_PUT_LONG(4,target);


David
--
David Dawes
developer/release engineer                      The XFree86 Project
www.XFree86.org/~dawes
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to