1
votes

I am developing a 3D game for Windows Store (Metro application) using Visual Studio 2012 Express and Blender for creating 3D objects (fbx). I have used Visual Studio 3D Starter Kit for importing fbx file in the game. Currently I have tested my application on Windows 8 machine only and now, I want to test it on Windows RT device too. On Microsoft forums I read that if I want to deploy the build on Windows RT device, I need to limit my application to Feature Level 9_1.

I need to know the following two things:

• How to run the application on hardware graphics card on Windows RT machine?

• How to limit the application to DirectX Feature Level 9_1?

Any help will be appreciated.

3
Consider using xna, as it is easy to use and learn, this may help [link]blogs.msdn.com/b/tarawalker/archive/2012/12/04/… - Shivam cv
Thanks for the reply Shivam. I have almost completed 60% of my application and I have developed it using DirectX (without any framework). At this point of time, it would be really difficult for me to shift to XNA framework. My application is running fine on Windows 8 but it is lagging on Windows RT. Therefore, according to my research I found out that I need to limit the application to Feature Level 9_1 but I couldn't find how to do so. It would be really helpful if you could suggest me a solution related to this. - Devendra Dariya
You can't limit the feature level. The feature level is a parameter passed to device creation. If you specify the appropriate level, your software can run on WinRT devices. - Nico Schertler
The Visual Studio Shader Designer (DGSL) creates shaders that only work on Feature Level 10+. There is a workaround to basically export the HLSL source (Export to HLSL...), then manually try to build it for 9.x feature levels likely requiring manual edits. This makes using the DGSL pipeline challenging for the Surface RT (FL 9.1) or the Windows phone 8.x (FL 9.3), but doable. The VS Starter Kit and the DirectX Tool Kit support some name trickery here to get the "right" DGSL shader loaded for VS content pipeline exported models (looking for a .CSO rather than .DGSL.CSO on FL 9.x). - Chuck Walbourn

3 Answers

2
votes

How to run the application on hardware graphics card on Windows RT machine?

The Direct3D code provided in the various Windows 8 samples and templates should always run on the hardware graphics card. Assuming you're interested in the specifics of how to actually get the app there in the first place (i.e. deployment), there are two main ways to do this. The first is remote deployment and debugging: In Visual Studio, go to your project's properties page and go to the Debugging view. Under "Debugger to launch" select "Remote Machine" and set "Machine Name" to the IP address or NetBIOS name of the target Windows RT machine. The remote machine will need to be running the remote debugging tools and connected to the same network as the development machine. For more info about remote debugging, check out this page.

The second way is to manually create and deploy a local test package. To do this, right click the project and go to Store -> Create App Packages. When prompted about whether this package will be submitted to the store, select "no" and follow the remaining prompts to create an appropriate app package. Copy the contents of the created package folder to the target machine, then run the "Add-*" powershell script. This will install the package on the target machine.

How to limit the application to DirectX Feature Level 9_1?

The best way to do this is to use the DirectX Control Panel. Run "dxcpl.exe" and click "Edit List" under the scope menu. Add the name of your app's executable (typically [app name].exe) to the list. Then, under Device Settings, set "Feature level limit" to 9.1 and check the "Disable Feature Level Upgrade" checkbox. The next time you launch your app, the system will automatically restrict functionality to what is available on 9.1 hardware.

Note that the Windows App Certification Kit automatically performs a feature level test to ensure your app does not crash on 9.1, however its scope is relatively limited.

1
votes

In additional to alanw, if you have any shaders in your solution, for each, bring up the property page in VS, expand "HLSL Compiler" and select "General". Under "Shader Model" select 4_0_level_9_1.

0
votes

You should pass in the D3D_FEATURE_LEVEL_9_1 feature level on creation of your d3d11 device.

D3D_FEATURE_LEVEL pFeatureLevels[] =
{
    D3D_FEATURE_LEVEL_9_1
};

ID3D11Device* pDevice;
ID3D11DeviceContext* pDeviceContext;
D3D_FEATURE_LEVEL eFeatureLevel;

D3D11CreateDevice(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, pFeatureLevels, 1,
     D3D11_SDK_VERSION, &pDevice, &eFeatureLevel, &pDeviceContext);