PDA

View Full Version : OpenGL On ATI vs NVidia



MaxH
05-06-2004, 08:53 PM
Just got a new laptop with an ATI Radeon 9700 video board. Tried porting two of my own OpenGL programs from my desktop (NVidia GeForce) over to the laptop. Neither program runs correctly on the laptop. Recompiled one of the apps on the laptop hoping the problems would go away. No luck. Downloaded and installed the latest ATI drivers from Dell. No luck. Is there a problem with ATI boards running OpenGL? Could this be sloppy OGL programming on my part? The biggest problem is that clipping is not occurring at the edges of viewports. Graphics, particularly texture-mapped objects are running over into neighboring viewports without being clipped! Any ideas or suggestions? Thanks.

evanGLizr
05-06-2004, 09:15 PM
Originally posted by MaxH:
Just got a new laptop with an ATI Radeon 9700 video board. Tried porting two of my own OpenGL programs from my desktop (NVidia GeForce) over to the laptop. Neither program runs correctly on the laptop. Recompiled one of the apps on the laptop hoping the problems would go away. No luck. Downloaded and installed the latest ATI drivers from Dell. No luck. Is there a problem with ATI boards running OpenGL? Could this be sloppy OGL programming on my part? The biggest problem is that clipping is not occurring at the edges of viewports. Graphics, particularly texture-mapped objects are running over into neighboring viewports without being clipped! Any ideas or suggestions? Thanks.Write down 1000 times: "OpenGL spec states that the viewport doesn't perform clipping".
Once you've done that, add code to your program to use the frustum or scissor to clip.

Tonight's recommended reading Avoiding 16 Common OpenGL Pitfalls (http://www.opengl.org/resources/features/KilgardTechniques/oglpitfall/) (specially pitfall 10).

MaxH
05-06-2004, 09:48 PM
Thanks for the tip. I actually tried to implement glScissor earlier today. It didn't help, but now I see (on rereading the documentation) that I implemented it incorrectly. So I'll try that again tomorrow. But a big question still remains - Why does this program run correctly on PCs equipped with GeForce cards? Did NVidia actually add clipping to their implementation of glViewport? Thanks again for the feedback.

harsman
05-07-2004, 01:39 AM
Scissoring is disabled by default, you need to glEnable(GL_SCISSOR). I know this has tripped me up in the past.

The reason nvidia clips to the viewport might be to work around a bug in some important application. They have been known to do this in other cases, e.g. they have had unconformant GL_CLAMP behaviour for ages just because so many apps use it wrong.

Brian Paul
05-07-2004, 05:41 AM
While the viewport does not define a clipping rectangle, a polygon should never extend beyond the viewport's boundaries. After frustum clipping and perspective division, all vertices will be in NDC coordinates [-1,1]^3 which get mapped into the viewport. Thus, a vertex should never lie outside the viewport.

Sounds like a bug in ATI's driver.

-Brian

MaxH
05-07-2004, 08:21 AM
Voila! Proper implementation of glScissor took care of the problem. Thanks go to the forum.

dorbie
05-07-2004, 08:34 AM
Implementations use guard band clipping all the time to help performance. By definition this generates vertices beyond the viewport. Even though conceptually clipping is supposed to happen at a certain stage in the pipeline often the difference is indistinguishable **so long as you don't generate the fragments**, unfortunately they did.

