Go Back   nV News Forums > Software Forums > Gaming Central

Newegg Daily Deals

Reply
 
Thread Tools
Old 04-05-04, 12:15 AM   #25
ChrisRay
Registered User
 
ChrisRay's Avatar
 
Join Date: Mar 2003
Location: Tulsa
Posts: 5,101
Default Re: Far Cry: OpenGL or DX9?

Quote:
Originally Posted by Drumphil
YES!.. but how big do you think the differences can be given that they are still running over THE EXACT SAME SHADER UNITS..


Register Usage and Shader ordering Sir, Register Usage can change the impact of performance, Nvidias OpenGL shader extensions are usually brought out optimally for nVidia hardware, There could very well be a performance increased, based off that, And a 5-10% increase could easily be one 1 resolution higher or the ability to turn FSAA/AF one notch higher.
__________________
|CPU: Intel I7 Lynnfield @ 3.0 Ghz|Mobo:Asus P7P55 WS Supercomputer |Memory:8 Gigs DDR3 1333|Video:Geforce GTX 295 Quad SLI|Monitor:Samsung Syncmaster 1680x1080 3D Vision\/Olevia 27 Inch Widescreen HDTV 1920x1080

|CPU: AMD Phenom 9600 Black Edition @ 2.5 Ghz|Mobo:Asus M3n HT Deluxe Nforce 780A|Memory: 4 gigs DDR2 800| Video: Geforce GTX 280x2 SLI

Nzone
SLI Forum Administrator

NVIDIA User Group Members receive free software and/or hardware from NVIDIA from time to time to facilitate the evaluation of NVIDIA products. However, the opinions expressed are solely those of the members
ChrisRay is offline   Reply With Quote
Old 04-05-04, 12:18 AM   #26
Drumphil
 
Drumphil's Avatar
 
Join Date: Jul 2003
Location: BANNED!
Posts: 290
Default Re: Far Cry: OpenGL or DX9?

Quote:
Originally Posted by ChrisRay
Register Usage and Shader ordering Sir, Register Usage can change the impact of performance, Nvidias OpenGL shader extensions are usually brought out optimally for nVidia hardware, There could very well be a performance increased, based off that, And a 5-10% increase could easily be one 1 resolution higher or the ability to turn FSAA/AF one notch higher.
care to offer some evidence to back that up? And what happened to NVIDIAs optimised compiler that takes the shading code and makes it optimised for the FX shader core (features in all recent NVIDIA drivers).. Where was the big speed boost from that.

ANyways, there is an easy way to test the shader theory.. Is there a version of shader mark that uses GLSL yet? It might not exist untill the openGL2 is finalised.

And weren't nvidia saying for ages that their CG extentions were very similar to the DX coding, so not much developer effort would be needed to port code between them?

OK, does anyone have the link to the beyond 3d article on the FX shader architecture..

This is all too painfull. The same shading hardware is used by DX and OPENGL and yet there is suppose to be some way to code shaders better for the FX cards under GL than DX.. The driver does the compiling anyway, so how much difference can the higher level shader coding make.
__________________
not banned
Drumphil is offline   Reply With Quote
Old 04-05-04, 12:23 AM   #27
ChrisRay
Registered User
 
ChrisRay's Avatar
 
Join Date: Mar 2003
Location: Tulsa
Posts: 5,101
Default Re: Far Cry: OpenGL or DX9?

Quote:
Originally Posted by Drumphil
care to offer some evidence to back that up? And what happened to NVIDIAs optimised compiler that takes the shading code and makes it optimised for the FX shader core (features in all recent NVIDIA drivers).. Where was the big speed boost from that.


There was a speed a boost from Nvidias Compiler. It recompiled Register Sensitive Material and speeded it up Shader Code, (Was it a dramatic improvement?) No but it was a good 10-25% Faster in Several scenerios,) And No nvidias Compiler isnt going to automaticallly recreate ideal code for Nvidia hardware, Its simply going to try shortcuts for Shader code when and if they are capable.



FiringSquad showed evidence about how instruction reorders even in Nvidias Compiler can show improvements. (haven trouble finding it)


