PDA

View Full Version : nVidia issue, too little geometry, slowdown



cru
11-03-2004, 04:54 AM
Guys, sorry if this doesn't belong here. I thought that someone might have run across something like this before. Anyway, here goes.

I've got a doosie of a problem. Get this. I've got two systems. Both are dual Xeon dells. One has a nVidia FX3000 (AGP) while the other has a FX3400 (PCI Express). Windows XP Pro. If I load the latest nVidia drivers (61.82) I experience a slowdown. Well, not really a slowdown so much as the app (just the OpenGL window, not my cursor or the OS) freezes for 500-600 milliseconds. This app normally runs @ 60+ fps. If I load older drivers on the FX3000 (say, the 56.72 series) all is well. It appears that I can't load drivers that old on the FX3400.

I've isolated the problem down to a small section of code that goes something like this:

(oh, keep in mind I was using glDrawArrays(), I removed it and replaced with calls to glBegin(), glVertex(), glEnd() to try and debug the problem)

pseudocode follows
{more comments follow)

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

for(;i < numstrips;i++)
{
if(InFrustum(center->x, center->y, center->z, radius) <= 0.0f)
{
continue;
}

glBegin(GL_TRIANGLE_STRIP);

int numpoints = (num points in this strip)
int index = (next starting position of triangle strip)
for(int j = 0; j < numpoints ;j++)
{
glVertex3fv(&amp;pt[index + j].x);
}

glEnd();
}


InFrustum is defined as follows:
float InFrustum( float x, float y, float z, float radius )
{
float d;

for( int p = 0; p < 6; p++ )
{
d = frustum[p][0] * x + frustum[p][1] * y + frustum[p][2] * z + frustum[p][3];
if( d <= -radius )
return 0.0f;
}

return d + radius;
}************************************************* *******

Here's the kicker, if I remove InFrustum OR if I simply comment out the continue, the app performs great. I've went so far as to include a dozen of so calls to InFrustum with no continue, still the app performs great. But, if I leave that continue in there the app will 'lockup' on occasion. One more thing, if I replace the Infrustum code block with a simple:

if(rand() & 1)
{
continue;
}

Everything works great.

I don't get it. What's going on here?

yooyo
11-03-2004, 06:06 AM
Did you try FW 66.81 (there is a link to public beta on nv driver page).

yooyo

jra101
11-03-2004, 07:57 AM
If possible, please send me an app that reproduces this problem and I'll make sure our driver team is aware of the issue.

cru
11-03-2004, 08:06 AM
I'm building an app right now that reproduces the problem.

I'm also having a technician build another system (a Dell) that has nothing installed but the bare essentials in hopes that there may be some sort of odd configuration issue. I doubt this is the case, but you never know.