pouët.net

Go to bottom

New ATI problems and worries- your help will be much appreciated

category: general [glöplog]
Hi,

I've got a couple of questions and maybe you can help me: I've changed quite a few things in my 3d engine, and, working with nvidia cards only, I wonder what can go wrong on ATIs and how can I fix it. Unfortunately we've got no ATIs here at ASD heavy industries, so:

I admit I don't know the current hardware range of ATI. So.. what is the model number of the 8xxx 9xxx (i.e. 9600) nvidia card ? Something with shader model 3.0 at least and support for GLSL (is X1950 what I'm looking for?)

I'm using Opengl and FBOs with multisampling, MRTs and the GLSL profile through Cg. I've heard that the code produced in this case would need a "-po ATI_draw_buffers" when compiling with cg(!?). Also I was told to rather use CG_PROFILE_ARBFP1 instead of GLSL. Would there be any penalties for that ?


my fragment code usually looks like:

void main (
..
out float4 oColor1: COLOR0,
out float4 oColor2: COLOR1) {
oColor1=...
oColor2=..
}

any other issues I should be aware of ?

If anyone has a modern ATI and some spare time to run through a short series of tests next week (run 4-5 exes that I'll post), it would potentially save us from alot of trouble and grief. thanks.
added on the 2009-03-16 16:51:24 by Navis Navis
Errrr... Wait wait wait. There is something that I don't get.

You are using Cg with GLSL as target? (did i understand correctly?).
So it means you are writing code in Cg and have an extra DLL for it to transform it in GLSL so that your nvidia opengl driver can take its internal built-in Cg compiler with GLSL as a parsing profile to compile it for your hardware? o_O

As for the shader models, you might find this page has some interrest.
added on the 2009-03-16 17:07:56 by nystep nystep
yes thats true. It feels more convenient to try out the different shader models like that (I had this setup for ages). the GLSL produced code (parsed through Cg) looks almost identical to my code. I don't mind about the extra dll.
thanks for link
added on the 2009-03-16 17:10:53 by Navis Navis
navis: the ati 4850/4870 is about the latest ati card i think. thats 9800 equivalent, maybe a bit better.
added on the 2009-03-16 17:21:26 by smash smash
2000 series is equivalent to nvidia 8000 series, roughly.

One random thing I hit recently: the ATI 1000 series doesn't seem to support additive blending in RGBAf mode for some reason. It worked fine on my 2600 card, and the spec sheet doesn't seem to indicate that it might be a problem, so it was a bit of a surprise. Might be an OSX driver issue though.
added on the 2009-03-16 17:51:02 by psonice psonice
i think the ati 1000s and geforce 7000s only support blending on 16bit float rendertargets, not on 32bit ones.
added on the 2009-03-16 18:12:05 by ryg ryg
psonice: because 2xxx series is dx10-class hardware, and so has to support floating point blending. 1xxx isnt, and doesnt support that and quite a lot of other stuff too.
added on the 2009-03-16 18:27:17 by smash smash
That'll be why then. Not that it particularly matters, but it's good to know. Thanks for the answers :)
added on the 2009-03-16 18:29:07 by psonice psonice
opengl + fbo + mrt + multisample is a big mess these days, no matter if you're going for ati nor nvidia. not saying one can't get it work but theres always another issue with different cards and driver versions.
added on the 2009-03-16 20:52:43 by supah supah
true MRT is a bit a pain in the ass in opengl. Is it me or there isnt any way to select a different blending mode for each target? :>
added on the 2009-03-16 21:27:54 by nystep nystep
ASD heavy industries should buy a dirt cheap HD3450 - slow but feature complete :)
X1x00 is shader model 3, but a bit different feature set than gf6/7. HD2x00 is dx10, HD3xx0/HD4xx0 is dx10.1.

And don't use Cg ;) But I guess the only good thing about it, is that the compiler will usually produce valid glsl code (which you would have a hard time doing with only (the very same) nvidia compiler. And apart from things not fitting the ARBFP1 limitations I could imagine performance penalities by using that stone age intermediate target..

nystep: that B3D page looks wrong here and there and a bit outdated (no rv7x0 chips).
added on the 2009-03-16 22:14:47 by Psycho Psycho
So, after a gruelling debugging session with Bonzaj, this is what we (well, he) found:

* opengl + fbo + mrt + multisample+cg is a big mess, yes, but it can work if you are patient enough.

* if you are using ATI go for
CG_PROFILE_ARBVP1; CG_PROFILE_ARBFP1;

CG_PROFILE_GLSLF just won't work and we don't know why
on nvidia you can use cgGLGetLatestProfile(CG_GL_FRAGMENT);


* on ATI do NOT use cgGLSetOptimalOptions(CG_PROFILE_ARBFP1);

* on ATI this helped:

const char* fragment_options[] = {"-po","ATI_draw_buffers",0};
Programs[progr] = cgCreateProgramFromFile(Context,
CG_SOURCE,program_file,
FP,
NULL, fragment_options);

but I'm not sure if it is needed or not.



Thanks to Bonzaj once again and to Rob/Aardbei for helping out !
added on the 2009-03-17 19:59:21 by Navis Navis
what about Intel DX10 chips ? :-)
added on the 2009-03-18 09:09:10 by aftu aftu
I just noticed: 4.7mb for latest cg.dll !? are they joking ?? previous version was 900kb, whats goin on ?
added on the 2009-03-18 21:47:56 by Navis Navis
Navis: looks like they want to keep up with the size of the D3DX dll :)
added on the 2009-03-18 21:51:10 by keops keops
hm how can I reduce that. There must be a way
added on the 2009-03-18 21:52:24 by Navis Navis
you can try upx on your DLL (i wonder if some other packers handle DLLs..)...
added on the 2009-03-18 22:18:29 by nystep nystep
Just reduce it to zero bytes by going glsl instead :D
added on the 2009-03-18 23:35:14 by Psycho Psycho
upx can reduce all my dlls to 2.2 mbs. Not bad, a demo nearly 7 mins gets to fit inside a 13mb zip, the music file being half that value !

I can live with that.
added on the 2009-03-18 23:40:37 by Navis Navis
i'm expecting something awesome at BP now. :>
navis: well, I think I could beat that :>
added on the 2009-03-19 00:17:57 by quisten quisten
Navis - you said you compiled to GLSL intermediately - any way to extract that? (to make the switch away from Cg less painful).
added on the 2009-03-19 00:41:22 by hornet hornet
so... the new ASD demo is ready to kick ass at the Gathering ? :>
added on the 2009-03-19 11:17:02 by aftu aftu
Yeah. Why not compile to GLSL and screw CG?
Btw, shouldn't there be a cg.dll and cgGL.dll on every system that has proper Nvidia drivers installed?!
added on the 2009-03-19 14:23:58 by raer raer
I just searched my disc and noticed that i have CG installed in "C:\Program files\Nvidia Corporation\Cg" but I'm not usre how it got there. I have FX Composer installed, so maybe it came with that...
added on the 2009-03-19 14:45:18 by raer raer

login

Go to top