evanGLizr
05-07-2004, 12:02 PM
Hmmm on an afterthought, I'm with dorbie and Brian Paul on this. I think it's a driver bug because of using guardband clipping. The driver shouldn't be using guardband if the viewport doesn't cover the full window (the driver cannot just use scissor under the hood to avoid that, because then it wouldn't produce fragments outside the viewport when it should).

The kind of fragments you get out of the viewport normally come from wide lines, wide points or rasterpos primitives.

jwatte
05-07-2004, 01:18 PM
Well, my Dell Inspiron 9100 has a Mobility Radeon 9700, and the fire effect in my simple-fire-source-code demo doesn't render. That same effect renders on miscellaneous hardware (GF2GTS, GFFX5700, Radeon 9700 Pro, etc) so I'm pretty sure it's the Catalyst 3.10 that Dell ships. That's they latest they have. Contacting their support just gives me "re-install from the CD" which doesn't help. (The app runs fine on Catalyst 4.3 on desktop boards)

Anyway, long story short, looks like we're stuck with yet another "stellar" set of Dell drivers. Does anyone know how to make surgery on the driver to get a better OpenGL implementation? Is it safe to just drop in a newer atioglxx.dll ?

dorbie
05-07-2004, 05:08 PM
They could toggle scissors & clipping under the hood.

evanGLizr
05-07-2004, 05:43 PM
Originally posted by dorbie:
They could toggle scissors & clipping under the hood.I don't think you can toggle scissoring under the hood for the guarband case if you want to be strictly OpenGL compliant. Scissoring would reject fragments you should see otherwise.

For example, if you draw a wide point/line in the limits of the viewport, with scissor off, you will see fragments of the point/line outside the viewport, with scissor to the viewport you won't see them, which is not OpenGL compliant.

Also switching guardband dynamically under the hood intra or inter frames is not an option because of invariance rules.

dorbie
05-07-2004, 06:03 PM
I read your earlier post hence I suggested a *toggle*. Depending on the primitive you either have scissor on or a true clip.

Most primitives could use guard band and others could use a clip. w.r.t. invariance I think this would work, all polygonal style primitives could guard band and all others could clip without causing invariance issues.

Besides w.r.t. non compliance I think drawing outside the viewport is probably worse than most other issues some of which seem marginal at best.

Korval
05-07-2004, 07:50 PM
Actually, the driver issue is something that I would like to know, as a future buyer of a laptop (likely Dell). Can you get updates to your drivers? And, if Dell doesn't update resonably fast, can we just drop in a few .dll's or something and have it all just work?

forgottenaccount
05-07-2004, 10:28 PM
Originally posted by jwatte:
Anyway, long story short, looks like we're stuck with yet another "stellar" set of Dell drivers. Does anyone know how to make surgery on the driver to get a better OpenGL implementation? Is it safe to just drop in a newer atioglxx.dll ?Please get on Dell's case in any way you can to get new drivers. It sucks that IHV's have fixed issues that prevent applications from working, but laptop users are officially screwed.

Unoffically there are work arounds such as D-force (http://download.guru3d.com/pafiledb.php?action=file&id=602) and laptop video 2 go (http://www.laptopvideo2go.com/) . I don't know if the Omega or Radeon DNA driver hacks support mobile chips or not.

Personally I'd just drop in a newer atioglxx.dll on hope for the best because it is the easiest to undo if it doesn't work. I've done that on the desktop to quickly test running with different (but similar) driver versions and it seemed to work just fine.

jwatte
05-09-2004, 09:50 AM
Actually, the driver issue is something that I would like to know, as a future buyer of a laptop (likely Dell). Can you get updates to your drivers? And, if Dell doesn't update resonably fast, can we just drop in a few .dll's or something and have it all just work?Dell driver updates are few and far between, and when they release an update, it's usually about 3 months old by the time they release it.

About two years ago, they stayed on version 28 NVIDIA drivers for an ENTIRE YEAR before they released another driver set.

If frequent driver updates is the most important to you, Dell's not your laptop brand.

ScottManDeath
05-09-2004, 09:52 AM
At least for nVidia mobile chips this can be fixed. Just extract the driver and add the device ids for the chip to the nvdisp.inf files (use the values from the original driver). At the moment I am running Detonator 60.72. Sony insists their users to still use their 45.xx drivers :(

Pakk
06-01-2004, 09:58 AM
I have to mention that nvidia does a great job on their drivers (Linux/Windows). After using them for several years, I was convinced that ATI Radeon was a better choice. I've tried the 9600 pro and got very frustrated. At that time (october 2003) ATI's drivers for Linux were very bad: it's installation was confusing and hard. And after sometime to get it working, I found out that it's OpenGL version was 1.3 (obsolete).

I don't need to mention that I sould that board and bought a NVidia GeForce 5700 Ultra.

CrazyButcher
06-01-2004, 10:29 AM
ran a geforce2go on a Dell without issues (cept their ultra long update cycles, but well everything worked fine for my needs)
now running a ATI mobile 9600 which runs perfect as well in a Acer laptop. In total the equipment and software and such is better for the Dells, especially their keyboards (Inspiron) were better, there is also quite some software to tweak noise of coolers and so on.

but well I think both ATI and NVI are on pretty damn high level, that those "wars" about who is better shouldnt be lead so serious hehe
without big ones competing progress wouldnt be as fast, and as long as both of them keep pumping out crazy cards, I am happy the "old insane" cards fall in price ;)
though I prefer Nvidia drivers having more things to tweak, then again didnt see a reason to tweak on the ati card yet :)

jwatte
06-01-2004, 01:33 PM
If you're not running into driver bugs, you're not pushing hard enough :-)

CrazyButcher
06-02-2004, 01:51 AM
hehe that is certainly true, the drivers that made me go mad were non ati/nvi ;) cause doing ogl 1.3 stuff which doesnt seem to cause troubles anymore on the big ones, and cannot be considered pushing hehe