ID3D11DeviceContext::Begin: Begin is being invoked on a Query, where the previous results have not been obtained with GetData

Started by
-1 comments, last by Asesh 13 years ago
This is what I did to retrieve the pipeline stats when rendering a small cube:


// Pipeline statistics query
oD3DQueryDesc.Query = D3D11_QUERY_PIPELINE_STATISTICS;
CHECK_COM(m_pD3DDevice->CreateQuery(&oD3DQueryDesc, &m_pD3DPipelineStatsQuery));

and before rendering that cube I called Begin: m_pD3DImmDevContext->Begin(m_pD3DPipelineStatsQuery); and after rendering I called End and GetData to retrieve the result:

m_pD3DImmDevContext->End(m_pD3DPipelineStatsQuery);

if(FAILED(m_pD3DImmDevContext->GetData(m_pD3DPipelineStatsQuery, reinterpret_cast<void *>(&m_oD3DQueryDataPipelineStats), sizeof(D3D11_QUERY_DATA_PIPELINE_STATISTICS), 0)))
return NULL;

but all the attributes of m_oD3DQueryDataPipelineStats are 0 and GetData returns S_FALSE and this is D3D message in debug window:
D3D11: WARNING: ID3D11DeviceContext::Begin: Begin is being invoked on a Query, where the previous results have not been obtained with GetData. This is valid; but unusual. The previous results are being abandoned, and new Query results will be generated. [ EXECUTION WARNING #408: QUERY_BEGIN_ABANDONING_PREVIOUS_RESULTS ]

Though I did call End before calling Begin again and BTW I did use immediate context to do so. Anything wrong?

This topic is closed to new replies.

Advertisement