DX11 user annotations on deferred context are broken

Hello,

I am having a problem with my renderer. User markers are not displayed correctly in Nsight 2019.3 graphics debugger when using deferred contexts with DirectX 11 API. I am talking about ID3DUserDefinedAnnotation::BeginEvent() and EndEvent(), providing a string from the application for a specific range in the command list to help debugging. These work correctly for me if I use an immediate context from a single threaded application. They also seem to work correctly in RenderDoc. I am creating one user defined annotation object for every deferred context like this:

HRESULT hr = device->CreateDeferredContext(0, &deviceContexts[cmd]);
		assert(SUCCEEDED(hr));

		hr = deviceContexts[cmd]->QueryInterface(__uuidof(userDefinedAnnotations[cmd]),
			reinterpret_cast<void**>(&userDefinedAnnotations[cmd]));
		assert(SUCCEEDED(hr));

I have tried with Nvidia GTX 1050 laptop GPU.
The project is hosted on GitHub as a visual studio solution: https://github.com/turanszkij/WickedEngine
There is also a direct download for a Windows 10 build here: https://ci.appveyor.com/api/projects/turanszkij/wickedengine/artifacts/WickedEngineEditor.zip?branch=master
Let me know if you need more information.

Kind regards,
Janos

I also uploaded a serialized C++ frame capture to Mediafire that shows corrupt user markers: http://www.mediafire.com/file/4hs3qyp8193l52p/Editor__2019_07_04__11_11_25.zip/file

Hi Janos,

Unfortunately, D3D11 differed contexts are not officially supported. We don’t prevent users from using the tool when we detect a deffered context, but this looks like a bug in our perfmarker implementation.

Regardless, I’ll add a bug in the backlog and bring it up with the development team!

Thanks,
Seth
DG-5700