Answered by:

Windows Phone 8 DirectX Feature Set ?

Question

I began porting a Windows 8 app to Windows Phone 8 (which has some differences in implementation) and saw that despite having a DirectX11 video card I don't have the feature set 11_1 as this is not the latest generation of video cards so it doesn't have
11.1 support (It's a GTX 560 Ti). BUT on the Windows Phone 8 emulator I get the feature level 11_1 which is odd. Another oddity is the shaders from the samples are compiled on feature level 9_3 while on Windows 8 RT the minimum feature set required for apps
to run on all devices is 9_1. I'm now wondering if the minimum feature set found on a windows phone 8 device is 9_3 or 9_1 since I can't select any other shader target from the hlsl compiler settings.

I'd like someone that owns a Windows Phone 8 device to share the details on what feature set it supports as I haven't been able to google this kind of info anywhere.

Answers

If an app creates a Direct3D graphics device and requests a feature level higher than 9_3, the device will be successfully created on the emulator. However, when the app is run on the phone, it will not be able to create a Direct3D graphics device with a
feature level higher than 9_3, so some code that requires higher feature level functionality could work on the emulator but not work on a physical device. Because of this, be sure to test your D3D-specific code using a Windows Phone 8 device. Optionally, when
you create a new Direct3D project, modify Direct3DBase.cpp to remove all feature levels except 9_3 from the array of
D3D_FEATURE_LEVEL values supplied in the
pFeatureLevel parameter to the D3D11CreateDevice function. This will ensure that you always get a feature level 9_3 device, even
when running on the emulator."

Then why does the simulator give me a feature level 11_1 ? I know it "simulates" but going over my the feature set of my Desktop GPU seems like a slip from whoever wrote the emulator.

EDIT:

Because my code was made to run from feature level 9_1 to 11_0 I have some results in the simulator and then I suppose I will have different results on real devices because of the 9_3. This is kinda awkward :|

If an app creates a Direct3D graphics device and requests a feature level higher than 9_3, the device will be successfully created on the emulator. However, when the app is run on the phone, it will not be able to create a Direct3D graphics device with a
feature level higher than 9_3, so some code that requires higher feature level functionality could work on the emulator but not work on a physical device. Because of this, be sure to test your D3D-specific code using a Windows Phone 8 device. Optionally, when
you create a new Direct3D project, modify Direct3DBase.cpp to remove all feature levels except 9_3 from the array of
D3D_FEATURE_LEVEL values supplied in the
pFeatureLevel parameter to the D3D11CreateDevice function. This will ensure that you always get a feature level 9_3 device, even
when running on the emulator."

The emulator uses the WARP software rasterizer, which is a superset of all possible hardware and thus supports all Direct3D feature levels.

Higher D3D feature levels are strict supersets of lower ones, so if your app works with feature level 9.3 (which is has to in order to run on WP8 devices) you might as well always just request a 9.3 device.