From d35c14164b4e71e8772aa4bd09e16bd4a952f50e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sat, 27 Sep 2014 14:15:56 -0700 Subject: [PATCH] Updated README. --- README.md | 16 +++++++++++++--- src/renderer_d3d9.cpp | 13 +++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a1a01d07..c05141e3 100644 --- a/README.md +++ b/README.md @@ -411,10 +411,22 @@ build errors. Debugging --------- +### RenderDoc + When using DX11 renderer, you can drop in `renderdoc.dll` into working directory, and it will be automatically loaded during bgfx initialization. This allows frame capture at any time by pressing **F11**. +Download: [RenderDoc](https://renderdoc.org/builds) + +### IntelGPA + +Right click **Intel GPA Monitor** tray icon, choose preferences, check +"Auto-detect launched applications" option. Find `InjectionList.txt` in GPA +directory and add `examples-*` to the list. + +Download: [IntelGPA](https://software.intel.com/en-us/vcsource/tools/intel-gpa) + Other debuggers: | Name | OS | DX9 | DX11 | GL | GLES | Source | @@ -424,11 +436,9 @@ Other debuggers: | IntelGPA | Linux/OSX/Win | x | x | | x | | | RenderDoc | Win | | x | | | x | +Download: [APITrace](https://apitrace.github.io/) [CodeXL](http://developer.amd.com/tools-and-sdks/opencl-zone/codexl/) -[IntelGPA](https://software.intel.com/en-us/vcsource/tools/intel-gpa) -[RenderDoc](http://cryengine.com/renderdoc) - SDL, GLFW, etc. --------------- diff --git a/src/renderer_d3d9.cpp b/src/renderer_d3d9.cpp index 7ecf1ac8..bfa94017 100644 --- a/src/renderer_d3d9.cpp +++ b/src/renderer_d3d9.cpp @@ -533,6 +533,19 @@ namespace bgfx m_fmtDepth = D3DFMT_D24FS8; #endif // BX_PLATFORM_WINDOWS + { + IDirect3DSwapChain9* swapChain; + DX_CHECK(m_device->GetSwapChain(0, &swapChain) ); + + // GPA increases swapchain ref count. + // + // This causes assert in debug. When debugger is present refcount + // checks are off. + setGraphicsDebuggerPresent(1 != getRefCount(swapChain) ); + + DX_RELEASE(swapChain, 0); + } + postReset(); m_initialized = true;