locked
error X3506: unrecognized compiler target 'gs_4_0_level_9_3'

    Question

  • I add a geometry shader hlsl file to the project but this leads to a new build error:

    error X3506: unrecognized compiler target 'gs_4_0_level_9_3'

    There are a couple of other shader files in the project and none of them trigger build error. The shader model of all hlsl files is Shader Model 4 Level 9_3 (/4_0_level_9_3).

    Monday, December 17, 2012 2:50 AM

Answers

  • There is no such thing as a "gs_4_0_level_9_3" profile.

    You cannot make use of a Geometry Shader on Feature Levels 9.1, 9.2, or 9.3. Geometry Shader requires Feature Level 10.0, 10.1, 11.0, or 11.1.

    Similarly, Domain & Hull Shaders require Feature Level 11.0 and 11.1.

    See

    http://blogs.msdn.com/b/chuckw/archive/2012/06/20/direct3d-feature-levels.aspx

    Monday, December 17, 2012 9:04 PM
  • You have three basic choices when dealing with this scenario:

    (1) Your Windows Store application is written to only use Feature Level 9.1.  This is probably sufficient for many applications, but this is rather limiting if you are trying to create a rich graphics experience such as those in games. This supports the broadest possible set of devices.

    See http://blogs.msdn.com/b/chuckw/archive/2012/06/20/direct3d-feature-levels.aspx

    (2) You write your graphics system to scale across Feature Levels. For example, you could support Feature Level 9.1 and Feature Level 10.0 in your application. You would have many shaders compile using vs/ps_4_0_level_9_1 profiles and use them in all versions. Some effects would require Shader Model 4.0 (i.e. a Geometry Shader based effect), and you would have to write a fallback solution that worked on Feature Level 9.1 (i.e. a version of the same graphical effect that doesn't use Geometry Shader). This would require multiple versions of some shaders and likely multiple versions of the rendering code based on the available feature level. This can become quite complex, but gives customers the best experience based on their hardware.

    See http://msdn.microsoft.com/en-us/library/windows/apps/hh994923.aspx and http://www.microsoft.com/en-us/download/details.aspx?id=29200

    (3) You write your application to require Feature Level 10.0 and compile all your shaders for Shader Model 4.0. According to the Windows Store app requirements, you are free to list a minimum Feature Level higher than 9.1 as a requirement for your application, however your application must have a special error message mode that runs if you are only able to create a Feature Level 9.1 device that says something like "This application requires Feature Level 10.0". Note that such Windows Store apps must x86 and/or x64. Option #1 and #2 are the only choice for a Windows Store app that supports ARM (Windows RT).

    See http://msdn.microsoft.com/en-us/library/windows/apps/jj552948.aspx





    Monday, December 17, 2012 11:18 PM

All replies

  • There is no such thing as a "gs_4_0_level_9_3" profile.

    You cannot make use of a Geometry Shader on Feature Levels 9.1, 9.2, or 9.3. Geometry Shader requires Feature Level 10.0, 10.1, 11.0, or 11.1.

    Similarly, Domain & Hull Shaders require Feature Level 11.0 and 11.1.

    See

    http://blogs.msdn.com/b/chuckw/archive/2012/06/20/direct3d-feature-levels.aspx

    Monday, December 17, 2012 9:04 PM
  • Thanks Chuck.

    If I change the shader model to "Shader Model 4" in custom build rule for this GS hlsl file, the build will succeed. But this change results in a serious aftermath: my app fails to pass the WACK test due to lack of support for Direct3D 9 feature level and fails to start on this level. As the only change to my app since last WACK test success is the introduction of a GS hlsl file, I think the use of GS hlsl file is the cause for WACK failure. So how can I solve this issue?

    Monday, December 17, 2012 10:53 PM
  • You have three basic choices when dealing with this scenario:

    (1) Your Windows Store application is written to only use Feature Level 9.1.  This is probably sufficient for many applications, but this is rather limiting if you are trying to create a rich graphics experience such as those in games. This supports the broadest possible set of devices.

    See http://blogs.msdn.com/b/chuckw/archive/2012/06/20/direct3d-feature-levels.aspx

    (2) You write your graphics system to scale across Feature Levels. For example, you could support Feature Level 9.1 and Feature Level 10.0 in your application. You would have many shaders compile using vs/ps_4_0_level_9_1 profiles and use them in all versions. Some effects would require Shader Model 4.0 (i.e. a Geometry Shader based effect), and you would have to write a fallback solution that worked on Feature Level 9.1 (i.e. a version of the same graphical effect that doesn't use Geometry Shader). This would require multiple versions of some shaders and likely multiple versions of the rendering code based on the available feature level. This can become quite complex, but gives customers the best experience based on their hardware.

    See http://msdn.microsoft.com/en-us/library/windows/apps/hh994923.aspx and http://www.microsoft.com/en-us/download/details.aspx?id=29200

    (3) You write your application to require Feature Level 10.0 and compile all your shaders for Shader Model 4.0. According to the Windows Store app requirements, you are free to list a minimum Feature Level higher than 9.1 as a requirement for your application, however your application must have a special error message mode that runs if you are only able to create a Feature Level 9.1 device that says something like "This application requires Feature Level 10.0". Note that such Windows Store apps must x86 and/or x64. Option #1 and #2 are the only choice for a Windows Store app that supports ARM (Windows RT).

    See http://msdn.microsoft.com/en-us/library/windows/apps/jj552948.aspx





    Monday, December 17, 2012 11:18 PM
  • Thank you very much Chuck.

    I choose the second method, i.e. to apply GS conditionally based on the selected feature level, and happy to see my app passes the WACK test again.

    Tuesday, December 18, 2012 1:28 AM
  • I bought a surface RT yesterday and deployed my app on it. To my surprise, geometry shader is not support on it. I could not figure out why my code run at a lower feature level. Could you confirm that the graphics unit of Surface RT does not support D3D10 at hardware level?
    Monday, February 18, 2013 4:54 PM
  • Correct. The minimum DirectX feature level for Windows RT devices is 9.1. Your app should try for full functionality and degrade gracefully if that isn't available. 

    See Developing for different Direct3D feature levels

    --Rob

    Monday, February 18, 2013 8:20 PM
    Moderator
  • Thanks Rob, we've managed to scale the functionality based on the DirectX feature level that hardware supports. But I wonder why does Surface RT, as a signature win8 device, only support such a lower feature level. 
    Tuesday, February 19, 2013 12:16 AM
  • The Surface RT is not a Windows 8 device. It is a Windows RT device. By their nature, Windows RT devices have different hardware specs than Windows Pro devices. The ARM chips currently used in Windows RT devices support DX9 feature levels.

    The Surface Pro is a Windows 8 device. It uses an i5/HD4000 and supports DX11 feature levels.

    --Rob

    Tuesday, February 19, 2013 12:26 AM
    Moderator
  • I actually cover this in that Feature Levels blog post:

    This is an important topic for Windows Store apps (a.k.a. Metro style apps) as "DirectX 11" the API is required for these applications, but you will see potentially a wide range of feature levels on machines running Windows 8. See the GDC 2012 presentation Developing Metro Style Games on the Full Range of Windows 8 Devices. With the guidelines presented in the Windows 8 Hardware Certification Requirements document, most new desktop systems sold with Windows 8 will have Feature Level 10.0 or greater hardware--actually most gaming systems are likely to have Feature Level 11.0 or 11.1 even newer laptops with integrated graphics. For tablet form-factor systems, particularly those running Windows RT, most will be Feature Level 9.1 or Feature Level 9.3 at least in the near-term. To support any system running Windows 8 including upgraded machines, you have to support Feature Level 9.1 which may be sufficient for some kinds of applications but not others.

    Tuesday, February 19, 2013 8:38 PM