0

I successfully recorded a DX11 diag session once. When running it the second and any further time, when I click on a frame I get this error:

An error occured. Playback of your application may be incomplete. (HRESULT = 0x00630000) "Unknown error (0x00630000)"

I capture frames programmatically, using the code shown here in Microsoft Docs. It worked before with other shaders as well as the one I'm debugging now.

I have a RAII class for the debugging:

class GPUBlock
{
public:
  GPUBlock() : _startResult(DXGIGetDebugInterface1(0, __uuidof(_directXAnalysis), reinterpret_cast<void**>(&_directXAnalysis)))
  {
    if (debugInitialized())
      _directXAnalysis->BeginCapture();
  }

  ~GPUBlock()
  {
    if (debugInitialized())
      _directXAnalysis->EndCapture();
  }

  bool debugInitialized() const { return _directXAnalysis && !FAILED(_startResult); }
private:
  IDXGraphicsAnalysis* _directXAnalysis = nullptr;
  HRESULT _startResult = OLE_E_BLANK;
};

Used as:

{
    Debug::GPUBlock debugGPUplease;
    DoGPUWork();
}
Tomáš Zato
  • 50,171
  • 52
  • 268
  • 778

1 Answers1

1

Turns out you must click the "Stop collection" button. If you end the debugging this way, the logs will work just fine.

enter image description here

It is not clear why it worked without it before, but it was probably luck and not normal behaviour.

Also, this error will happen if BeginCapture() and EndCapture() are called at inappropriate moments. You can't just place them wherever! You need to capture the entirety of the GPU operation, including the setup.

Tomáš Zato
  • 50,171
  • 52
  • 268
  • 778
  • Hi Tomas, thanks for sharing your solution and you can consider marking it as answer. SO that other members with similar issue could easily find your workaround. Thx:) – LoLance Jun 20 '19 at 10:14