From: Rick van Haasen (rick.van.haasen++at++philips.com)
Date: 10/04/2005 05:28:22
Hi,
I had more or less the same situation with 4 screens (2 graphics cards,
each card using 2 monitors, using twinview on each card, effectively using
2 "x-screens" where each screen covers 2 monitors).
I found out that the message has to to with the fact that each x-screen
uses different visual id's for effectively the same visual: if you run
glxinfo you can verify this.
So if performer first determines a visual-id on 1 screen, and then tries
to use this id to create the visuals on both screens it will fail on 1 of
the other screen.
I verified this by explicitely requesting the visual:
pViewer->getPipe(0)->getPWin(0)->setVisualId(0x47); // pViewer is a
pointer to pfvViewer
pViewer->getPipe(1)->getPWin(0)->setVisualId(0x16a);
.......blabla
pViewer->config();
(In this system i use 2 nvidia quadro fx1400 cards, using the latest
drivers)
this way i didn't get the warning anymore.
So it seems like a Performer issue to me.....
Rick.
"Christopher D. Johnson" <cubicwts++at++excite.com>
Sent by:
owner-info-performer++at++performer.engr.sgi.com
2005-10-03 20:31
Please respond to
cubicwts++at++excite.com
To
info-performer++at++sgi.com
cc
Subject
[info-performer] Multipipe Initialization
Classification
Greetings all. I have a simulation program running on a dual processor PC.
There is an upper and a lower LCD display, with the lower LCD being a
touch screen. The lower screen is "display 0" while the upper screen is
"display 1".
What I am trying unsuccessfully to do is initialize performer so that I
have 2 pfPipes created (one for each display) and each pfPipe has just a
single pfPipeWindow attached to it. Everything initializes seemingly fine
until I call pfFrame() for the first time, at which time I see my full
screen windows created (blank) on the uper and lower display, and then it
bombs out (the screens disappear) and I get the following notice:
"PF Notice: pfChooseFBConfig: failed to make configuration matching
specified attributes"
Below that I get a "BadWindow" message as my X calls try to operate on the
lower window created. Simply going back to one pipe, one window runs fine.
Here are the functions I am using to initialize performer and initialize
the pfPipes and pfPipeWindows. I've looked in the Performer manual and
tried to set the pipes and windows up to work properly, but obviously I am
missing something. Any clues?
static void
initPerformer(void)
{
void *arena = NULL;
pfSharedArenaSize(134217728); /* 128 * 1024 * 1024 = 128 Mb */
// pfSharedArenaSize(167772160); /* 160 * 1024 * 1024 = 128 Mb */
// pfSharedArenaSize(268435456); /* 256 * 1024 * 1024 = 256 Mb */
pfInit();
arena = pfGetSharedArena();
/* Allocate Global Variables */
mttGlobal = pfMalloc(sizeof(global_t), arena);
MttGfx = pfMalloc(sizeof( MTTGFX ), arena);
c_ = pfMalloc(sizeof( struct ForCComm ), arena);
ntReq = pfMalloc(sizeof(NTREQ), arena);
Client = pfMalloc(sizeof( CLIENT ), arena);
BBoxTerrain = pfMalloc(sizeof ( pfBox ), arena);
/* initialize global values */
initGlobal();
/*------------------------------------------------------
* Initialize main Gfx variables.
*-----------------------------------------------------*/
initGfx();
readConfigFile();
// pfMultiprocess(PFMP_DEFAULT);
pfMultiprocess(PFMP_FORK_DBASE | PFMP_FORK_LPOINT);
pfMultipipe(2);
// scb - uncommented Multithread(...)
/* pfMultithread(0, PFPROC_CULL, 2); */
pfdInitConverter("flt");
pfConfig();
pfFilePath( "../data/");
pfNotifyLevel(PFNFY_FATAL);
#ifdef GFXAUTOSYNC
pfFrameRate(MttGfx->FrameRate);
pfPhase(PFPHASE_LOCK);
#endif
}
static void OpenPipeWin(pfPipeWindow *pwin)
{
pfOpenPWin(pwin);
}
static void
initPipeWindow(void)
{
int constraints[] = {
PFFB_DOUBLEBUFFER,
PFFB_RGBA,
PFFB_RED_SIZE, 5,
PFFB_GREEN_SIZE, 5,
PFFB_BLUE_SIZE, 5,
PFFB_ALPHA_SIZE, 1,
PFFB_STENCIL_SIZE, 8,
PFFB_DEPTH_SIZE, 15,
(int)NULL
};
/*------------------------------------------------------
* Configure graphics pipeline.
*-----------------------------------------------------*/
mttGlobal->gfxPipeLOWER = pfGetPipe(0);
if (!(mttGlobal->gfxPipeLOWER)) {
fprintf(stderr, "ERROR: Unable to initialize (pfPipe *) LOWER!\n");
abort();
}
mttGlobal->gfxPipeUPPER = pfGetPipe(1);
if (!(mttGlobal->gfxPipeUPPER)) {
fprintf(stderr, "ERROR: Unable to initialize (pfPipe *) UPPER!\n");
abort();
}
pfPipeScreen(mttGlobal->gfxPipeLOWER,0);
pfPipeScreen(mttGlobal->gfxPipeUPPER,1);
mttGlobal->pwinLOWER = pfNewPWin(mttGlobal->gfxPipeLOWER);
if (!(mttGlobal->pwinLOWER)) {
fprintf(stderr, "ERROR: Unable to initialize (pfWindow *)
LOWER!\n");
abort();
}
mttGlobal->pwinUPPER = pfNewPWin(mttGlobal->gfxPipeUPPER);
if (!(mttGlobal->pwinUPPER)) {
fprintf(stderr, "ERROR: Unable to initialize (pfWindow *)
UPPER!\n");
abort();
}
pfPWinName(mttGlobal->pwinLOWER,MttGfx->ScreenLOWER.Name);
pfPWinType(mttGlobal->pwinLOWER, PFWIN_TYPE_X);
pfPWinMode( mttGlobal->pwinLOWER, PFWIN_NOBORDER, 1);
pfPWinConfigFunc( mttGlobal->pwinLOWER, OpenPipeWin);
pfChoosePWinFBConfig( mttGlobal->pwinLOWER, constraints);
pfConfigPWin( mttGlobal->pwinLOWER );
pfPWinOriginSize(mttGlobal->pwinLOWER, 0, 0,
MttGfx->ScreenLOWER.SizeW,
MttGfx->ScreenLOWER.SizeH);
//pfPWinScreen(mttGlobal->pwinLOWER,0);
pfOpenPWin(mttGlobal->pwinLOWER);
pfPWinName(mttGlobal->pwinUPPER,MttGfx->ScreenUPPER.Name);
pfPWinType(mttGlobal->pwinUPPER, PFWIN_TYPE_X);
pfPWinMode( mttGlobal->pwinUPPER, PFWIN_NOBORDER, 1);
pfPWinConfigFunc( mttGlobal->pwinUPPER, OpenPipeWin);
pfChoosePWinFBConfig( mttGlobal->pwinUPPER, constraints);
pfConfigPWin( mttGlobal->pwinUPPER );
pfPWinOriginSize(mttGlobal->pwinUPPER, 0, 0,
MttGfx->ScreenUPPER.SizeW,
MttGfx->ScreenUPPER.SizeH);
//pfPWinScreen(mttGlobal->pwinLOWER,1);
pfOpenPWin(mttGlobal->pwinUPPER);
/* set off the draw process to open windows and call init callbacks */
pfFrame();
sleep(3);
pfPWinFullScreen( mttGlobal->pwinLOWER );
pfPWinFullScreen( mttGlobal->pwinUPPER );
mttGlobal->dspLOWER = pfGetCurWSConnection();
// Logic To Set Up Catching Of X-Events on the lower touch screen
mttGlobal->winLOWER = pfGetPWinWSWindow(mttGlobal->pwinLOWER);
XSelectInput(mttGlobal->dspLOWER,mttGlobal->winLOWER,KeyPressMask |
ButtonPressMask );
XMapWindow(mttGlobal->dspLOWER,mttGlobal->winLOWER);
XSync(mttGlobal->dspLOWER,FALSE);
/*------------------------------------------------------
* Remove cursor arrow.
*-----------------------------------------------------*/
#ifndef TESTMTT
pfuLoadPWinCursor(mttGlobal->pwinLOWER, PFU_CURSOR_OFF);
#endif
}
Christopher D. Johnson
AV-8B Harrier II Simulators
ISEO Support Team
Cherry Point, NC
252-466-4542
252-466-4538
_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
-----------------------------------------------------------------------
List Archives, Info, FAQ: http://www.sgi.com/software/performer/
Open Development Project: http://oss.sgi.com/projects/performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
-----------------------------------------------------------------------
This archive was generated by hypermail 2b29 : Tue Oct 04 2005 - 05:30:36 PDT