1

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.

  • Consider using xna, as it is easy to use and learn, this may help [link]http://blogs.msdn.com/b/tarawalker/archive/2012/12/04/windows-8-game-development-using-c-xna-and-monogame-3-0-building-a-shooter-game-walkthrough-part-1-overview-installation-monogame-3-0-project-creation.aspx – Shivam cv Jun 22 '13 at 13:54
  • 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 Jun 24 '13 at 04:45
  • 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 Jun 24 '13 at 12:10
  • 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 Aug 13 '14 at 18:44

3 Answers3

2

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.

MooseBoys
  • 6,641
  • 1
  • 19
  • 43
  • note: don't use the "DirectX Control Panel " options that may show up in your start menu/screen when typing "dxcp" in search. This won't give you the option to limit the feature level and will be really annoying! Use dxcp.exe from the command line! – A.R. Aug 20 '15 at 02:46
1

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.

Justin R.
  • 23,435
  • 23
  • 108
  • 157
0

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);
alanw
  • 645
  • 6
  • 10
  • Note that while this will work, a more robust solution for a production application is to list 9.1 and 10.0 since there are significant performance benefits to using 10.0 or later when available. Just listing 9.1 can be a useful mode for debugging purposes of course. You should review this [blog post](http://blogs.msdn.com/b/chuckw/archive/2012/06/20/direct3d-feature-levels.aspx) as well for a better understanding of Direct3D hardware feature levels. – Chuck Walbourn Jul 16 '14 at 07:35
  • I understand your point, but the OP clearly understands that he is restricted to a particular feature level. – alanw Aug 13 '14 at 06:06
  • If the OP's code includes either a null pFeatureLevels or the array contains more than FL 9.1, then you end up with a device that is the 'highest possible' feature level. By only providing the 9.1 option, it will only succeed as a FL 9.1. This isn't 100% accurate emulation (things like the texture size bounds are 'minimums' so some cards will let you create a larger texture even in FL 9.1.), but it's more likely to get error codes and Debug output when you use 'higher feature' level API aspects than testing against a FL 10.0+ device for development. – Chuck Walbourn Aug 13 '14 at 18:42