Quote:
And weren't nvidia saying for ages that their CG extentions were very similar to the DX coding, so not much developer effort would be needed to port code between them?
CG extensions could compile Workable Extensions for DX 9.0 and OpenGL to either API, So its not really relevent, There CG extensions were Nvidia Fragment, Direct9 Standard and OpenGL standard extensions, They could just compile down to any API.
__________________
|CPU: Intel I7 Lynnfield @ 3.0 Ghz|Mobo:Asus P7P55 WS Supercomputer |Memory:8 Gigs DDR3 1333|Video:Geforce GTX 295 Quad SLI|Monitor:Samsung Syncmaster 1680x1080 3D Vision\/Olevia 27 Inch Widescreen HDTV 1920x1080

|CPU: AMD Phenom 9600 Black Edition @ 2.5 Ghz|Mobo:Asus M3n HT Deluxe Nforce 780A|Memory: 4 gigs DDR2 800| Video: Geforce GTX 280x2 SLI

Nzone
SLI Forum Administrator

NVIDIA User Group Members receive free software and/or hardware from NVIDIA from time to time to facilitate the evaluation of NVIDIA products. However, the opinions expressed are solely those of the members
ChrisRay is offline   Reply With Quote
Old 04-05-04, 12:29 AM   #28
Drumphil
 
Drumphil's Avatar
 
Join Date: Jul 2003
Location: BANNED!
Posts: 290
Default Re: Far Cry: OpenGL or DX9?

given that the nvidia complier does the same optimisations for DX and GL, how do you believe that its possible to code different in GLSL that will give a performance boost on FX cards, without dropping IQ through reducing shader quality, and that couldn't be done by using the same optimisation in DX.

If there is a way to execute a given shader code better, why would the compiler do this for openGL, but not do the same thing with DX, or are you thinking that optimisation can be done somehow through the GLSL code itself, in some way that couldn't be done in DXSL.. (excepting of course partial precision and such things that degrade IQ)
__________________
not banned
Drumphil is offline   Reply With Quote
Old 04-05-04, 12:33 AM   #29
ChrisRay
Registered User
 
ChrisRay's Avatar
 
Join Date: Mar 2003
Location: Tulsa
Posts: 5,101
Default Re: Far Cry: OpenGL or DX9?

Quote:
Originally Posted by Drumphil
given that the nvidia complier does the same optimisations for DX and GL, how do you believe that its possible to code different in GLSL that will give a performance boost on FX cards, without dropping IQ through reducing shader quality, and that couldn't be done by using the same optimisation in DX.


It doesnt neccasarily do that, And no dropping Quality isnt what I am talking about. Nvidias Fragment shaders can be coded for differently, Via OpenGL enviroment in the way they require the code to be written.

Nvidias Compiler doesnt always replace instructions, It only does it scenerios that it can see an improvement to be made. This doesnt mean improvements Via coders can be made. (IE instruction ordering)

Obviously most of this stuff lies within the 3-4% Give or take differences, But it can make a difference, You can write an API For any piece of hardware, I could decide today to create a renderer ChrisRaysTechyGLSuperCard, With my own extensions, So long as I created drivers that would recognise those extensions and my card could react to them.

All APIS are different extension sets, which achieve similar results. OpenGL 1.5 currently offers fragment shaders which are equiavlent to 2.0 Shaders.
__________________
|CPU: Intel I7 Lynnfield @ 3.0 Ghz|Mobo:Asus P7P55 WS Supercomputer |Memory:8 Gigs DDR3 1333|Video:Geforce GTX 295 Quad SLI|Monitor:Samsung Syncmaster 1680x1080 3D Vision\/Olevia 27 Inch Widescreen HDTV 1920x1080

|CPU: AMD Phenom 9600 Black Edition @ 2.5 Ghz|Mobo:Asus M3n HT Deluxe Nforce 780A|Memory: 4 gigs DDR2 800| Video: Geforce GTX 280x2 SLI

Nzone
SLI Forum Administrator

NVIDIA User Group Members receive free software and/or hardware from NVIDIA from time to time to facilitate the evaluation of NVIDIA products. However, the opinions expressed are solely those of the members
ChrisRay is offline   Reply With Quote
Old 04-05-04, 12:39 AM   #30
Drumphil
 
