• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

DX 9 pixel shading Question

cm123

Senior member
Is the true DX9 spec 24bit OR 16 & 24 bit OR 16 & 32 Bit OR 16/24/32 Bit pixel shading?

I am NOT a graphics expert per say, if you info or link(s) giving the completed standard, that would be great.

I know ATI is 24 and nv is mixed mode etc.. that's another flame post all by itself... just need the final/current spec.
 
24 minimum to comply with DX9 spec.
ATi has 24, nVidia has 32 or 16, the 32-bit mode means it fits with DX9 spec (well, exceeds it unnecessarily).
 
Originally posted by: Lonyo
24 minimum to comply with DX9 spec.
ATi has 24, nVidia has 32 or 16, the 32-bit mode means it fits with DX9 spec (well, exceeds it unnecessarily).

so tech. the 32 is NOT spec, just over kill?

Are there any bench test(s) or games using 32-bit mode? Is it even run-able?

Last question, then does nv run 32-bit mode when a 24 bit is needed?
 
The DX9 spec, AFAIK, is 24-bit precision. There are facilities within DirectX for requesting various levels of precision from the hardware. Any card that supports DirectX9 therefore must be able to do 16 and 24-bit computation for shaders (ATI *only* does 24-bit, but as long as you can do *more* than they ask for, it works fine). 32-bit is not required, but can be supported. This is part of why NVIDIA gets hosed in Pixel Shader 2.0 tests, since they have to run everything in 32-bit even when the shaders are written for 24-bit precision.

I don't know exactly which part of the standard covers this, but this is where Microsoft's technical DirectX documents live. You might try the SDK documentation:

http://msdn.microsoft.com/library/default.asp?url=/nhp/Default.asp?contentid=28000410
 
Originally posted by: Matthias99
The DX9 spec, AFAIK, is 24-bit precision. There are facilities within DirectX for requesting various levels of precision from the hardware. Any card that supports DirectX9 therefore must be able to do 16 and 24-bit computation for shaders (ATI *only* does 24-bit, but as long as you can do *more* than they ask for, it works fine). 32-bit is not required, but can be supported. This is part of why NVIDIA gets hosed in Pixel Shader 2.0 tests, since they have to run everything in 32-bit even when the shaders are written for 24-bit precision.

I don't know exactly which part of the standard covers this, but this is where Microsoft's technical DirectX documents live. You might try the SDK documentation:

http://msdn.microsoft.com/library/default.asp?url=/nhp/Default.asp?contentid=28000410

thanks... I was at that link, its a mess finding specs like this sometimes...

In theory, wouldn't the nv still have a level playing against ati displaying 24-bit, as only the same bits are being used, or does nv try to up-mix the display to 32-bits, which wouldn't that lead to some heavy hardware hits?

 
Originally posted by: cm123
Originally posted by: Matthias99
The DX9 spec, AFAIK, is 24-bit precision. There are facilities within DirectX for requesting various levels of precision from the hardware. Any card that supports DirectX9 therefore must be able to do 16 and 24-bit computation for shaders (ATI *only* does 24-bit, but as long as you can do *more* than they ask for, it works fine). 32-bit is not required, but can be supported. This is part of why NVIDIA gets hosed in Pixel Shader 2.0 tests, since they have to run everything in 32-bit even when the shaders are written for 24-bit precision.

I don't know exactly which part of the standard covers this, but this is where Microsoft's technical DirectX documents live. You might try the SDK documentation:

http://msdn.microsoft.com/library/default.asp?url=/nhp/Default.asp?contentid=28000410

thanks... I was at that link, its a mess finding specs like this sometimes...

In theory, wouldn't the nv still have a level playing against ati displaying 24-bit, as only the same bits are being used, or does nv try to up-mix the display to 32-bits, which wouldn't that lead to some heavy hardware hits?

