Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

D3DXGetPixelShaderProfile function

Returns the name of the highest high-level shader language (HLSL) profile supported by a given device.

Syntax


LPCSTR D3DXGetPixelShaderProfile(
  _In_  LPDIRECT3DDEVICE9 pDevice
);

Parameters

pDevice [in]

Type: LPDIRECT3DDEVICE9

Pointer to the device. See IDirect3DDevice9.

Return value

Type: LPCSTR

The HLSL profile name.

If the device does not support pixel shaders then the function returns NULL.

Remarks

A shader profile specifies the assembly shader version to use and the capabilities available to the HLSL compiler when compiling a shader. The following table lists the pixel shader profiles that are supported.

Shader ProfileDescription
ps_1_1Compile to ps_1_1 version.
ps_1_2Compile to ps_1_2 version.
ps_1_3Compile to ps_1_3 version.
ps_1_4Compile to ps_1_4 version.
ps_2_0Compile to ps_2_0 version.
ps_2_aSame as the ps_2_0 profile, with the following additional capabilities available for the compiler to target:
  • Number of Temporary Registers (r#) is greater than or equal to 22.
  • Arbitrary source swizzle.
  • Gradient instructions: dsx, dsy.
  • Predication.
  • No dependent texture read limit.
  • No limit for the number of texture instructions.
ps_2_bSame as the ps_2_0 profile, with the following additional capabilities available for the compiler to target:
  • Number of Temporary Registers (r#) is greater than or equal to 32.
  • No limit for the number of texture instructions.
ps_3_0Compile to ps_3_0 version.

 

For more information about the differences between shader versions, see Pixel Shader Differences.

Requirements

Header

D3DX9Shader.h

Library

D3dx9.lib

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.