Drumphil's Avatar
 
Join Date: Jul 2003
Location: BANNED!
Posts: 290
Default Re: Far Cry: OpenGL or DX9?

Quote:
Originally Posted by ChrisRay
It
I could decide today to create a renderer ChrisRaysTechyGLSuperCard, With my own extensions, So long as I created drivers that would recognise those extensions and my card could react to them.

All APIS are different extension sets, which achieve similar results. OpenGL 1.5 currently offers fragment shaders which are equiavlent to 2.0 Shaders.

but your ChrisRaysTechyGLSuperCard API would still be running on the same GPU, with the same math capabilities that it allways had. You might get some speed up because your API has limited features or something, but at the end of the day the performance you get still basically comes down to : What math does the card have to do, and how fast can it do it.

If you expanded your API to do everything that DX and openGL do you would have no performance difference, outside of maybee a small improvement due to less overheads or something, but that difference will allways be insignificant to performance relative to the shader code being run VS the math power of the GPU to do that work.

Can you give some examples of how you could code the same identical shader in DX or openGL, where the openGL version would be faster. What code opmisations are you suggesting that can only be done with GL, and not DX?

and
"Nvidias Fragment shaders can be coded for differently, Via OpenGL enviroment in the way they require the code to be written."

yes, because the compiler converts them into the native code of the FX core before they are executed, same as it does for DX shading language.. So what is it about the way that openGL lets you code that leads to the driver complier giving the FX core shader code that it can run faster.
__________________
not banned

Last edited by Drumphil; 04-05-04 at 12:50 AM.
Drumphil is offline   Reply With Quote
Old 04-05-04, 12:59 AM   #31
ChrisRay
Registered User
 
ChrisRay's Avatar
 
Join Date: Mar 2003
Location: Tulsa
Posts: 5,101
Default Re: Far Cry: OpenGL or DX9?

Quote:
yes, because the compiler converts them into the native code of the FX core before they are executed, same as it does for DX shading language.. So what is it about the way that openGL lets you code that leads to the driver complier giving the FX core shader code that it can run faster.
Errr not neccasarily. The Compiler Simply reorders instructions.. NV-Fragment extensions are recognised differently than Arb_Fragment extensions. In Many cases. And The hardware responds specifically to one extension over the other, Automatically changing levels of precision> max Intruction counts ect, Like For Example. One Extension might recognise a higher instruction count than another. Tho DX 9.0 Latest Extensions recognise Nvidias Instructions. (Believe Its Shader 2.0A For example compared to 2.0b)

Anyway, I'm no expert here, The Difference between extensions can very specifically be how the driver reacts to them. Anyway Specifically. Extensions can open up different features available to hardware, One Might or Might not be available, There could be a specific Nvidia features (Like its Vertex Fetcher for example) Which could speed up rendering Which might not be supported from an extension from the other API.
__________________
|CPU: Intel I7 Lynnfield @ 3.0 Ghz|Mobo:Asus P7P55 WS Supercomputer |Memory:8 Gigs DDR3 1333|Video:Geforce GTX 295 Quad SLI|Monitor:Samsung Syncmaster 1680x1080 3D Vision\/Olevia 27 Inch Widescreen HDTV 1920x1080

|CPU: AMD Phenom 9600 Black Edition @ 2.5 Ghz|Mobo:Asus M3n HT Deluxe Nforce 780A|Memory: 4 gigs DDR2 800| Video: Geforce GTX 280x2 SLI

Nzone
SLI Forum Administrator

NVIDIA User Group Members receive free software and/or hardware from NVIDIA from time to time to facilitate the evaluation of NVIDIA products. However, the opinions expressed are solely those of the members
ChrisRay is offline   Reply With Quote
Old 04-05-04, 01:15 AM   #32
Drumphil
 
Drumphil's Avatar
 
Join Date: Jul 2003
Location: BANNED!
Posts: 290
Default Re: Far Cry: OpenGL or DX9?

'Automatically changing levels of precision"