As said before, the spec is 24-bits minimum. ATI has 24-bit (only), Nvidia has 16-bit and 32-bit (they also have a really fast 12-bit mode but that isn't used for DX9 stuff because you cannot run advanced Pixell Shader 2.0 features in 12-bit).

Nvidia did not design their hardware around the 24-bit compliance (either due to an engineering decision, the fact that MS may have increased the spec while they Nvidia was already in development of the NV30 or a combination of both - remember Nvidia stopped going to the DX9 meetings by their own decision and worked independently).

Nvidia initially plugged 32-bit as being the way to go, with 24-bit being "insufficient" for DX9. Full 32-bit precision in DX9 shaders produces, unfortunately, unplayable results in modern and future DX9 games with current hardware (including the FX5900 and 5950). 24-bits appears to be the perfect balance between IQ and speed. Nvidia's new solution to have acceptable performance was to use a "mixed mode" of 16 and 32-bit precision. This is why Valve had to code a special mixed-path in HL2, as did id Software (John Carmack) for Doom3, etc.

Nvidia has recently changed their tune from "24-bit is insufficient" to "16-bits is enough" - interpret this however you like. The message is clear if you can read between the lines (which is VERY easy to do in this case, IMO).

Now, as Valve said - mixed mode does not allow for the implementation of all of the DX9 features they put into HL2. You can sit there and say "well, I didn't see much difference in the few screenshots they released comparing the two modes" but that is all we have to go on - a couple of screenshots. The real test will be when we have the final version to compare modes in action.

Valve also stated that future licensees will not be able to use the mixed-mode from HL2 - it contains a lot of HL2-specific optimizations do developers will have to code their own mixed mode path or stick to just the 24-bit DX9 spec if budget/resources/development time is limited (ie default to 32-bit on NV hardware). You can interpret this as you like as well: either Valve has a massive bias towards ATI and is cutting out >50% of their market or they are speaking the truth.

John Carmack also noted a large discrepancy in the rendering speed of the two cards. He noted that when running in full-precision mode (ARB2) the ATI is substantially faster than the Nvidia card (I think it was around 40% faster). However, Doom3 uses mostly DX7 features, with only a few DX9 ones (yes I know it's an Open GL game, however it uses similar Pixel Shader 2.0 features). Doom3 uses a mixed-mode on the Nvidia card (they call it the "Nv3x codepath" ... this is the same thing as "mixed mode"). According to JC, there is a very minimal quality difference between NV3x codepath and ARB2, and the Nvidia card performs faster (in Nv3x) vs. the ATI card (in ARB2). I believe the difference was 10-15%. You can read all about Carmack's findings in his .plan's he releases occasionally (google helps for this).



 
Originally posted by: cm123
In theory, wouldn't the nv still have a level playing against ati displaying 24-bit, as only the same bits are being used, or does nv try to up-mix the display to 32-bits, which wouldn't that lead to some heavy hardware hits?

No, there is a substantial performance hit from operating in true 32-bit mode versus true 24-bit.

In a similar apples-to-apples comparison, since ATI does everything in 24-bit for the Pixel Shader features, if you were to run the GF FX in 16-bit mode, and give the ATI card 16-bit instructions (which it does internally at 24-bit) the ATI card would be slower than the Nvidia card. However, the difference between ATI's 24-bit and Nvidia's 16-bit is not nearly as large as the performance between Nvidia's 32-bit mode and ATI's 24-bit.

24-bit appears to be a very good tradeoff for today's hardware. That is why it was chosen as the spec for DirectX9.

In the future, DX 9.1 will support either 24-bit or 32-bit as a minimum (neither the FX cards or the Radeon cards comply 100% with what is supposed to be DX 9.1 although the Nvidia card is much closer. They allow shader code to exceed 1000 lines; ATI has a maximum of 64 or 96 lines). DX 10 will undoubtedly support at minimum 32-bit (maybe 48-bit but this is all speculation at the moment).

The problem is that although Nvidia is "closer" to the DX 9.1 specs (as they are right now) than the R9700/9800, having extremely long shader code only compounds the problem further that Nvidia performs unacceptably slow in 32-bit - very long shader code will only make it perform even slower.
 
Originally posted by: jiffylube1024
Originally posted by: cm123
In theory, wouldn't the nv still have a level playing against ati displaying 24-bit, as only the same bits are being used, or does nv try to up-mix the display to 32-bits, which wouldn't that lead to some heavy hardware hits?

No, there is a substantial performance hit from operating in true 32-bit mode versus true 24-bit.

In a similar apples-to-apples comparison, since ATI does everything in 24-bit for the Pixel Shader features, if you were to run the GF FX in 16-bit mode, and give the ATI card 16-bit instructions (which it does internally at 24-bit) the ATI card would be slower than the Nvidia card. However, the difference between ATI's 24-bit and Nvidia's 16-bit is not nearly as large as the performance between Nvidia's 32-bit mode and ATI's 24-bit.

24-bit appears to be a very good tradeoff for today's hardware. That is why it was chosen as the spec for DirectX9.

In the future, DX 9.1 will support either 24-bit or 32-bit as a minimum (neither the FX cards or the Radeon cards comply 100% with what is supposed to be DX 9.1 although the Nvidia card is much closer. They allow shader code to exceed 1000 lines; ATI has a maximum of 64 or 96 lines). DX 10 will undoubtedly support at minimum 32-bit (maybe 48-bit but this is all speculation at the moment).

The problem is that although Nvidia is "closer" to the DX 9.1 specs (as they are right now) than the R9700/9800, having extremely long shader code only compounds the problem further that Nvidia performs unacceptably slow in 32-bit - very long shader code will only make it perform even slower.

I get it now... What a mess it seems? Most likely not a prime time to buy a card just yet.

I found a site posting some nv40 pre-specs (very much like the specs we have come across at our (hw) company).

http://php.technobabble.com.au/article89.html

and some pics here:

http://www.neoseeker.com/news/story/2798/

Take only as they are, I know not of either site myself. However I have seen specs on the nv40 simliar to these. Wonder how the next genX will do with this issue?
 
^ Those specs were invented by a hardware guru named Chairmansteve in the fall of 2002. They have gotten more press than pretty much any other hardware guess I've seen. Probably because they're pretty close to being ballpark accurate (albeit pretty optimistic).

Here's the original post of the specs.

About NV40. There are two approaches Nvidia can take. Stick with 32-bit (which will obviously have much better performance on next-gen hardware) or scrap the mixed-mode for the time being and adopt 24-bit like ATI has. Both companies are being tight-lipped about their next-gen hardware so we really don't know what they will be doing aside from rumours.

There are a few factors to consider for guessing which route they take:

1) is DX 9.1 really going to use FP32 as a minimum? I think this seems doubtful for a few reasons. First of all, that would alienate all current hardware from DX9.1 games, and we haven't really had any DX9 games to speak of yet (I think the total is ~3 games so far). Second of all, performance is much slower with FP32, and for the moment, the IQ "improvement" is non-existant.

2) Nvidia made an engineering decision to go with 32-bits back with the NV30. They could not redesign a new GPU around 24-bit in time for the NV35- that would've taken them much longer than the short turnaround for NV35. However, will being "stuck" with 32-bit carry over into NV40? It might. Now that might be a mixed blessing. ATI will have to switch to pure 32-bit sometime in the future. ATI might need to switch to FP32 for the next generation anways, and Nvidia has already done this. *However*, With DX9 being already so new, I wouldn't be surprised if FP32 was not a necessity until the generation after NV40/R420. I mean, Doom3 is set to launch around the time that NV40 and R420 are supposed to be released, and it still has some FP16 code!! (at least for the FX cards) Let alone HL2 and other future games which will use the DX9 standard, FP24.

