Friday, May 11, 2012

Doom 3 for Nokia N900

I'm sick with a cold, but since I ran out of movies to watch I thought it best to try to distract myself by seeing whether the N900 could run my Doom 3 branch. It turns out the answer is "yes, but very slowly."

I suspect due to the completely non-optimized code, poor choice of formats (should be using RGB565), and avoid using highp everywhere in the shaders.


Nevertheless, it does run despite the currently poor performance and few rendering bugs...

7 comments:

  1. Woah! Are you released sources of it anywhere? :> It looks so cool that I want to try it myself :D

    PS. How many frames do you have?

    ReplyDelete
    Replies
    1. The sources are not available yet; I have quite a few GL errors and rendering bugs I want to fix before making them public. This is an unoptimized version (debug build, no NEON asm paths, using expensive pixel formats) it only runs at about 1 fps (a bit more if I run full-screen and avoid the N900 composition path.)

      The released code is optimized for x86, and this can mean it runs extremely slowly on ARM. One good example of this is the rsqrt(x) function in Quake 3; on x86 and x86_64 it's blindingly fast, but on ARM it's significantly faster to just call the standard glibc 1.0/sqrt(x).

      I haven't even done the most basic profiling for ARM yet...

      Delete
    2. I have increased this to approximately 3 fps on N900 running the test_box map, unfortunately even with reduced shader precision the GPU is the bottleneck. The CPU is mostly running idle (though this is unlikely to be the case on complex animated scenes.)

      I suspect some GL errors may be impacting performance by forcing the GPU onto a slow path.

      Delete
    3. That's great!

      I think getting 30 fps on ARMs with so weak GPUs will be a impossible yet but it is at least something. It's awesome that you made it!

      Personally I will track your efforts to port it on ARM-based CPUs with GLES2 :)

      Im waiting on some source code too :)

      Delete
    4. BTW is there any possibility to talk with you privately? By email maybe?

      Delete
    5. I posted an update on the OpenPandora forums regarding the performance.

      http://boards.openpandora.org/index.php?/topic/6218-doom3-source-code-released-gpl-licensed/page__st__60#entry147040

      I can be contacted via IRC (private message) on irc.freenode.net in #iodoom3 channel, typically during EEST/GMT+3 afternoon.

      Delete
  2. Hello.
    Are you still working on Doom 3 GLES2 port? Is there source code available already?

    Thanks!

    ReplyDelete