, no this is done on a pre-set per application basis, and can not be done automatically. If it was possible for the complier to do this (which it isn't) then game devs wouldn't be up in arms about having to recode everything with mixed precision modes so that their PS2.0 heavy games don't kill FX series cards.

anyways, this is a lot of speculation right now.. What is needed is a coder with experience, or the same rendering done with DX and GL so we can compare (with special reference to shader code)

"The Compiler Simply reorders instructions.."

no, the compiler takes higher level code (dx or glsl) and converts into machine code that the FX core can understand.. Ie takes a shader and says "this shader takes these imputs and does this math on them", and converts the code in to machine language. Reordering commands and such things are part of what ALL compilers do. If the compiler is asking the GPU to do different math for two identical shader operations(regardless of API), then one of the compilers is broken.
__________________
not banned

Last edited by Drumphil; 04-05-04 at 01:39 AM.
Drumphil is offline   Reply With Quote

Old 04-05-04, 01:43 AM   #33
ChrisRay
Registered User
 
ChrisRay's Avatar
 
Join Date: Mar 2003
Location: Tulsa
Posts: 5,101
Default Re: Far Cry: OpenGL or DX9?

[quote] , no this is done on a pre-set per application basis, and can not be done automatically.

anyways, this is a lot of speculation right now.. What is needed is a coder with experience, or the same rendering done with DX and GL so we can compare (with special reference to shader code)/quote]

No Some Shader extensions are predefined with capabilities that others are not, I gave an example from shader_2.0a and shader2.0B, Both found within DX, Shader_2.0 Is is more or less Nvidias standard for shader routines, Closing How Shader_2.0A extension feature set is close to Shader 3.0 Extension feature set, Whi shader_2.0B is not.

Of course this aplication based, But the compile recognises capability based off extension, (As I mentioned with vertex fetches)


Quote:
, the compiler takes higher level code (dx or glsl) and converts into machine code that the FX core can understand.. Ie takes a shader and says "this shader takes these imputs and does this math on them", and converts the code in to machine language. Reordering commands and such things are part of what ALL compilers do. If the compiler is asking the GPU to do different math for two identical shader operations(regardless of API), then one of the compilers is broken.
Why are we talking about what we already Know? The Compiler recognises code and simplifies it, To a register friendly usage, And are we talking about Nvidias Compiler technology or the the compiler which compiles code down to DirectX?

All Nvidias Compiler does is look at unfriendly register code and try to convert it into something thats not so harsh on the Nvregistry

For example. Take a look at DirectX And its shading profiles.

Quote:
Shader programs are nowadays likely to be written in a "high level shading language" (HLSL). With help of the DirectX Development Kit a compiler translates the program into the "pixelshader language". Meanwhile, there is a shader profile called 2_A available (which is optimized for the 2_X shaders and thus for GeForceFX) and of course there is the 2_0 shader profile.
This is what I have been trying to explain, Shader profiles, Are unlocked Via different feature sets, If you call upon the 2_0 shader profile. All those features arent unlocked. As they are with 2_0A, The same is said with NV_Fragment extensions ect, ect, While bring out instruction sets which are more friendly to the GPU,

Anyway we're talking semantics here and basically describing the same thing, Yet you seem hellbent on the idea that Shader profiles and fragment extensions cant be more friendly to one IHV over another, 2_0A does nothing for ATI but slow them down. OpenGL is similar in the fact but its all open for Nvidia without requiring a new Profile.
__________________
|CPU: Intel I7 Lynnfield @ 3.0 Ghz|Mobo:Asus P7P55 WS Supercomputer |Memory:8 Gigs DDR3 1333|Video:Geforce GTX 295 Quad SLI|Monitor:Samsung Syncmaster 1680x1080 3D Vision\/Olevia 27 Inch Widescreen HDTV 1920x1080

|CPU: AMD Phenom 9600 Black Edition @ 2.5 Ghz|Mobo:Asus M3n HT Deluxe Nforce 780A|Memory: 4 gigs DDR2 800| Video: Geforce GTX 280x2 SLI

Nzone
SLI Forum Administrator

NVIDIA User Group Members receive free software and/or hardware from NVIDIA from time to time to facilitate the evaluation of NVIDIA products. However, the opinions expressed are solely those of the members
ChrisRay is offline   Reply With Quote
Old 04-05-04, 01:55 AM   #34
ChrisRay
Registered User
 
ChrisRay's Avatar
 
