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
.













This is a great hack!
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.
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
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.
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.
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?
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
[...] on OpenVG support for Moonlight Interested by the stuff I demonstrated some weeks ago [...]