You need to specify the shader target — set of shader features — to compile against when you call the D3DCompile, D3DCompile2, or D3DCompileFromFile function. Here we list the targets for various profiles that the D3DCompile* functions and the HLSL compiler support.
Here are the shader targets that Direct3D 9.1, 9.2 and 9.3 feature levels support.
Note
When you use the *_4_0_level_9_x HLSL shader profiles, you implicitly use of the Shader Model 2.x profiles to support Direct3D 9 capable hardware. Shader Model 2.x profiles support more limited flow control behavior than the Shader Model 4.x and later profiles.
Target
Description
ps_4_0_level_9_1
Pixel shader for 9.1 and 9.2 (similar limits to ps_2_0)
64 arithmetic and 32 texture instructions
12 temporary registers
4 levels of dependent reads
ps_4_0_level_9_3
Pixel shader for 9.3 (similar limits to ps_2_x² with additional shader features)
feature level 9.3 effectively requires hardware that complies with the requirements for legacy Direct3D 9 shader model 3.0, but this feature level does not make use of vs_3_0 or ps_3_0 targets.
Only use legacy Direct3D 9 shader models with the Direct3D 9 API. Instead, use the 9.x profiles with the Direct3D 10.x and 11.x API.
The current HLSL shader D3DCompile* functions don't support legacy 1.x pixel shaders. The last version of HLSL to support these targets was D3DX9 in the October 2006 release of the DirectX SDK.
All versions of D3DX and the DirectX SDK are deprecated. For more info, see Where is the DirectX SDK?.
Azure HPC is a purpose-built cloud capability for HPC & AI workload, using leading-edge processors and HPC-class InfiniBand interconnect, to deliver the best application performance, scalability, and value. Azure HPC enables users to unlock innovation, productivity, and business agility, through a highly available range of HPC & AI technologies that can be dynamically allocated as your business and technical needs change. This learning path is a series of modules that help you get started on Azure HPC - you