Join Date: Mar 2003
Location: Tulsa
Posts: 5,101
Default Re: Far Cry: OpenGL or DX9?

I am playing Everquest which has been down all day.



Get back with you tommorrow.
__________________
|CPU: Intel I7 Lynnfield @ 3.0 Ghz|Mobo:Asus P7P55 WS Supercomputer |Memory:8 Gigs DDR3 1333|Video:Geforce GTX 295 Quad SLI|Monitor:Samsung Syncmaster 1680x1080 3D Vision\/Olevia 27 Inch Widescreen HDTV 1920x1080

|CPU: AMD Phenom 9600 Black Edition @ 2.5 Ghz|Mobo:Asus M3n HT Deluxe Nforce 780A|Memory: 4 gigs DDR2 800| Video: Geforce GTX 280x2 SLI

Nzone
SLI Forum Administrator

NVIDIA User Group Members receive free software and/or hardware from NVIDIA from time to time to facilitate the evaluation of NVIDIA products. However, the opinions expressed are solely those of the members
ChrisRay is offline   Reply With Quote
Old 04-05-04, 05:08 AM   #35
ChrisRay
Registered User
 
ChrisRay's Avatar
 
Join Date: Mar 2003
Location: Tulsa
Posts: 5,101
Default Re: Far Cry: OpenGL or DX9?

I got some more information about this from People with more coding experience. The way you are suggesting that not much has to be changed In order to Compile an openGL runtime which is equivalent to a DirectX runtime is incorrect.

For example. The Code would have to be written for several reasons. Firstly they arent even mathematically Equivalent. For Example. OpenGL uses Collumn Sectors and DirectX uses Row sectors, So you have to transpose and recode from one API to another.

Lighting is done differently To, (IE in a different space) And Cube Normilization ect would require some rework. D3D uses (-1,-1,0)..(1,1,1), While OpenGL uses (-1,-1,-1)...(1,1,1).

And then it comes down to extension usage, While DirectX offers all its features through standard profiles. And OpenGL offers several of its Shader profiles through extensions.



P.S. Would like to thank the people of Beyond3d for giving me some info on this issue
__________________
|CPU: Intel I7 Lynnfield @ 3.0 Ghz|Mobo:Asus P7P55 WS Supercomputer |Memory:8 Gigs DDR3 1333|Video:Geforce GTX 295 Quad SLI|Monitor:Samsung Syncmaster 1680x1080 3D Vision\/Olevia 27 Inch Widescreen HDTV 1920x1080

|CPU: AMD Phenom 9600 Black Edition @ 2.5 Ghz|Mobo:Asus M3n HT Deluxe Nforce 780A|Memory: 4 gigs DDR2 800| Video: Geforce GTX 280x2 SLI

Nzone
SLI Forum Administrator

NVIDIA User Group Members receive free software and/or hardware from NVIDIA from time to time to facilitate the evaluation of NVIDIA products. However, the opinions expressed are solely those of the members
ChrisRay is offline   Reply With Quote
Old 04-05-04, 06:26 AM   #36
Drumphil
 
Drumphil's Avatar
 
Join Date: Jul 2003
Location: BANNED!
Posts: 290
Default Re: Far Cry: OpenGL or DX9?

yes, of course re-writing is necessary, but most of the features have functional equivalents (by virtue of the fact that they all run on the same hardware, and most ways of doing things in 3d are the same, if expressed through different abstraction), and data can be transposed into different formats.

Quote:
"Anyway we're talking semantics here and basically describing the same thing, Yet you seem hellbent on the idea that Shader profiles and fragment extensions cant be more friendly to one IHV over another, 2_0A does nothing for ATI but slow them down. OpenGL is similar in the fact but its all open for Nvidia without requiring a new Profile."
ok, so have I got this straight. The advantage in using openGL is that features that are otherwise hidden in the FX series feature set can be used (through the use of fragment extentions).. Where as DX has a fixed shader profile, openGl can use any features of the underlying hardware, and so extra shading performance can be gained.

If thats the argument, well the standards are all off.. Bring back Glide!. If you are using vendor specific extentions, you no longer have a standard openGL. So code written this way will not work on openGL compliant hardware, except for NVIDIAs..

