Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 05-22-03, 03:38 AM   #1
kuik
Registered User
 
Join Date: May 2003
Location: Netherlands
Posts: 2
Default glXMakeCurrent kills X server, problem with stencil buffer

Currently I use two NVIDIA cards under Linux (RedHat 9), GeForce3 Ti 200 and Quadro4 550 XGL. Most features work fine. However, I have two problems.

1) The following code works fine with GeForce3 but crashes the X-server with Quadro4. This happens when I use Option "Stereo" "1" in XF86Config, even when I never use a visual with GLX_STEREO.

glx = glXCreateContext( dpy, vis, None, GL_FALSE );
eps_pixmap = XCreatePixmap( dpy, win, width, height, vis->depth );
eps_glxpixmap = glXCreateGLXPixmap( dpy, vis, eps_pixmap );
glXMakeCurrent( dpy, eps_glxpixmap, glx );

X-server crashes

in /var/log/messages:
gdm_slave_xioerror_handler: Fatal X error - Restarting :0

in some previous versions of the NVIDIA drivers, GeForce3 also crashed the X-server, This got fixed since (I think) version-1.0-4191.

2) The stencil buffer skips one ore more lines. (for GeForce3 and Quadro4) This behaviour is influenced by the use of other features. For example:

glEnable(GL_LINE_SMOOTH);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

will reduce the stencil buffer to a few lines in the middle of the window.

-----------------------------------------------------
current driver driver: version = 1.0.4363

The cards are recognized as follows:

(II) NVIDIA(0): NVIDIA GPU detected as: Quadro4 550 XGL
(--) NVIDIA(0): VideoBIOS: 04.17.00.44.16Quadro4
(--) NVIDIA(0): VideoRAM: 65536 kBytes

(II) NVIDIA(0): NVIDIA GPU detected as: GeForce3 Ti 200
(--) NVIDIA(0): VideoBIOS: 03.20.00.18.00
(--) NVIDIA(0): VideoRAM: 65536 kBytes


Regards,
Albert
kuik is offline   Reply With Quote
Old 06-18-03, 04:05 PM   #2
zimmer
Registered User
 
Join Date: Aug 2002
Posts: 8
Default

I hear ya.

Setting the stereo option to "1" causes glXMakeCurrent() to kill the X-Server when binding to a GLXPixmap drawable.

I reported this bug to nvidia last fall. They never replied, or fixed the problem. It exists in all drivers for Quadro-4 >= 3123.

I've attached the test code.

Perhaps they expect us to use back-buffer tiled rendering, or pbuffer extensions instead of off-screen bitmaps?
zimmer is offline   Reply With Quote
Old 06-19-03, 07:41 AM   #3
kuik
Registered User
 
Join Date: May 2003
Location: Netherlands
Posts: 2
Default pixmaps and pbuffers

I also have reported this bug to nvidia. They replied that they could reproduce it and would investigate. So who knows what will happen next.

Pbuffers work fine with stereo option "1". However, it would be nice to use programs without being afraid of pixmaps crashing the X-server.
kuik is offline   Reply With Quote
Old 06-24-03, 12:02 PM   #4
am2020
Quadro4
 
Join Date: Aug 2002
Location: USA
Posts: 63
Default

You know, this would be so much easier if we could help debug the problems...
(By having SOURCE CODE !!!)
am2020 is offline   Reply With Quote
Old 06-24-03, 02:31 PM   #5
zimmer
Registered User
 
Join Date: Aug 2002
Posts: 8
Default

Quote:
(By having SOURCE CODE !!!)
Better check with with Albert (Kuik) for the stencil buffer code. I think he was simply fishing to see if anyone else had experienced the same problem... which is a valid first step to identifying a problem.

The pixmap problem is a no-brainer, his in-line code sums it up. My attachment last time failed for some reason (it was a .txt file), so here it is in-line:

***********************

#include <X11/Xlib.h>
#include <GL/glx.h>
#include <stdio.h>

int main(int argc, char *argv[])
{
int config[] = {
GLX_RGBA,
GLX_RED_SIZE, 1,
GLX_GREEN_SIZE, 1,
GLX_BLUE_SIZE, 1,
GLX_DEPTH_SIZE, 1,
None };
int w = 640;
int h = 480;
Display *dpy = NULL;
XVisualInfo *xvi = NULL;
Pixmap xpm = 0;
GLXContext glxctx = NULL;
GLXPixmap glxpm = 0;
int test_level = 0;

if(argc == 2) test_level = atoi(argv[1]);
if(test_level < 1) test_level = 42;


printf("1: Opening display...");
dpy = XOpenDisplay(NULL);
if(!dpy)
{
printf("FAILED\n");
return 1;
}
printf("OK\n");
if(1 == test_level) goto DONE;

printf("2: Querying OpenGL...");
if(!glXQueryExtension(dpy, 0, 0))
{
printf("NOT SUPPORTED\n");
return 2;
}
printf("OK\n");
if(2 == test_level) goto DONE;


printf("3: Selecting visual...");
xvi = glXChooseVisual(dpy, DefaultScreen(dpy), config);
if(!xvi)
{
printf("NOT SUPPORTED\n");
return 3;
}
printf("OK\n");
if(3 == test_level) goto DONE;


printf("4: Creating X pixmap...");
xpm = XCreatePixmap(dpy, DefaultRootWindow(dpy), (unsigned)w, (unsigned)h, xvi->depth);
if(!xpm)
{
printf("FAILED for size: %i x %i\n", w, h);
return 4;
}
printf("OK\n");
if(4 == test_level) goto DONE;


printf("5: Creating GLX context...");
glxctx = glXCreateContext(dpy, xvi, NULL, False);
if(!glxctx)
{
printf("FAILED");
return 5;
}
printf("OK\n");
if(5 == test_level) goto DONE;


printf("6: Creating GLX pixmap...");
glxpm = glXCreateGLXPixmap(dpy, xvi, xpm);
if(!glxpm)
{
printf("FAILED for size: %i x %i\n", w, h);
return 6;
}
printf("OK\n");
if(6 == test_level) goto DONE;


printf("7: Make current...");
if(!glXMakeCurrent(dpy, glxpm, glxctx))
{
printf("KABOOM!\n");
return 7;
}
printf("OK\n");


DONE:
printf("Done\n");
return 0;
}

***********************
zimmer is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:05 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.