GPU Acceleration - Silverlight

There is a clearly defined set of transforms and optimizations developers can make to leverage the GPU on the phone through Silverlight. The Silverlight performance team is striving to add more hardware accelerated primitives, but at present, hardware acceleration is limited to:

  • JPEG Decoders (PNG decoders are not implemented yet)
  • Media Decoders (Video codecs, e.t.c.)
  • 4 Composition Transforms
    • Render Transform
    • Perspective Transform
    • Opacity Transform
    • Rectangular Clips

The real interesting story, however, is about pixel shaders. Though the Direct3D drivers and GPU support programmable pixel shaders, the only pixel shaders enabled and exposed to developers right now through Silverlight frameworks are blur and drop shadow shaders. These are fully hardware accelerated. Developers at present cannot write their own programmable shaders; there is no API for doing so. The Silverlight team is working hard to add additional hardware accelerated primitives, and eventually allow custom programmable pixel shaders for developers, but it likely won't be done in time for this release.

The UI thread framerate (which is essentially the device framerate we as end users care about) will be limited to 30 FPS, although the hardware is capable of in excess of 60 FPS. 30 FPS has been chosen by the WP7S team as the framerate cap for battery life concerns, and also threw in the age-old somewhat nebulous human eye response argument. Virtually all of the demos shown during MIX10 had the 30 FPS cap applied, and most if not all seemed visually smooth. There was some objection from a few developers to the 30 FPS cap, however the battery life concerns are very valid. That said, gamers are picky, and iPhone OS is capped at a faster 60 FPS - it might be worth it to sacrifice some battery if developers want that extra response.

An interesting consequence of how much the Silverlight UI is GPU accelerated, is that the emulator packaged as part of the CTP bundle at developer.windowsphone.com/ requires WDDM 1.1 for hardware acceleration on the desktop. Otherwise, everything is CPU-rendered in the emulator, resulting in some relatively laggy performance.

GPU Acceleration - XNA

Recall now that while the primary phone UI and most "normal" applications will run atop the Silverlight framework, games requiring twitchier response and wishing to leverage code reuse across PC, Xbox 360, and WP7S will run on the XNA framework. WP7S supports full hardware accelerated 3D with one exception - programmable shaders. Microsoft will eventually do so, it simply hasn't finished an API for doing so for launch. In its stead, however, XNA offers four configurable effects (which are themselves shaders) which it helps will mitigate lack of custom programmable shaders at least until it can provide a polished API. WP7S XNA developer Shawn Hargreaves blogs:

"Instead of programmable shaders, we augmented the existing BasicEffect with four new configurable effects: SkinnedEffect, EnvironmentMapEffect, DualTextureEffect, and AlphaTestEffect. These are designed to run efficiently on the mobile GPU hardware, and I think do a good job of providing enough flexibility for developers to create awesome looking games, while also meeting our goals of being able to ship a robust and well tested product on schedule."

The XNA title I demoed, "The Harvest," leverages these effects and came off looking extremely competitive as mentioned earlier. Remember the different aspect ratios and screen resolutions I was concerned about earlier?


Screen Resolutions - To Scale

Well, the XNA tools for WP7S incorporates support for an on-GPU hardware scaler. Developers can elect to detect whichever resolution the software is running on and render appropriately, or choose one, render at it across both, and scale appropriately. Touch input is even scaled appropriately as well. As a further boon, because 800 x 480 can still be challenging for mobile hardware, developers can render under resolution and scale up to 800 x 480 as a last resort.

The SoC & Hardware Requirements Emulator Findings
Comments Locked

55 Comments

View All Comments

  • glynor - Monday, March 22, 2010 - link

    I don't know... I'm no Apple fanboy but I've never understood why people get all excited about the supposedly superior Nexus One hardware:

    1. Crappy 6-bit dithered screen with horrible super-saturated color reproduction.
    2. Multitouch broken in hardware.
    3. 512MB of onboard Flash memory all that's available for applications.

    Yes, it does have a really nice main processor, but that's really about all it has going for it hardware wise. The rest is at best equal to the much-earlier iPhone 3GS, and at worst isn't even up to that level.

    Don't get me wrong... I love the open nature of the platform. But I really don't like MANY of the choices that both HTC and Motorola made in these current iterations.
  • n0nsense - Sunday, March 21, 2010 - link

    LOL :)
    iPhone is a gadget. It has tons of apps, but has to be tweaked to be a powerful tool.
    As for crap hardware, Nexus is one step ahead of iPhone, while many others on pair. Of course there are tons of cheaper (crappier)devices, but they are good for market share. More devices, more developers.
    Don't get me wrong, I prefer plain Linux on my mobile (something like MeeGo), but if i had to choose, iPhone and Winmo sharing the last place.
  • bupkus - Sunday, March 21, 2010 - link

    I'm sitting here with my Palm Treo Pro with Windows Mobile 6.1 and while understanding the douse and flame approach I'm wondering why just because my desktop Windows gets service releases I had imagined my phone would receive the same?
    Silly me.
  • gnesterenko - Sunday, March 21, 2010 - link

    Droid for me. Thanks for clarifying.
  • kanabalize - Monday, March 22, 2010 - link

    unless android has lotsa eyecandy(icon style, chic GUI design) like iphoneOS, its going to be dead....

    Remember the real consumer is the non-technological savvy users not people who reads alot of reviews and familiar with the technology...

    when people have to choose between iphone and other android phone they aren't really care about what is behind the OS but what is right there in front of their eyes....
  • dhaoracle - Sunday, March 28, 2010 - link

    I'm mad that this world is still naive idiots when it comes to things of any such. I might do that with a nice piece of ass but i will at least to get to know whats her name and what she's doing here(wherever).
    And why is anyone talking about Windows Mobile 6.5. stop hating and do your research. Google is nothing but eye-candy nothing else but a pretty balloon with lots of helium and pastry at the bottom. thats it nothing more nothing less.I would go with iPhone before Android and i hate iPhone...
  • darwinosx - Sunday, March 21, 2010 - link

    Looks like the juvenile Droid ads found a sucker.
  • CSMR - Sunday, March 21, 2010 - link

    It makes sense. Android is competitive or almost competitive with WM6.5. Now WM has lost most of its features while android will only improve.
  • deputc26 - Sunday, March 21, 2010 - link

    Seriously why no Android review? It is the most power-user friendly mobile platform. 2.1 is far superior to WinMo 6.5.
  • Anand Lal Shimpi - Sunday, March 21, 2010 - link

    I'm working on a review of the AT&T Nexus One :)

    Take care,
    Anand

Log in

Don't have an account? Sign up now