Joining the Moonlight fun

Watching my teammate hacking on moonlight was sure to detain on me someday. So when Alan talked about making Moonlight run on top of OpenVG I got pretty hooked.

Two hacking days later, I actually got something to « work ». At the moment it’s quite rough, hacky and it probably kills kitteh too (be careful, it makes shana angry, you wouldn’t like that).

Basically, what I did is to plug the OpenVG layer inside Moonlight custom version of cairo (using that code as a base) and then tweaked Moonlight to use the new surface (together with some changes in how drawing and caching is done internally).

Following is a screencast of the thing running Bubble Mark :



(Direct link : http://www.youtube.com/watch?v=dywInr08ySg)

As you can see there are a lot of drawing issues remaining but the basic stuff is here. The code is not terribly faster (+10 fps or so) but that may come either from a bug in my graphic card driver (it already does the bizarre thing of slowing down after some time) or an other part of Moonlight.

It will definitely be better when OpenVG becomes more widespread, has more optimized implementations and can actually run on its own rather than on top of OpenGL (I’m eager to try that on top of Gallium3D when it will be ready).

As for inclusion in the mainline tree, I don’t know. I mostly did the thing for fun as a proof-of-concept and it’s certainly far too crappy to ever get integrated as is, but maybe someone will step up and do it correctly later :-) .

Comments 7

  1. Miguel de Icaza wrote:

    This is a great hack!

    Posted 16 juil 2009 at 19 h 43 min
  2. Jeffrey Stedfast wrote:

    Wow, this is really cool!

    I’m hoping that Larry or someone with more knowledge of the rendering layer can look it over and see what we can incorporate into mainline.

    Posted 16 juil 2009 at 20 h 41 min
  3. Alan wrote:

    I tested the patch on my system, but I hit the exact same rendering issues that Jeremie did. With the latest NVidia drivers, 3D performance starts off fine but quickly slows down to unusable. It’d be great to test this hack on either older drivers or a non-nvidia card

    Posted 17 juil 2009 at 8 h 58 min
  4. Max Kosenko wrote:

    Cool. I hope such performance results won’t stop you guys from thinking more about OpenVG under the Moonlight :) I believe not a lot of things got HW acceleration with your implementation, but that’s a good start.

    Posted 17 juil 2009 at 9 h 00 min
  5. Alan wrote:

    The performance issues both myself and Jeremie have seen aren’t inherent to openvg or even moonlight, it appears to be a bug in the nvidia drivers (or somewhere in that stack). All 3D applications on my system experience the same bizarre gradual slowdown.

    Posted 17 juil 2009 at 14 h 54 min
  6. Max Kosenko wrote:

    Ok. I understand. But what about performance in general? My concern is HW acceleration of Moonlight as I’ve said before and portability. Cairo backed with OpenVG isn’t hardware accelerated yet, since OpenVG not (or NVIDIA done OpenVG over OpenGL?). But there is ShivaVG which can use OpenGL stack underneath. What is your feeling in general now about that?

    Posted 17 juil 2009 at 15 h 01 min
  7. Max Kosenko wrote:

    btw, I’ve sent updated Bubblemark for SL3 to Alexey – he’ll post that in a few days. Results for me were:

    SL3 vector 16 – 82fps, 128 – 14fps
    SL3 cached 16 – 315fps, 128 – 95fps

    Flash vector 16 – 45fps, 128 – 3fps
    Flash cached 16 – 120fps, 128 – 30fps

    So SL3 is already twice faster than Flash on primitive drawing. But even cached it’s 3 times faster than Flash. That wasn’t the same with SL2. So it would be tricky to keep up, but I believe in you guys :-)

    Posted 17 juil 2009 at 15 h 05 min

Trackbacks & Pingbacks 1

  1. From Follow-up on OpenVG support for Moonlight « Yet Another [a compléter] on 27 juil 2009 at 18 h 14 min

    [...] on OpenVG support for Moonlight Interested by the stuff I demonstrated some weeks ago [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *