Welcome, Guest. Please Login 3dfx Archive
 
  HomeHelpSearchLogin  
 
Page Index Toggle Pages: 1
Send Topic Print
DirectX 9 Shaders... In Software ! (Read 593 times)
FalconFly
YaBB Administrator
*****
Offline


3dfx Archivist

Posts: 2445
5335N 00745E
Gender: male
DirectX 9 Shaders... In Software !
12.07.03 at 22:14:30
 
Browsing the Ina Community Forums (ATARI) about the recent Software Renderer for Unreal Tournament 2003, I stumbeled over something quite astounding :

Someone dedicated to see what is doable in Software is in the Process of creating a Software Renderer which is aimed to become much faster than the MicroSoft DirectX 9 Reference Rasterizer (!)

Project Site is located at Soundforge :
http://sw-shader.sourceforge.net/

I contacted him, as well as the Driver Team around AmigaMerlin. He might be able to share invaluable knowledge and know-how, I yet have to receive a response from AmigaMerlin.

Anyway, sounds promising Smiley
(basically it is something that was originally envisioned to be possibly accomplished by 3D Analyzer)
Back to top
 
WWW  
IP Logged
 
Blazkowicz
Full Member
***
Offline



Posts: 132
france
Gender: male
Re: DirectX 9 Shaders... In Software !
Reply #1 - 16.07.03 at 04:43:37
 
I'm not that impressed, since you can do everything in software, having full control on the pixels Grin

