Welcome, Unregistered.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Reply
Old 24-Jul-2004, 22:48   #51
Xmas
Off-season
 
Join Date: Feb 2002
Location: On the pursuit of happiness
Posts: 3,019
Default

Quote:
Originally Posted by ChrisRay
Isnt Pixel Shader 1.4 defined by a integer16 format? But not a FP16 format? Or is that how ATI does it?
PS1.4 defines a minimum range ([-8, 8]) for certain values, but no precision (although 256 values from 0 to 1 is generally considered minimum).
Xmas is offline   Reply With Quote
Old 24-Jul-2004, 23:22   #52
dan2097
Member
 
Join Date: May 2003
Posts: 323
Default

Quote:
Originally Posted by Xmas
Quote:
Originally Posted by ChrisRay
Isnt Pixel Shader 1.4 defined by a integer16 format? But not a FP16 format? Or is that how ATI does it?
PS1.4 defines a minimum range ([-8, 8]) for certain values, but no precision (although 256 values from 0 to 1 is generally considered minimum).
Am I confused but atleast on the fx5800 didnt Nvidia use INT12 for ps1.4 which in thei implementation only had a range of -2 to 2 thus violating the only requirement you put on it :? :P
dan2097 is offline   Reply With Quote
Old 24-Jul-2004, 23:30   #53
ChrisRay
R.I.P. 1983-2010
 
Join Date: Nov 2002
Posts: 2,234
Default

Quote:
Originally Posted by dan2097
Quote:
Originally Posted by Xmas
Quote:
Originally Posted by ChrisRay
Isnt Pixel Shader 1.4 defined by a integer16 format? But not a FP16 format? Or is that how ATI does it?
PS1.4 defines a minimum range ([-8, 8]) for certain values, but no precision (although 256 values from 0 to 1 is generally considered minimum).
Am I confused but atleast on the fx5800 didnt Nvidia use INT12 for ps1.4 which in thei implementation only had a range of -2 to 2 thus violating the only requirement you put on it :? :P
No I believe you are correct. The 5800 Did Shader 1.4 like that, Unless thats been changed with future driver revisions. I think the 5900 Does Shader 1.4 in FP16.
__________________
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 25-Jul-2004, 00:27   #54
Sigma
Junior Member
 
Join Date: Jul 2004
Location: Portugal
Posts: 88
Default

Oh come on people!

Do you work with C or C++?! You have float and double. You use float most of the time and double when you need precision. NVIDIA's hardware works exacly like that, but with an half and a float. ATI only offers halfloat (something in between). You use half in NVIDIA's hardware exacly like you do with float on C: precision is enought and it is faster. If precision is not enough, use double (or use float on the GPU...). What is the big deal of NVIDIA telling developers to use FP16?! Isn't obvious? It runs faster, so why not use it if it has enough precision?
Sigma is offline   Reply With Quote
Old 25-Jul-2004, 02:48   #55
euan
Member
 
Join Date: Jun 2003
Location: Scotland, UK
Posts: 136
Default

Quote:
Originally Posted by Sigma
Oh come on people!

Do you work with C or C++?! You have float and double. You use float most of the time and double when you need precision. NVIDIA's hardware works exacly like that, but with an half and a float. ATI only offers halfloat (something in between). You use half in NVIDIA's hardware exacly like you do with float on C: precision is enought and it is faster. If precision is not enough, use double (or use float on the GPU...). What is the big deal of NVIDIA telling developers to use FP16?! Isn't obvious? It runs faster, so why not use it if it has enough precision?
I tend to use whichever data type performs best on which ever CPU I'm compiling code for whether it be 8-bit PIC's, 68ks, SH4(love floats, hate doubles), or X86. Then make the algorithm fit within the limits of the chosen precision as best possible.

I can't see how that would work too well, when one vendor has two formats, and the other 1 sitting inbetween. I guess we needed another big vendor to help decide a majority winner.
euan is offline   Reply With Quote
Old 25-Jul-2004, 03:07   #56
BRiT
...
 
Join Date: Feb 2002
Location: Cleveland
Posts: 4,220
Default

Quote:
Originally Posted by Sigma
Oh come on people!

Do you work with C or C++?! You have float and double. You use float most of the time and double when you need precision. NVIDIA's hardware works exacly like that, but with an half and a float. ATI only offers halfloat (something in between). You use half in NVIDIA's hardware exacly like you do with float on C: precision is enought and it is faster. If precision is not enough, use double (or use float on the GPU...). What is the big deal of NVIDIA telling developers to use FP16?! Isn't obvious? It runs faster, so why not use it if it has enough precision?
Not quite a correct analogy. For it to be correct you'd have to take into account the following, in respect to DX9 ShaderModel 2.x:

1) Microsoft specified float to be less than FP24.
2) Microsoft specified double to be at least FP24.
3) ATI offers float as FP24.
4) ATI offers double as FP24, same performance as float.
5) Nvidia offers float as FP16, not as accurate as ATI's float, sometimes not even as fast as ATI's float.
6) Nvidia offers double as FP32, more accuracy than ATI's float/double, but significantly slower than ATI's float/double.
7) Nvidia attempts to pass FX16(FX12?) off as float or double.

Why does everyone gravitate towards Nvidia's solution being the 'correct' one, when the specs do not indicate it as such? If anyone is offering oddball formats, in regards to DX 9 SM2.x, then it would be Nvidia, not ATI.
__________________
IBSL: 2835, 6541, 8531, 9299, 20484, 86985, 87130
FBSL: 7221, 9255, 15892, 20484
BRiT is offline   Reply With Quote
Old 25-Jul-2004, 03:34   #57
DemoCoder
Regular
 
