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

  • nerdtalker - Sunday, March 21, 2010 - link

    Noted and fixed! Thanks!

    Cheers,
    -Brian
  • StormyParis - Sunday, March 21, 2010 - link

    It seems so close to the whole iPhone thing, that if I were MS I'd be embarassed... a lot of pride swallowing must have been going on.

    My issue is, I can't find a good reason to want these phones. Even Office integration doesn't cut it, because the hardware is so gimped that I'd never, ever, want to do any office work with it. The rest is just regular smartphone stuff. As with Apple, I lose a whole lot of freedom of features (forced to use IE ? IE ??? back to web 0.8, guys). And my personnal guess would be that for the same loss, I get less in exchange, in terms of ease of use and features.

    Hopefully Google and Nokia will manage to keep their ecosystems open, because those "censored apps, censored hardware, no extensions nor upgrades" e-dystopias have me worried and slightly despondent.
  • NJoy - Sunday, March 21, 2010 - link

    avid user of WM for last 5 years, now I'm so disappointed, it's even depressing. They just have killed everything what I liked about WinMo. Sad
  • CSMR - Sunday, March 21, 2010 - link

    Extremely disappointing to be given a locked down system from Microsoft, missing essential capability that's been around for over a decade.

    Instead of continually expanding features and technology, and providing a better user interface, we have a locked down system with a long list of basic missing features. Windows Mobile has been downgraded from an operating system to firmware with this release.

    Even the user interface, supposedly "stylish" is almost everywhere an inefficient use of space to present information. It's fine to pander to customers who want that... but now there's no way to customize it to something better.

    Other features removed: No microSD cards, incredible! No file system access! Anyone who understands what a file is should avoid this system.

    I can see the benefits for the computer-illiterate, but for us and for business users why not make an open "Windows Mobile 7 Business" version without the limitations?
  • wolrah - Sunday, March 21, 2010 - link

    The carriers need the shiny new phones to attract customers, not the other way around. The consumer cares more about the thing they're carrying rather than the network it's on (see iPhone and AT&T). With that in mind, the experience of a mobile phone OS should be about the user, not the carrier.

    The ability for carriers to screw with phones is almost universally a bad thing. The CDMA carriers' love of BREW on dumbphones, Verizon's obsession with crippling devices, AT&T's lockdown of the Backflip and the previous heavy limits on "bandwidth intense" iPhone apps, etc. I don't think I need to go on to show that the carriers should never be allowed to influence phones in the slightest. I can not come up with a single example where carrier modifications were a benefit for the end user even on dumbphones, much less on smartphones.


    The bit about appeasing carriers worried about becoming "dumb pipes" is the problem in a nutshell. They are dumb pipes, that's the point. They provide the spectrum and backhaul lines that connect my phone to the PSTN and Internet. Saying that telecom carriers don't want to be dumb pipes is like saying that Ford doesn't want to be a car company. It just doesn't make sense, since that's exactly what they are.
  • trochevs - Sunday, March 21, 2010 - link

    I agree with you. Unfortunately we have two serious obstacles here. First is the brainwashed US consumer who thinks he/she is getting better deal by getting locked phone from US carrier for free or discounted price from artificially inflated price of unlocked phone.
    The US consumer are scripted so well and never stop to think for a minute. Just notice poor sales figures in USA for unlocked phones from Nokia, Sony and Google are.
    Second is the monopolistic behavior of US carriers. For many years they did not allowed unlocked phones on their networks. Only when real threat of regulation become evident they start allowing it. But they pile your phone bill with extra fees that makes you think twice. Not only that, but they keep charge you exact same monthly service fee even when everyone knows that this fee includes the price of the phone.
  • anactoraaron - Sunday, March 21, 2010 - link

    not to mention the monopolistic reality of government agencies allowing these carriers to buy out all of the smaller, local companies. There is this trend of broken economics going on here and we, the "end users," are the ones paying for it (literally). Once where I live here there were 4 smaller companies my "unlocked" phone would work on.... now "unlocked" phones are almost all just ATT and T Mobile.
  • trochevs - Sunday, March 21, 2010 - link

    Well. Thanks Brian for great article and thanks AnandTech for great coverage of Windows Phone 7 so far.
    From what I see WP7 is targeted directly against Apple iPhone not Google's Android. Apple is attacking HTC to hurt Android, but looks like Steve jobs did not learn his lesson. The real hit will come from Microsoft again. MS is taking advantage that all mobile operators are not happy with Apple keeping iPhone away from them. It will be slow switch for many iPhone users, but MS has the financial power to keep the WP7 alive for a while.
    Google's Android has own problem now. Google compromised their relationship with open source community in order to meet the US mobile operators and handset manufactures demands, but now Android is facing the real possibility that US carriers are going to use Android as bargaining power to get better deal from MS. Just like Asus and other OEM did with early versions of netbooks and using have-baked Linux distributions. So Google needs to decide between Open Source community or discontinue Android in the long run and accept that US carriers will hold the key and can lock out Google if they want to.
    So the key would be. How well Mr. Jobs and Mr. Schmidt have learn the lessons form recent and not so recent past. It will be fun watching. And the key player could turn to be Intel with their MeeGo.
  • FITCamaro - Sunday, March 21, 2010 - link

    They're definitely going to have to allow applications like Pandora to run in the background or no one will buy the phone. I use Pandora on my Droid. If it killed Pandora any time I wanted to check my email, send a text message, or browse the web, I'd be be pissed.
  • DigitalFreak - Sunday, March 21, 2010 - link

    Unfortunately, it looks like they're going down the iPhone route and locking everything down. App store, no SD cards, etc. Really not surprising I guess when you look at how they handled the Xbox 360.

Log in

Don't have an account? Sign up now