D3D11 timestamp query as a fence

Started by
0 comments, last by pcmaster 1 year, 10 months ago

Hi all,

after good 12 years with D3D11, I still get surprised.

1. ctx.End(query1) // type D3D11_QUERY_TIMESTAMP

2. ctx.CopyResource(gpuVisible -> cpuVisible)

3. ctx.End(query2) // type D3D11_QUERY_TIMESTAMP

...laterrrr...

5. if (S_OK == ctx.GetData(query2, ..., D3D11_ASYNC_GETDATA_DONOTFLUSH))

6. ctx.Map(cpuVisible, ..., D3D11_MAP_READ, D3D11_MAP_FLAG_DO_NOT_WAIT)

Very rarely it happens that query2 on line 5 is done and its results are available, but the Map immediately after it isn't ready yet and returns DXGI_ERROR_WAS_STILL_DRAWING.

But only very occasionally, usually with RenderDoc. Under normal circumstances the Map succeeds, when the query is done.

Is this even possible? Thanks for a brainstorming, before suggesting ID3D11Fence :)

.P

Advertisement

This topic is closed to new replies.

Advertisement