Sets shader user data for the Pixel shader.
public:
void PSSetShaderUserData(
UINT StartSlot,
UINT NumRegisters,
const UINT *pData
)
StartSlot
Type: UINT
[in] The starting shader user data register slot to set (ranges from 0 to 15).
The hardware supports up to 16 shader user data inputs. The first two shader user data inputs (0 and 1) are used by the Xbox Shader ABI for Hull, Domain, Geometry, Pixel, and Compute shader stages. The first four shader user data inputs (0, 1, 2, and 3) are used by the Vertex Shader stage. For most usage scenarios, you will want to pick registers which do not conflict with the registers that are already in use by the Xbox Shader ABI. Registers 4-15 are a safe choice.
NumRegisters
Type: UINT
[in] The number of shader user data registers to set (ranges from 1 to (16 – StartSlot)).
pData
Type: UINT *
[in] An array of the data to set.
The shader user data can be read using the __XB_GetShaderUserData HLSL intrinsic.
ID3D11DeviceContextX::VSSetShaderUserData and ID3D11DeviceContextX::DSSetShaderUserData must be called after all of the shaders have been set for the draw. The reason for this requirement is that the hardware stage used to implement vertex and domain shader stages is determined based upon the presence or absence of a hull and geometry shader.
Header: Declared in d3d11_x.h.
Library: Use d3d11_x.lib.