Join Date: Feb 2002
Location: California
Posts: 4,732
Default

float is a storage optimization. On CPUs, you use float to optimize memory and disk footprint, but speedwise, the precision will be whatever the FPU can run at the fastest (usually double nowadays)

On GPUs, float serves two purposes:

1) it frees up memory buffers on chip so that more context state can be saved per pixel (e.g. # of temporary registers)

2) some operations are float-specific (e.g. low precision only), for example, the "free norm" operation. Since normalization doesn't really need more than FP16, this is fine.

Nvidia is correct IMHO to say "use the minimum precision neccessary to do the job" Rules for floating point operations are very strict, and the compiler has its hands tied unless the developer can assist it. This is the same as in ANSI C/Fortran. Any extra semantic information given by the programmer to the compiler is information that can be used for optimization.

For numerical programming, it's good to have strongly typed languages IMHO.
DemoCoder is offline   Reply With Quote
Old 25-Jul-2004, 03:48   #58
sonix666
Member
 
Join Date: Mar 2003
Posts: 595
Default

Quote:
Originally Posted by BRiT
Not quite a correct analogy. For it to be correct you'd have to take into account the following, in respect to DX9 ShaderModel 2.x:

1) Microsoft specified float to be less than FP24.
2) Microsoft specified double to be at least FP24.
3) ATI offers float as FP24.
4) ATI offers double as FP24, same performance as float.
5) Nvidia offers float as FP16, not as accurate as ATI's float, sometimes not even as fast as ATI's float.
6) Nvidia offers double as FP32, more accuracy than ATI's float/double, but significantly slower than ATI's float/double.
7) Nvidia attempts to pass FX16(FX12?) off as float or double.

Why does everyone gravitate towards Nvidia's solution being the 'correct' one, when the specs do not indicate it as such? If anyone is offering oddball formats, in regards to DX 9 SM2.x, then it would be Nvidia, not ATI.
Well, the documentation is quite clear, the half type is a 16 bit floating point, the float type is a 32 bit floating point type and the double type is a 64 bit floating point type (see "Scalar Types" under "HLSL -> Data Types").

Secondly, it says the following:

Quote:
Originally Posted by MSDN
Not all target platforms have native support for half or double values. If the target platform does not, these will be emulated using float. Intermediate results of floating point expressions may be evaluated at a precision higher than the operands or the result.
So, floats should be 32 bits, and halfs can be upgraded to 32 bits if the hardware has no native support and doubles can be downgraded to 32 bits if the hardware has no native support.

Intermediate results may be at a higher precision than requested.

So, the documentation says that type float may not be less 32 bits, so FP24 doesn't cut it according to the documentation.

BUT, Microsoft seems to be very unclear in their documentation. I have never found the minimum required precisions (without hints)in PS2.0 for instance. The FP24 minimum comes from an e-mail as far as I know.



Quote:
Originally Posted by DemoCoder
float is a storage optimization. On CPUs, you use float to optimize memory and disk footprint, but speedwise, the precision will be whatever the FPU can run at the fastest (usually double nowadays)
You are right about the storage/bandwidth optimization of using floats instead of doubles. However, operations using a float tend to take less cycles than using a double. So, there are two optimizations, unlike you say.
sonix666 is offline   Reply With Quote
Old 25-Jul-2004, 04:41   #59
Ostsol
Senior Member
 
Join Date: Nov 2002
Location: Edmonton, Alberta, Canada
Posts: 1,765
Default

The original PS2.0 specification stated FP24 as minimum for full precision. Interestingly enough, though, the HLSL documentation lists three floating point types and their precisions: half (FP16), float (FP32), and double (FP64).
__________________
"Extremism is so easy. You've got your position, and that's it. It doesn't take much thought. And when you go far enough to the right, you meet the same idiots coming around from the left." -- Clint Eastwood

-Ostsol
Ostsol is offline   Reply With Quote
Old 25-Jul-2004, 12:44   #60
sonix666
Member
 
Join Date: Mar 2003
Posts: 595
Default

Quote:
Originally Posted by Ostsol
The original PS2.0 specification stated FP24 as minimum for full precision. Interestingly enough, though, the HLSL documentation lists three floating point types and their precisions: half (FP16), float (FP32), and double (FP64).
That is indeed what I just typed (in a long version ). Problem with the MSDN documentation is that if a programmer naively uses that information and depends on float being 32 bits, that on ATi hardware it will become a problem. They should have made clear in the documentation that a float is AT LEAST 24 bits.
sonix666 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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
ATI Redefines the Multimedia PC with ALL-IN-WONDER X800 XT Dave Baumann Press Releases 0 09-Sep-2004 12:29
DeanoC's comments about SM3.0 GraphixViolence 3D Architectures & Chips 26 28-Jul-2004 09:53
Anand has Farcry 1.2 patch and tests SM3.0 Helevitia 3D Architectures & Chips 158 04-Jul-2004 14:39
x800 texture shimmering: FarCry video Grestorn 3D Architectures & Chips 374 15-Jun-2004 19:29
ATI Introduces RADEON X800, the world's fastest VPU Dave Baumann Press Releases 0 04-May-2004 16:51


All times are GMT +1. The time now is 20:59.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.