IPixShaderWave::GetShader method

Gets a shader interface object.

Syntax

HRESULT GetShader(
    IPixBlob * pShaderObject,
    IPixBlob * pShaderPdb,
    REFIID riid,
    void ** ppShader);

Parameters

pShaderObject [in]

Optional shader object bytecode generated by DXC. If provided, the hash digest of the shader object will be validated against the hash digest of the shader being executed by the shader wave, if they don't match, this function will return E_FAIL. If the hash digest of the shader object is zero, BYPASS, or PREVIEW_BYPASS, the hash digest will be recomputed and validated against the hash digest of the executing shader.

pShaderPdb [in]

Optional shader PDB, if the shader was generated with DXC, and the shader object and a PDB is provided, the PDB will be validated against PDB hash stored in the shader object, if they don't match, this function will return E_FAIL. If the shader PDB is provided the shader object must also be provided, otherwise this function will return E_FAIL. If the shader object is provided and was compiled with embedded debug information, the shader PDB does not need to be provided.

riid [in]

The interface IID of the object to be returned. Expected: IPixShader

ppShader [out]

The pointer to the returned interface

Returns

S_OK on success, otherwise an error code.

See also