IPixGpuCaptureAnalysis::GetTextureBytesFromResource method

Read the raw bytes of a captured D3D12 texture resource at a specific GPU event.

Syntax

HRESULT GetTextureBytesFromResource(
    IPixD3D12Resource * resource,
    const PIX_EVENT_INFO * eventInfo,
    const PIX_GET_TEXTURE_BYTES_PARAMETERS * getTextureBytesParameters,
    REFIID riid,
    void ** outputBytes);

Parameters

resource [in]

A D3D12 texture resource owned by this analysis instance.

eventInfo [in]

The GPU event identifying the point in the capture's timeline to read the bytes at.

getTextureBytesParameters [in]

Optional read parameters. When null, reads after the event without resetting playback first and requests all subresources.

riid [in]

The interface IID of the object to be returned. Expected: IPixTexture when requesting all subresources. IPixTextureSubresource when requesting a specific subresource.

outputBytes [out]

Receives a newly created IPixTexture or IPixTextureSubresource containing the requested texture data and hands to the caller.

Returns

S_OK on success. E_POINTER if resource or eventInfo is null. E_NOINTERFACE when riid is not the expected interface. E_INVALIDARG if the resource, event, or subresource selection is invalid. E_NOTIMPL when the texture's format or sampling mode is not yet supported for readback. E_PIX_ANALYSIS_NOT_RUNNING if analysis is not running.

Remarks

Warning

resource must be a PIX-created resource for this analysis instance; passing a non-PIX resource returns E_INVALIDARG.

See also