Of course you can optimise for a specific architecture if you dont have to follow standards.

As to me being hell bent against the idea that shader profiles can be biased, that is incorrect. The degree to which a shader profile is biased agains a specific architecture bears a direct relationship to how well the underlying hardware can process the features exposed by the specific shader profile. Your idea of switching to open GL to get away from unfriendly shader profile only works if the opengl 2 standard, when it comes out, supports these features.. Otherwise we are talking nvidia vs direct X, not openGL vs direct X.




Quote:
"And are we talking about Nvidias Compiler technology or the the compiler which compiles code down to DirectX?"
I think you are a bit confused at to exactly what a compiler does. I have been talking about shader compilers, which take DXSL or GLSL and turn it into machinecode which is fed to the shader units in the GFX card. Nvidias compiler technology IS the complier which takes DXSL and GLSL and turns it into machine code. Same as ATI has a shader compiler for their shader units.

Nvidia just improved their compiler, not added a new one to the stack.



For reference, my line of posting has largely been in response to this inital starter from you

Quote:
"I cant believe you are claiming that OpenGL is incapable of Running a DirectX 9.0 featured game because it doesnt support the same features, When it does, Its just called out different by different fragment extensions.
Now Big assumptions. IF OpenGL renderer is using Nvidias Shader extensions for rendering, Then yes you could probably get performance increases under the exact variables you'd find under a DirectX 9.0 extension. The Game could very well be using Nvidia extensions which perform faster than DX 9.0 SDK extensions. Why? Because Nvidias extensions are faster than standard extensions."
which basically means if you use nvidia propritery extentions you can gain speed.. Thats got nothing to do with open GL vs DX.. Thats got to do with closed vs open standards. The fact that you could gain speed like this because you can write your own non standard extentions for open GL.. This is great for experimentation with new features, but effectively breaks open gl as a standard. May as well call it nvidiaGL.
And right back to the start, nvidias extensions aren't faster than the "standard" at the exact same task, they are different, and do different things. If you had extensions that do the exact same thing, the only reason one would be faster would be if the shader compiler isn't optimised properly.

and after all this the fact is that far cry doesn't use these features in openGL mode. Otherwise they wouldn't be missing when you try and see them. Sure they could be implemented, but since they haven't yet, there is no way to judge the openGL mode in farcry. It doesn't work properly yet.

Quote:
Thats not what I am talking about. I said they probably enabled these features through NV_Fragment shaders, Assuming they did, There WOULD be a performance increase over standard DX9.0 SDK shaders in 1.1. Under most circumstances, Because Nvidias fragment shaders bring out the best register usage on Nvidia cards.
this is the other statement that really got me started here.. can you tell me why this should be so, and why NVIDIAS shader compiler would make better register usage when being fed GLSL, rather than DXSL.. or even why it would if they were using custom extentions rather than GLSL.

Also you are putting too much weight behind claims that performance on the FX line has a lot to do with this register optimisation business.. Well, the register optimisations HAS been done and included in the NVIDIA shader compiler. So we allready have that speed increase. And the fact is that the reason it made very little difference was that the performance of the FX line doing ps2.0 is mostly down to lack of shader horsepower rather than bad register implementation or something.. (ask they beyond 3d boys about that one too, they actually did a FX architecture revealed article a while back examining exactly these issues.)

For anyone who remember the start of this thread I was basically saying to people who wanna run far cry in open GL mode, don't, because a lot of rendering features are missing from its open GL mode.
__________________
not banned

Last edited by Drumphil; 04-05-04 at 08:50 AM.
Drumphil 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenGL book Airstrip1 Software Development 2 08-12-12 08:55 AM
Far Cry 3 preview and E3 presentation footage News Archived News Items 0 06-06-12 09:30 AM
Dante's Peak: DmC Devil May Cry PC-Bound In 2013 News Archived News Items 0 05-22-12 04:50 AM
Major WineX prob... I think it has to do with the vidcard... Linewbie NVIDIA Linux 20 10-09-02 09:58 PM
ATI R300 & nVidia NV30 - Different visions Uttar Rumor Mill 6 09-06-02 11:19 AM

All times are GMT -5. The time now is 04:06 AM.


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