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.
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.
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.
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.
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
thanks for link
navis: the ati 4850/4870 is about the latest ati card i think. thats 9800 equivalent, maybe a bit better.
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.
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.
i think the ati 1000s and geforce 7000s only support blending on 16bit float rendertargets, not on 32bit ones.
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.
That'll be why then. Not that it particularly matters, but it's good to know. Thanks for the answers :)
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.
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? :>
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).
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).
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 !
* 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 !
what about Intel DX10 chips ? :-)
I just noticed: 4.7mb for latest cg.dll !? are they joking ?? previous version was 900kb, whats goin on ?
Navis: looks like they want to keep up with the size of the D3DX dll :)
hm how can I reduce that. There must be a way
you can try upx on your DLL (i wonder if some other packers handle DLLs..)...
Just reduce it to zero bytes by going glsl instead :D
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.
I can live with that.
i'm expecting something awesome at BP now. :>
navis: well, I think I could beat that :>
Navis - you said you compiled to GLSL intermediately - any way to extract that? (to make the switch away from Cg less painful).
so... the new ASD demo is ready to kick ass at the Gathering ? :>
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?!
Btw, shouldn't there be a cg.dll and cgGL.dll on every system that has proper Nvidia drivers installed?!
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...