3) It all depends on the performance also. If next-gen hardware is powerful enough to run FP32 at speeds similar to FP24, then perhaps both ATI and Nvidia will switch to FP32. Again, we don't know if it will or not. Unless the new GPU's are drastically more powerful than current hardware though, it looks like FP32 will still have a very large performance penalty.

4) Nvidia seems to have taken a gamble with Cg and failed. They tried their luck at a proprietary API and it blew back in their face. Hopefully, they will stick to trying to run the standard APIs faster than the competition (DirectX and OpenGL- the second one which they already have a leg up on ATI). This is what got Nvidia in the lead in the first place - they kept up with the DirectX specs and beat 3dfx's Voodoo cards in DX and OpenGL. Plus they supported all of the DX features, while 3dfx was only partially compliant (Nvidia had 32-bit colour support and later stuff like bump mapping, etc in DX7, while 3dfx kept trying their own proprietary stuff, like motion blur).

If you look at the GeForce3, Nvidia worked very closely with Microsoft and follwed the spec exactly, and they launched the GF3 way before ATI had a DX8 card. Nvidia had a huge performance lead over current hardware at that time, and the GF3 was a wild success. Instead of using the same strategy for DX9, they seem to have gotten a little too clever, and tried to do their own thing, while ATI followed Nvidia's example to a T. For the R9700 Pro, it was ATI who worked with MS very closely to have their card follow the DX9 spec to the letter.
 
24-bit per color is the minimum spec for full shader precision in DX9. There's also a partial-precision spec, which I think is 16bpc.

FX cards seem to be limited mostly by register (temporary storage for variables) usage. FP32 uses twice the registers as FP16, thus some shaders may perform much slower b/c they have half the registers available to them. FX cards thus count heavily on shaders using partial precision wherever possible.
 
Back
Top