Apollo has landed

Apollo has landed

Rate This
  • Comments 14

The developer SDK for Windows Phone 8 (codename Apollo) is now available for download from an internet near you.  Which means I can finally talk about what I’ve been working on this past year!  I am dev lead for graphics, so I’ll probably have most to say about that area, but knowing me I’m sure I’ll find other topics to write about too.

This first post is basically just a bullet list summarizing the graphics capabilities of the platform:

  • Write games in high performance native C++
  • Or you can interop between XAML and C++/D3D, similar to the Silverlight/XNA interop feature in Mango
  • Graphics APIs are a subset of Windows 8, so it’s easy to move code back and forth between phones, tablets, and desktop PCs
  • Direct3D 11.1 API, targeting feature level 9.3 hardware capabilities
  • DirectXMath provides high performance SIMD vector math, optimized for SSE and NEON
  • XAudio2 provides game focused audio playback, mixing, and effects (ok, you got me, this one isn't graphics)
  • Not all Windows graphics components are supported on phone
    • No WIC - use DirectXTex to preconvert textures to .dds format, then DirectXTK to load them
    • No Direct2D or DirectWrite - use DirectXTK instead
    • No legacy features such as GDI, D3DX, or fixed function - parts of these can be replaced with DirectXTK

What does D3D11 feature level 9.3 give you?

  • Shader model 4_0_level_9_3
  • Max texture size 4096
  • BC1-BC3 texture compression
  • Floating point texture formats
  • Conditional non-power-of-2 textures  (can’t use wrap addressing or have mipmaps)
  • Multiple rendertargets
  • Hardware instancing
  • Occlusion queries
  • Separate alpha blend

Yes, you read that right.  Shader model 4_0_level_9_3 means that programmable shaders are now fully supported on Windows Phone.  But what is this 4_0_level_9_3 thing, you may well ask?

  • Not quite the same as D3D9 shader model 2.0
  • Uses HLSL 4.0 syntax
  • Similar features to vs_2_a and ps_2_b  (think of it as 2.0 turned up to 11 :-)
  • Long pixel shaders (512 instructions)
  • Dynamic flow control
  • Gradient instructions

So what notable D3D11 features are NOT included in feature level 9.3?

  • No geometry shaders
  • No hull/domain shaders
  • No DirectCompute
  • No resource arrays
  • No BC4–BC7 compression
  • No vertex texture fetch

Another way to think of this: feature level 9.3 is basically the same as the XNA HiDef profile, except without vertex texture fetch.

Anything else important you should know?

  • Windows Phone 8 uses a tiled GPU architecture, so for best performance you'll need to understand how to use the D3D11_MAP_WRITE and D3D11_COPY flags to specify DISCARD and NOOVERWRITE behaviors, and when to call ID3D11DeviceContext1::DiscardView  (ooh, good topic for future articles)

  • Native D3D apps handle their own rotation: this isn’t automatic like in XNA.

  • Windows Phone 8 device manufacturers can choose one of three screen resolutions:
    • 480x800
    • 720x1280
    • 768x1280
  • Windows Phone 8 includes the same hardware scaler feature as WP7.  Use this to draw at the same resolution on all devices (simplifying development) or to draw fewer pixels for better performance.  Use the new DXGI_SCALING_ASPECT_RATIO_STRETCHED mode.

I think this is a pretty exciting set of capabilities, and am looking forward to seeing what y’all will be able to do with it.  To whet your appetite, check out these screenshots from an HDR rendering demo created by my colleague Adrian.  It's crazy that this does on a phone what would have been impossible on a high end gaming console of just 10 years ago, and at a higher resolution to boot!

 

ss2           

ss1           

ss4

  • Let's just say finally!!! Although, I have to say that not supporting D2D is a major issue for me (not a game developer - I need good 2d rendering and scalable text).

  • What is this "HDR rendering demo" that these pics are from? Anychance you can point us to a video/post on it ?! :)

    p.s. thanks for Apollo by the way, awesome work!

  • For 2D rendering and scalable text, I would recommend going the XAML route rather than native D3D

  • We're looking at perhaps cleaning up the HDR rendering demo for a possible public release - right now this is just an internal test app though.

  • FYI, Managed DirectX wrapper SharpDX just released a new version adding support for WP8 as well as providing a port of DirectXTk and DirectXTex through its SharpDX.Toolkit. sharpdx.org/.../new-version-2-4-0. Thanks for the great work in DirectXTk and DirectXTex, that was really helpful to build the toolkit!

  • Congrats on getting your SharpDX Windows Phone support out so promptly!  Zero day release, huh? :-)

  • MonoGame will also be supporting Windows Phone 8 as soon as humanly possible, built on SharpDX.  Go XNA development in Windows Phone 8!

  • I still find it very unfortunate that there is no official managed interface to D3D from Microsoft, but it is good to see that the community (SharpDX/Monogame) is stepping up fill the gap.

  • Congrats on the release and thanks for all the hard work! I'm definitely looking forward to the future posts (and to getting a Windows Phone 8 sometime in the coming month).

    Between WP8 and the Windows RT devices (my Surface (which is awesome) runs at FL 9.1), I expect there'll be quite the demand for feature level 9 expertise as well as clever ways of doing things with vertex and pixel shaders that are so very much easier with pixel shaders. Any idea whether the chipset(s) for WP8 phones support multithreaded rendering (i.e. deferred contexts, command lists, etc.)? Command lists might lead to some nice optimizations if they are supported.

  • > Any idea whether the chipset(s) for WP8 phones support multithreaded rendering (i.e. deferred contexts, command lists, etc.)?

    Windows Phone 8 has pretty much exactly the same feature level 9.3 capabilities as Windows, so deferred contexts are not supported.

  • Congratulations - this looks rich with possibility :)

  • For more context on Feature Levels, see blogs.msdn.com/.../direct3d-feature-levels.aspx

  • ... And MonoGame on Windows Phone 8 is a reality! XNA lives on.

  • No Geometry Shader and No Direct Compute. Ah, could have been another level :(

Page 1 of 1 (14 items)
Leave a Comment
  • Please add 4 and 6 and type the answer here:
  • Post