Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Read the raw bytes of a buffer-backed resource view at a specific GPU event.
Syntax
HRESULT GetBufferBytesFromResourceView(
IPixResourceView * resourceView,
const PIX_EVENT_INFO * eventInfo,
const PIX_GET_BUFFER_BYTES_PARAMETERS * getBufferBytesParameters,
REFIID riid,
void ** outputBytes);
Parameters
resourceView [in]
The resource view describing what bytes to return. To get the resource view from the capture document: Call GetProgramState(event) to get IPixProgramState at the chosen event, then GetGpuProgram() for the IPixGenericPipeline, then GetResourceViews() for the IPixResourceViewsAtEvent, then GetView(index) for the IPixResourceView.
eventInfo [in]
The GPU event identifying the point in the capture's timeline to read the bytes at. Obtain the event from the capture document's queues via GetQueues and IPixGpuCaptureQueueInfo::GetEvent. It identifies the same point in the timeline used to fetch the resource view.
getBufferBytesParameters [in]
Read parameters (bytes before vs. after the event, and whether to force a re-read). Optional; when null, defaults are used (bytes as they were immediately after the event, without forcing a re-read).
riid [in]
The interface IID of the object to be returned. Expected: IPixBlob
outputBytes [out]
Receives a newly created IPixBlob that this method allocates and hands to the caller. The blob covers the complete view window into the resource (view offset + view size).
Returns
S_OK on success. E_POINTER if resourceView or eventInfo is null. E_NOINTERFACE if riid is not IID_IPixBlob. E_INVALIDARG for an ineligible view type, a caller-implemented or foreign-document view, an unknown event, or an event without a parent command list. E_PIX_ANALYSIS_NOT_RUNNING if analysis is not currently running. E_PIX_BUFFER_VIEW_SIZEINBYTES_IS_ZERO if resourceView is a vertex buffer, index buffer, stream output or constant buffer view whose SizeInBytes was zero, which addresses no bytes to return.
Remarks
Warning
resourceView must be a buffer-eligible view; passing a non-buffer view returns E_INVALIDARG.
Warning
resourceView must be a PIX-created view for this analysis instance; passing a non-PIX view returns E_INVALIDARG.