|
@@ -11,7 +11,7 @@
|
|
|
namespace bgfx
|
|
namespace bgfx
|
|
|
{
|
|
{
|
|
|
pRENDERDOC_GetAPI RENDERDOC_GetAPI;
|
|
pRENDERDOC_GetAPI RENDERDOC_GetAPI;
|
|
|
- static RENDERDOC_API_1_1_2* s_renderDoc = NULL;
|
|
|
|
|
|
|
+ static RENDERDOC_API_1_6_0* s_renderDoc = NULL;
|
|
|
static void* s_renderDocDll = NULL;
|
|
static void* s_renderDocDll = NULL;
|
|
|
|
|
|
|
|
void* loadRenderDoc()
|
|
void* loadRenderDoc()
|
|
@@ -27,18 +27,25 @@ namespace bgfx
|
|
|
return NULL;
|
|
return NULL;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // If RenderDoc is already injected in the process then use the already present DLL
|
|
|
|
|
- void* renderDocDll = findModule("renderdoc.dll");
|
|
|
|
|
- if (NULL == renderDocDll)
|
|
|
|
|
- {
|
|
|
|
|
- // TODO: try common installation paths before looking in current directory
|
|
|
|
|
- renderDocDll = bx::dlopen(
|
|
|
|
|
|
|
+ const char* renderDocDllName =
|
|
|
#if BX_PLATFORM_WINDOWS
|
|
#if BX_PLATFORM_WINDOWS
|
|
|
- "renderdoc.dll"
|
|
|
|
|
|
|
+ "renderdoc.dll"
|
|
|
#else
|
|
#else
|
|
|
- "./librenderdoc.so"
|
|
|
|
|
|
|
+ "librenderdoc.so"
|
|
|
#endif // BX_PLATFORM_WINDOWS
|
|
#endif // BX_PLATFORM_WINDOWS
|
|
|
- );
|
|
|
|
|
|
|
+ ;
|
|
|
|
|
+
|
|
|
|
|
+ // If RenderDoc is already injected in the process then use the already present DLL
|
|
|
|
|
+ void* renderDocDll = findModule(renderDocDllName);
|
|
|
|
|
+
|
|
|
|
|
+ if (NULL == renderDocDll)
|
|
|
|
|
+ {
|
|
|
|
|
+ BX_TRACE("Loading RenderDoc...");
|
|
|
|
|
+ renderDocDll = bx::dlopen(renderDocDllName);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ BX_TRACE("RenderDoc is already loaded.");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (NULL != renderDocDll)
|
|
if (NULL != renderDocDll)
|
|
@@ -46,7 +53,7 @@ namespace bgfx
|
|
|
RENDERDOC_GetAPI = (pRENDERDOC_GetAPI)bx::dlsym(renderDocDll, "RENDERDOC_GetAPI");
|
|
RENDERDOC_GetAPI = (pRENDERDOC_GetAPI)bx::dlsym(renderDocDll, "RENDERDOC_GetAPI");
|
|
|
|
|
|
|
|
if (NULL != RENDERDOC_GetAPI
|
|
if (NULL != RENDERDOC_GetAPI
|
|
|
- && 1 == RENDERDOC_GetAPI(eRENDERDOC_API_Version_1_1_2, (void**)&s_renderDoc) )
|
|
|
|
|
|
|
+ && 1 == RENDERDOC_GetAPI(eRENDERDOC_API_Version_1_6_0, (void**)&s_renderDoc) )
|
|
|
{
|
|
{
|
|
|
s_renderDoc->SetCaptureFilePathTemplate(BGFX_CONFIG_RENDERDOC_LOG_FILEPATH);
|
|
s_renderDoc->SetCaptureFilePathTemplate(BGFX_CONFIG_RENDERDOC_LOG_FILEPATH);
|
|
|
|
|
|
|
@@ -55,8 +62,8 @@ namespace bgfx
|
|
|
RENDERDOC_InputButton captureKeys[] = BGFX_CONFIG_RENDERDOC_CAPTURE_KEYS;
|
|
RENDERDOC_InputButton captureKeys[] = BGFX_CONFIG_RENDERDOC_CAPTURE_KEYS;
|
|
|
s_renderDoc->SetCaptureKeys(captureKeys, BX_COUNTOF(captureKeys) );
|
|
s_renderDoc->SetCaptureKeys(captureKeys, BX_COUNTOF(captureKeys) );
|
|
|
|
|
|
|
|
- s_renderDoc->SetCaptureOptionU32(eRENDERDOC_Option_AllowVSync, 1);
|
|
|
|
|
- s_renderDoc->SetCaptureOptionU32(eRENDERDOC_Option_SaveAllInitials, 1);
|
|
|
|
|
|
|
+ s_renderDoc->SetCaptureOptionU32(eRENDERDOC_Option_AllowVSync, 1);
|
|
|
|
|
+ s_renderDoc->SetCaptureOptionU32(eRENDERDOC_Option_APIValidation, 1);
|
|
|
|
|
|
|
|
s_renderDoc->MaskOverlayBits(eRENDERDOC_Overlay_None, eRENDERDOC_Overlay_None);
|
|
s_renderDoc->MaskOverlayBits(eRENDERDOC_Overlay_None, eRENDERDOC_Overlay_None);
|
|
|
|
|
|