Re: Pbuffer Xerror.

New Message Reply Date view Thread view Subject view Author view

Rob Jenkins (robj++at++quid.csd.sgi.com)
Wed, 14 Jan 1998 14:46:49 -0800


On Jan 15, 3:29am, Brainval wrote:
> Subject: Pbuffer Xerror.
> Hello Performers.
>
> When we run the pbuffer program, located in
>
> /usr/share/Performer/src/pguide/libpf/C
>
> we get as result:
>
> PF Notice: Num matching FBConfigs on display
> 0x10033af0=:0.0 screen 0 is 11
> PF Notice: Using 72Hz video rate.
> PF Notice: PBuf is 0x4800005
> PF Notice: PBuf is OPEN
> PF Notice: Main window is OPEN
> X Error of failed request: BadWindow (invalid Window parameter)
> Major opcode of failed request: 12 (X_ConfigureWindow)
> Resource id in failed request: 0x4800005
> Serial number of failed request: 32
> Current serial number in output stream: 33
>

This is unusual, a common error with this kind of code is for glXMakeCurrent to
fail with BadAlloc ( man glXMakeCurrent explains what triggers this ), that can
be avoided by experimenting with the FBConfig you use to make the pbuffer ( try
to use a smaller one ). This isn't the same thing, man XConfigureWindow lists
the BadWindow error but I'm not sure if it's really applicable in this case as
I know that sample code runs on a similar machine to yours. As a shot in the
dark I notice that you only have 128M of RAM, could you look in /var/adm/SYSLOG
and see if you ever run out of swap space around the time you run pbuffer ? If
that is the problem then you should be able to make the example work by adding
some swap ( see man swap ). Also, if that is the case then the other more
complicated but better solution would be to use a smaller FBconfig, in
pbuffer.c there's a section of code like:

    fbc = glXChooseFBConfigSGIX(dsp, 0, FBAttrs, &num);
pfNotify(PFNFY_NOTICE,PFNFY_PRINT,"Num matching FBConfigs on display 0x%p=%s
screen %d is %d",
        dsp, XDisplayString(dsp), screen, num);

    pfGetPWinSize(pw, &xs, &ys);
    /* just use first FBConfig found */
    pfPWinFBConfig(pw, fbc[0]);

Which while this is OK for demo purposes, it would be good to go through that
list of FBconfigs ( returned by glXChooseFBConfigSGIX ) and find the one best
suited to your app, I think that on iR machines the first one return has a huge
accum buffer etc that you really don't need.

On iR you could try adding logic like this after glXChooseFBConfigSGIX:
    /* find an FBconfig in list with RGB == 10 and Zbuffer > 1 */
    for(i = 0; i < num; i++)
    {
        glXGetFBConfigAttribSGIX(dpy, fbc[i], GLX_RED_SIZE, &a[0]);
        glXGetFBConfigAttribSGIX(dpy, fbc[i], GLX_GREEN_SIZE, &a[1]);
        glXGetFBConfigAttribSGIX(dpy, fbc[i], GLX_BLUE_SIZE, &a[2]);
        glXGetFBConfigAttribSGIX(dpy, fbc[i], GLX_ALPHA_SIZE, &a[3]);
        glXGetFBConfigAttribSGIX(dpy, fbc[i], GLX_DEPTH_SIZE, &a[4]);
        printf("r = %d, b = %d g = %d a = %d z = %d\n",
                                          a[0],a[1],a[2],a[3],a[4]);
        if(a[0] == 10 && a[1] == 10 && a[2] 10 && a[3] == 0 && a[4] > 1)
        { match = i; break; }
    }

then use fbc[match] for the pbuffer.
It may be simpler that all that, make sure you have the gfx patch 2326
installed and that you have pf 2.2 MR, do:

elfdump -L /usr/lib/libpf* | grep IVERSION

And you should see a list of thins like:

[35] IVERSION sgi4.0.440

where the 4.0 shows it's pf 2.2 and the 440 is the alpha number of 2.2 that you
have - alpha 440 was the MR version. If none of this helps let me know.

Cheers
Rob

>
> What we have as machine and software is:
>
> We are using Performer 2.2.
>
> The output of uname -a is:
> IRIX64 onyx 6.4 02121744 IP27
> Hinv:
> FPU: MIPS R10010 Floating Point Chip Revision: 0.0
> CPU: MIPS R10000 Processor Chip Revision: 2.6
> 2 195 MHZ IP27 Processors
> Main memory size: 128 Mbytes
> Instruction cache size: 32 Kbytes
> Data cache size: 32 Kbytes
> Secondary unified instruction/data cache size: 4 Mbytes
>
> gfxinfo:
>
> Graphics board 0 is "KONAL" graphics.
> Managed (":0.0") 1280x1024
> Display has 2 channels
> 4 GEs (of 4), occmask = 0x0f
> 4MB external BEF ram, 32bit path
> 1 RM7 board (of 1) 1/0/0/0
> Texture Memory: 64MB/-/-/-
> Medium pixel depth
> 32K cmap
> Channel 0:
> Origin = (0,0)
> Video Output: 1280 pixels, 1024 lines, 72.00Hz
> (1280x1024_72.vfo)
> Channel 2 (physical port 198):
> Origin = (0,0)
> Video Output: 720 pixels, 486 lines, 29.97Hz
> (CCIR601_525_DGO.vfo)
>
>
>
> --
> Brainstorm Multimedia.
> Software development.
>
> e_mail: brainval++at++ehome.encis.es
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
>-- End of excerpt from Brainval

-- 
________________________________________________________________
Rob Jenkins mailto:robj++at++sgi.com
Silicon Graphics, Mtn View, California, USA
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:56:33 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.