VS2013 Graphics Diagnostics problem

Started by
7 comments, last by backstep 9 years, 9 months ago

I'm having a problem with Visual Studio 2013's Graphics Diagnostics feature with C++ win32 desktop projects, and I'm hoping someone won't mind quickly testing this. I'm not sure if it's a problem with my environment/install or a bug in VS, and searching the internet for the error message I'm receiving isn't giving me any results.

Background

The short of it is that I was doing some GUI work on my project, and it's rendered last after all the other passes. I had an issue where one of the GUI draw submissions wasn't outputting anything at all, so I started the app with ALT-F5 for Graphics Diagnostics and hit printscreen for a frame capture. The idea being I could check the Graphics Pipeline Stages tab for that draw call and see where the problem was with that call. However when I clicked the relevant draw command in the Event List tab, the Pipeline Stages tab simply read "The selected event has no effect or may have been occluded." instead of showing the usual pipeline stages for that draw as seen here - http://msdn.microsoft.com/en-us/library/hh873194.aspx

Must be a really broken draw call right? But if I clicked an earlier draw call whose output I can see in the final frame, it still read "The selected event has no effect or may have been occluded." in the Graphics Pipeline Stages tab, even though I was looking at it's output right there in the captured frame.

So as it turns out, none of my draw calls show up in the graphics pipeline tab, in fact, the only thing that would show there are my compute shader dispatches. Disabling the dispatches wouldn't fix the graphics pipeline stages tab for draw calls, but disabling all interaction with the CS stage across the entire frame will fix it. So I got to see my broken draw call was skipping the pixel shader entirely, and that the issue was in the IA or VS stages (ended up being a mismatched input layout to the vertex buffer).

The bug seems to be that any interaction with the compute stage of the pipeline prevents the Graphics Pipeline Stages tab from displaying the traditional pipeline view for any draw commands.

What to check

This is really simple to test if anyone has time and uses VS2013, just make some kind of interaction with the CS stage prior to a draw call and then ALT-F5 for diagnostics, printscreen to capture a frame, then right click a draw call in the Graphics Event List tab and choose Pipeline Stages. Post whether you see the IA/VS/PS/OM stages for the draw or the message "The selected event has no effect or may have been occluded.".

By any interaction i mean literally anything, for example simply setting a CS stage constant buffer to null during the frame, by placing the below code before a draw call:

ID3D11Buffer* noBuffer = NULL;
deviceContext->CSSetConstantBuffers(0, 1, &noBuffer);

Like I said I'm not sure at this point if it's a problem with my setup here or a bug I need to pass on to microsoft, and I'd really appreciate not having to make a clean install to find that out. So far it's reproducible on my system with any win32 desktop project, even a basic tutorial that renders a triangle.

You can also test it very easily with the hieroglyph3 BasicComputeShader project by simply building it without any edits and running Graphics Diagnostics (the included compute shader breaks the pipeline view for the final draw call, for me).

If you could include your OS and VS2013 update version that'd be great (in my case Windows 8.1 with VS2013 Update 2).

Advertisement

Windows 8.1 with VS2013 (no update).

I can confirm it is working for me for the scenario you mentioned, both when using the CSSetConstantBuffers call as you have posted and with something more complex with multiple CS dispatch calls.

Doesn't work if I am using multiple render targets (stalls on capturing the frame).

Justin Stenning | Blog | Book - Direct3D Rendering Cookbook (using C# and SharpDX)

Projects: Direct3D Hook, EasyHook, Shared Memory (IPC), SharpDisasm (x86/64 disassembler in C#)

@spazzarama

 

Hey, thanks for replying. It seems like it might be an issue with Update 2 specifically, since they made some change to Graphics Diagnostics to support MRTs and threadgroup debugging etc.

If anyone else is using VS2013 Update 2 and could post their result, thank you also.

I was planning on updating soonish anyway, if I get around to it over the weekend I'll let you know.

Justin Stenning | Blog | Book - Direct3D Rendering Cookbook (using C# and SharpDX)

Projects: Direct3D Hook, EasyHook, Shared Memory (IPC), SharpDisasm (x86/64 disassembler in C#)

@spazzarama

 

Just wanted to say I started seeing this behavior as well after Update 2. Before the update I had no issues with debugging and viewing the pipeline stages, now it always reads as an invalid event.

Thanks for replying with your experience of it, sorry for checking this a little late. I recently tried out the Update 3 RC which moved graphics diagnostics to a seperate window, and the problem remains (although some bugs like the draw call viewport descriptions are fixed). I'll go ahead and report it, hopefully it's in time for Update 3 proper.

Just wanted to say I started seeing this behavior as well after Update 2. Before the update I had no issues with debugging and viewing the pipeline stages, now it always reads as an invalid event.

Hey, if you happen to be subbed to this thread still, I sent you a PM a few days back asking for a bit more system info. Thanks. :)

If anyone else gets this issue, if you could include your GPU info along with the VS2013 version, that'd be great.

Just wanted to say I started seeing this behavior as well after Update 2. Before the update I had no issues with debugging and viewing the pipeline stages, now it always reads as an invalid event.

Hey, if you happen to be subbed to this thread still, I sent you a PM a few days back asking for a bit more system info. Thanks. smile.png

If anyone else gets this issue, if you could include your GPU info along with the VS2013 version, that'd be great.

Sent! Apologies on the delayed response.

No problem about the delay, thanks for the info on your GPU. I filed the bug with MS and they couldn't repro it on the non-nvidia hardware that they use, but they suggested the issue might be the driver not responding to D3D11 pipeline queries correctly.

With that in mind, they also suggested trying it with the app's device switched from D3D11_DRIVER_TYPE_HARDWARE to D3D11_DRIVER_TYPE_WARP before using Graphics Diagnostics, and as it turns out, with that the issue goes away and the pipeline view works fine in captured frames that also use compute. Of course it seriously increases the frametimes but it's a fairly usable workaround for debugging any compute-reliant draw calls that don't render as you expected.

Between the two of us it seems the 500 series (fermi) is definitely effected, no idea about the 600 cards (kepler) tho. Here's hoping nvidia's driver team get to look at MS's and/or my bug report on it, sometime before d3d12 arrives!

This topic is closed to new replies.

Advertisement