DX9 shaders are insignificant next to the power of real-time raytracing
http://forum.hardware.fr/forum2.php3?post=566023&cat=1&config=&interface=&cache=...
(thread in french, but don't worry, the pictures are in english  8)


so, this "DX9 shader emulator"..  interesting

faster than microsoft's rasterizer, that's easily possible
the rasterizer is meant to produce a reference image in terms of quality

if the guy's designing a renderer intended for real-time, there must be some simpler texture filtering, and lots of optimizations

maybe it will be quite playable on a dual opteron in 640x480  Wink
Back to top
 
 
IP Logged
 
BlacK_Out
Junior Member
**
Offline


Shop smart.. .. .  .shop
S-Mart!.....YA GOT THAT?!

Posts: 73
Gender: male
Re: DirectX 9 Shaders... In Software !
Reply #2 - 02.09.03 at 20:14:39
 
I would assume this would be better implemented if the BIOS were re-programmed to include this feature so when it is implemented by the driver so that it is being emulated through hardware and then be assisted/optimized through the drivers (And MMX/SSE/SSE2)  rather than just through drivers themselves, so it isn't being emulated by software?


Your fontrune cookie reads
"It may be that your sole purpose in life is simply to serve as a warning to others"
Back to top
« Last Edit: 03.09.03 at 02:31:47 by BlacK_Out »  

Your fortune cookie reads:&&"It may be that your sole purpose in life is simply to serve as a warning to others" &&
 
IP Logged
 
FalconFly
YaBB Administrator
*****
Offline


3dfx Archivist

Posts: 2445
5335N 00745E
Gender: male
Re: DirectX 9 Shaders... In Software !
Reply #3 - 03.09.03 at 23:14:13
 
Hm, I reckon you trust a Bios to perform tasks it is not able to.

To my best knowledge, the Bios mainly sets fundamental Timings and performs POST Hardware Setup, and holds the VESA features.

High API Functions like Pixel Shaders should have no use of the Bios. Once the OS is loaded, I think the Bios actually is rather idle and unused, until either VESA functions are requested or a Flash is performed.

All high-level functions AFAIK have nothing to do with the Bios ifself, and only working from Application >> API >> Driver >> Hardware.

I think not even StanTo was ever able to give specific details on what advantage each new Bios Revision actually was supposed to have (expect improved general Hardware compatibility I assume)
Back to top
 
WWW  
IP Logged
 
BlacK_Out
Junior Member
**
Offline


Shop smart.. .. .  .shop
S-Mart!.....YA GOT THAT?!

Posts: 73
Gender: male
Re: DirectX 9 Shaders... In Software !
Reply #4 - 04.09.03 at 01:05:11
 
Go figure, eh? It's using a BIOS - Basic Input/Output system.

Feel kinda dumb for asking about the BIOS portion.  Embarrassed

Though in regards to vertex/pixel shaders,etc. -- would it be possible to re-route some of the 3Dfx funtions that no longer are in use by games, like the T-buffer (just sittin' there not doing a thing now-a-days) to perform funtions like this, or somehow have the hardware do the work rather than software.

I know software emulation is slooooooww....I haven't any knowledge on the Vertex Shaders SourceForge project, but I would imagine you could combine the different funtions of the card (as well as MMX,SSE,SSE2) to work together to emulate something like that, right?


Your fontrune cookie reads

"It may be that your sole purpose in life is simply to serve as a warning to others"
Back to top
 

Your fortune cookie reads:&&"It may be that your sole purpose in life is simply to serve as a warning to others" &&
 
IP Logged
 
FalconFly
YaBB Administrator
*****
Offline


3dfx Archivist

Posts: 2445
5335N 00745E
Gender: male
Re: DirectX 9 Shaders... In Software !
Reply #5 - 04.09.03 at 01:14:42
 
I believe a function like Pixel Shaders cannot take advantage of any 3dfx-inherent functions (e.g. available 3d Features).

Pixel/Point Sprites come to my mind as an Idea, but I have no clue if those could be used for the effects needed (?)

MMX/3dNow/SSE(2) however I imagine would be extremely useful, if the Pixel Shader can somehow be fit into a Matrix-like operation scheme.

So far, quite a number of Driver features (Geometry Assist, 3dfx Glide, GlideXP) took a small but existing advantage of it, so I reckon it is possible Smiley

But for those questions the Developer of the Software-Shader is likely the best guy to ask, everything else is probably only best guesswork Wink

I have no clue how close one can get with Software Emulation, and in the end, at what performance...
(the UT2003 Software Renderer however already worked surprisingly fast, albeit with a number of limitations on Visual Quality of course)
Back to top
« Last Edit: 05.09.03 at 02:36:42 by FalconFly »  
WWW  
IP Logged
 
BlacK_Out
Junior Member
**
Offline


Shop smart.. .. .  .shop
S-Mart!.....YA GOT THAT?!

Posts: 73
Gender: male
Re: DirectX 9 Shaders... In Software !
Reply #6 - 05.09.03 at 01:38:47
 
Hey Falconfly, I would email them but I do not wish to create an account on that site, becuase I won't use it hardly ever, plus I am a part enough forums, I don't want to sign up for anymore at the moment (and I am being lazy about it.  Grin )

Does this person have an email I can send questions to and maybe post here any info he replies back with?

(Other than the one the required you to login.)


Your fontrune cookie reads
"You foolishly belive in the goodness of mankind"
Back to top
« Last Edit: 05.09.03 at 01:40:58 by BlacK_Out »  

Your fortune cookie reads:&&"It may be that your sole purpose in life is simply to serve as a warning to others" &&
 
IP Logged
 
FalconFly
YaBB Administrator
*****
Offline


3dfx Archivist

Posts: 2445
5335N 00745E
Gender: male
Re: DirectX 9 Shaders... In Software !
Reply #7 - 05.09.03 at 01:58:19
 
Hm ?

I thought it was listed on the Project's Site.

The EMail I used to contact him : (removed to prevent spam source)
Back to top
« Last Edit: 05.09.03 at 09:32:59 by FalconFly »  
WWW  
IP Logged
 
BlacK_Out
Junior Member
**
Offline


Shop smart.. .. .  .shop
S-Mart!.....YA GOT THAT?!

Posts: 73
Gender: male
Re: DirectX 9 Shaders... In Software !
Reply #8 - 05.09.03 at 02:19:45
 
It is listed on the page, I just didn't care to login in to email him, however -- stupid me, just put in an @ sign between his email account and domain name.....ok...feelin' stupid!  Embarrassed

Thanks none-the-less  Grin

Your fontrune cookie reads
"You foolishly belive in the goodness of mankind"
Back to top
 

Your fortune cookie reads:&&"It may be that your sole purpose in life is simply to serve as a warning to others" &&
 
IP Logged
 
FalconFly
YaBB Administrator
*****
Offline


3dfx Archivist

Posts: 2445
5335N 00745E
Gender: male
Re: DirectX 9 Shaders... In Software !
Reply #9 - 05.09.03 at 09:27:34
 
Ugh....

I think he's not got much time at hand.
Please don't make people visit Forums to see what the question was in the first place Wink

I thought you would ask him your specific question in your EMail (?)

Note : please remove his Email from the Forum Post (I'll do the same), since Webspiders have just learned to process EMails from YaBB Forums.
This is just to fight a possible source of spam Smiley
Back to top
« Last Edit: 05.09.03 at 09:32:19 by FalconFly »  
WWW  
IP Logged
 
c0d1f1ed
YaBB Newbies
*
Offline



Posts: 1
Belgium
Gender: male
Re: DirectX 9 Shaders... In Software !
Reply #10 - 05.09.03 at 12:51:24
 
Hi,

I'm the developer of swShader. I don't see any specific questions here so I'll just try to explain how exactly swShader works.

First of all, software rendering is fast, blazing fast. Ok you don't believe me... Well, five years ago we were all playing Quake in software mode with good resolutions and framerates on a Pentium 133. Nowadays processors are at least ten times faster but nobody does software rendering any more? You might think that this is because of things like bilinear filtering. Indeed, you need more than a few instructions for that (Qauke had four instrucitons per pixel in the inner loop). But current processors feature instructions that were not available for Quake. The main reason is that software rendering until now couldn't keep up with the flexibility of hardware rendering. That's right, the one thing software rendering is good at, it gets beaten at.

Let me explain. Hardware can support tens of blending modes, filter modes, border modes, you name it. A handfull of transistors make the 'decision' what modes are active. Nevertheless, software is the most flexible you can get, but at a huge price. If you had to implement all those modes you have two options: write one version full of control statements, or write every version separately and optimize them manually. The first option is the DirectX reference rasterizer. Even in the inner pixel loop it had hundreds of control statements. This is horribly slow because most of the time you're just 'jumping over code'. The Pentium 4 is also has huge penalties for mispredicted jumps. The second option is also not very attractive. We're talking about thousands of combinations here, and every new option doubles that number. Also, manually optimizing is not managable because when you make a small design change or an optimization, all other code has to change as well. And I'm still talking about the fixed-function pipeline now...

The solution is simple, elegant and mighty powerful. For every combination of render modes, generate the render function. For this purpose I have first written my own run-time assembler: SoftWire. It's main feature is what I call run-time intrinsics. They are regular functions, with the names of assembly instructions (the whole instruction set). When called, they generate the corrresponding machine code of the instruction and place that in a buffer. Once all instructions are generated I link the external symbols, load it into memory and it's ready to be called just like a regular function! Register allocation is resolved at the same time, so I can work with symbolic names instead of figuring out what value is stored in what register. This also ensures optimal register usage.

In other words, this means I select exactly those instructions that do the actual rendering operation. No more conditional statements in the inner pixel loop. It has disadvantages too, but they are solvable. First of all I do not genrate the functions for each and every render mode combination. Just the ones that are needed. Run-time intrinsics are very fast so generating a few shaders per frame has no influence on performance. I also cache the last hundred shaders so it's efficient in memory usage. Another problem with run-time generated code is that you obviously can't hand-optimize it any more. For this I have solutions as well. You are not limited to always let the shader be generated. If you have a very efficient hand-optimized rendering function for one specific, frequently used, combination of render modes, you can place that in the cache beforehand. Also, what I have been experimenting with is automatic instrucition sheduling. Because of the complex processor architectures this isn't easy but I'm making progress.

So what about real results? Well, here you can find a Quake III renderer in software: Real Virtuality. The performance is not that great but remember that Quake III never was designed for software rendering! Also, there are still tons of optimization opportunities for that project. For example only the pixel pipeline is run-time generated but also the vertex pipeline and clipper could benefit from it.

And finally we come back to the swShader project. Currently it is just a very successful proof-of-concept for an article I wrote for the upcoming ShaderX 2 Tips and Tricks book. It uses full 32-bit floating-point precision using SSE instructions everywhere. But the shader instruction translator was written in a hurry so it could be more optimized as well. And just like the Real Virtuality project the vertex pipeline and clipper is still written in plain C++ code. So there's still lots of room for performance increases.

I hope this answers most of the questions you had in mind.
Back to top
 
WWW  
IP Logged
 
BlacK_Out
Junior Member
**
Offline


Shop smart.. .. .  .shop
S-Mart!.....YA GOT THAT?!

Posts: 73
Gender: male
Re: DirectX 9 Shaders... In Software !
Reply #11 - 05.09.03 at 19:44:28
 
Sweet, thanks for the info dude --- and taking the time to write that up for us! Grin
====

Oh, also Falconfly - I deleted the email post as you requested.  Wink

See he wrote back, no worries! Also when you contacted him and the AmigaMerlin team, have they done any information exchange, i.e. - next AM drivers to include this sw-shader ....heheheheh!  Grin


Your fortune cookie reads
"You foolishly belive in the goodness of mankind"
Back to top
« Last Edit: 05.09.03 at 19:51:20 by BlacK_Out »  

Your fortune cookie reads:&&"It may be that your sole purpose in life is simply to serve as a warning to others" &&
 
IP Logged
 
FalconFly
YaBB Administrator
*****
Offline


3dfx Archivist

Posts: 2445
5335N 00745E
Gender: male
Re: DirectX 9 Shaders... In Software !
Reply #12 - 05.09.03 at 20:12:02
 
Well, Welcome to the Forums c0d1f1ed Smiley

BlacK_Out :
I don't know how far they actually got in touch.
I just sounded like an ideal combination, since the Voodoo's need almost everthing beyond DirectX6 in Software.
-------------------
My wishlist for the "Perfect Driver" :

In theory, a fixed Geometry Assist could act as a full DirectX7 T&L, and Software taking over the DX8 and DX9 Shader Parts, using heavy 3dNow!/SSE(2) where possible and implementing several stages all the way from simlpe NUL Rendering, over Quick & Dirty replacement effects (look-alike), upto Approximation (coarse emulation) und finally full precision Emulation.

Next thing needed would be a Memory expansion, like NVidia's PCI Memory allocation (better than nothing), to increase texture Memory.

And the last Item on my imaginary wishlist would be a form of Manual or adaptive De-Tesselation; reducing Geometry before it is being handed over the Bus.
Something like Polygon-reduction "Mipmap" levels, reducing the total amount of Polygons per scene, in order to avoid extreme Polygon per scene Situations originally created for powerful T&L Cards.

The near objects could be rendered in high detail, leaving the far Geometry highly reduced to reduce CPU loads.

Finally, all this would need to be fit into a Driver Undecided

Any Wizards of x86 Assembler and DirectX/3D & OpenGL API's out there that wants to take a shot ? Grin
Back to top
 
WWW  
IP Logged
 
BlacK_Out
Junior Member
**
Offline


Shop smart.. .. .  .shop
S-Mart!.....YA GOT THAT?!

Posts: 73
Gender: male
Re: DirectX 9 Shaders... In Software !
Reply #13 - 05.09.03 at 20:46:00
 
Dude! that sounds like pretty sweet kick ass idea!

I could go for a driver package like that  Grin


Your fortune cookie reads

"You foolishly belive in the goodness of mankind"
Back to top
 

Your fortune cookie reads:&&"It may be that your sole purpose in life is simply to serve as a warning to others" &&
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print