Software renderer beating Radeon/GeForce

Discussion in 'Architecture and Products' started by Nick, Apr 30, 2003.

  1. Nick

    Veteran

    Joined:
    Jan 7, 2003
    Messages:
    1,881
    Likes Received:
    17
    Location:
    Montreal, Quebec
    Ok not performance-wise but...

    I've created a software renderer which supports ps 2.0 shaders. Unlike the reference rasterizer, it is not an interpreter but an optimized JIT compiler using SIMD instructions. So it is dozens of times faster than refrast and beats hardware in flexibility. For one, it is no problem to go beyond the 32 texture instructions limit in ps 2.0 hardware, while still keeping things real-time.

    You can read the details here: http://www.flipcode.com/cgi-bin/msg.cgi?showThread=COTD-swShader&forum=cotd&id=-1.
     
  2. PC-Engine

    Banned

    Joined:
    Feb 7, 2002
    Messages:
    6,799
    Likes Received:
    12
    How fast would your software run on a cpu that has 128 SIMD units relatively speaking?
     
  3. demalion

    Veteran

    Joined:
    Feb 7, 2002
    Messages:
    2,024
    Likes Received:
    1
    Location:
    CT
    Tsk, tsk, you naughty sensationalist!
     
  4. Crusher

    Crusher Aptitudinal Constituent
    Regular

    Joined:
    Mar 16, 2002
    Messages:
    869
    Likes Received:
    19
    Got a demo we can download? I can't get the swShader project to compile in VC++ 6.0 in Win2k, and I don't see any demo executables in the zip file.
     
  5. gokickrocks

    Regular

    Joined:
    Dec 19, 2002
    Messages:
    465
    Likes Received:
    1
    once you compile it (i used vc++ .net), you can run the demo...

    also, for those that cant get it to work, try whats mentioned below...
     
  6. Nick

    Veteran

    Joined:
    Jan 7, 2003
    Messages:
    1,881
    Likes Received:
    17
    Location:
    Montreal, Quebec
    Relatively... 128 times faster? :wink:
     
  7. Nick

    Veteran

    Joined:
    Jan 7, 2003
    Messages:
    1,881
    Likes Received:
    17
    Location:
    Montreal, Quebec
    I know, I know, but else if I put "sofware rendering" in the title absolutely nobody here is interested :cry:
     
  8. Nick

    Veteran

    Joined:
    Jan 7, 2003
    Messages:
    1,881
    Likes Received:
    17
    Location:
    Montreal, Quebec
    This is an alpha version for developers only, people who know this is more than just a spinning teapot. It should compile and run correctly once you've installed the Processor Pack.
     
  9. PC-Engine

    Banned

    Joined:
    Feb 7, 2002
    Messages:
    6,799
    Likes Received:
    12
    :lol: :shock: That's really fast! Let's say I get 10 fps now, does that mean I'll be getting 1280 fps with that cpu?
     
  10. Nick

    Veteran

    Joined:
    Jan 7, 2003
    Messages:
    1,881
    Likes Received:
    17
    Location:
    Montreal, Quebec
    There are some other limitations like memory bandwidth, but this can be reduced by things like tile based rendering. If you can give me such a system I'll try it out for you :wink:
     
  11. Saem

    Veteran

    Joined:
    Feb 7, 2002
    Messages:
    1,532
    Likes Received:
    6
    How adaptable is this to other architectures? I haven't had a chance to look at the code, but are things seperated off into math libraries, where one would just have to change their implementation and that would be about it?
     
  12. PC-Engine

    Banned

    Joined:
    Feb 7, 2002
    Messages:
    6,799
    Likes Received:
    12
    You would have to sign an NDA 8)
     
  13. darkblu

    Veteran

    Joined:
    Feb 7, 2002
    Messages:
    2,642
    Likes Received:
    22
    *oops, blu realizes he didn't quite express his view on Nick's project the first time around*

    congrats, Nick, for being the first person to implement this really great concept (i.e. JIT assembler as shaders)!
    *blu virtually shakes Nick's hand*

    to be able to come up with arbitrary shading techniques is one of the main reasons people come up with software rasterizers, and Nick has taken this idea to its appogee by making possible for vitually-unlimited shaders. my own rasterizer was partially aimed at this too, but it missed the consept of 'shaders', so implementing arbitrary shading techniques was way more cumbersome.

    as a matter of fact, i think what Nick has produced will have quite an impact on the future development of 3d rasterizer trechnologies. again, kudos to him for being the one to actually step into the next level in rasterizers' tech!
     
  14. Nick

    Veteran

    Joined:
    Jan 7, 2003
    Messages:
    1,881
    Likes Received:
    17
    Location:
    Montreal, Quebec
    Currently it is targeted at x86 only and requires MMX/SSE. Just like any other JIT compiler, you'll have to re-write the code generator (SoftWire/Synthesizer) and translate ps 2.0 instructions into assembly code for your architecture (Shader/PS20Assembler). Since I only own a Celeron 1200 it's impossible for me to try this, but it's certainly possible and most architectures are simpler than x86...
     
  15. Saem

    Veteran

    Joined:
    Feb 7, 2002
    Messages:
    1,532
    Likes Received:
    6
    Thanks for the info, Nick. That's some really cool stuff.

    I wonder what implications this might have if ported over to the PS2?
     
  16. Nick

    Veteran

    Joined:
    Jan 7, 2003
    Messages:
    1,881
    Likes Received:
    17
    Location:
    Montreal, Quebec
    Since it appears to be stable I have added an executable to the package in case you do not have Visual Studio: http://sw-shader.sourceforge.net. If you do have it I would appreciate it if you tried compiling it and reported any problems.
     
  17. RussSchultz

    RussSchultz Professional Malcontent
    Veteran

    Joined:
    Feb 6, 2002
    Messages:
    2,855
    Likes Received:
    55
    Location:
    HTTP 404
    PS2 might have some code limitations for the JIT compiler (I would think, anyways) since it is an embedded system with limited memory. Maybe not, though. (I'm just talking out of my arse and theorizing here).
     
  18. Nick

    Veteran

    Joined:
    Jan 7, 2003
    Messages:
    1,881
    Likes Received:
    17
    Location:
    Montreal, Quebec
    I just tested a shader with 32 texture operations and 64 arithmetic operations. It's nearly 10 kB big, and my current caching system can store 256 x86 shaders, so that would be 2.5 MB. This is the worst case, and I'm planning a peephole optimizer which will reduce this. So 1 MB in average should suffice.
     
  19. London-boy

    London-boy Shifty's daddy
    Legend Subscriber

    Joined:
    Apr 13, 2002
    Messages:
    21,897
    Likes Received:
    6,023
    i think PS2 would lack blending modes to support anything that even compares to PS2.0..... but u never know, i might be wrong.... oh and let's not talk about performance.....
     
  20. Reznor007

    Regular

    Joined:
    Feb 6, 2002
    Messages:
    628
    Likes Received:
    68
    Location:
    Norman, OK, USA
    If it's in software, does it's video hardware matter at all? ;)
     
Loading...

Share This Page

  • About Us

    Beyond3D has been around for over a decade and prides itself on being the best place on the web for in-depth, technically-driven discussion and analysis of 3D graphics hardware. If you love pixels and transistors, you've come to the right place!

    Beyond3D is proudly published by GPU Tools Ltd.
Loading...