mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Detect nVidia Nsight debugger presence.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
namespace bgfx
|
||||
{
|
||||
void* findModule(const char* _name);
|
||||
void* loadRenderDoc();
|
||||
void unloadRenderDoc(void*);
|
||||
void renderDocTriggerCapture();
|
||||
|
||||
@@ -1009,6 +1009,11 @@ namespace bgfx { namespace d3d11
|
||||
}
|
||||
}
|
||||
|
||||
if (NULL != findModule("Nvda.Graphics.Interception.dll") )
|
||||
{
|
||||
setGraphicsDebuggerPresent(true);
|
||||
}
|
||||
|
||||
if (BGFX_PCI_ID_NVIDIA != m_dxgi.m_adapterDesc.VendorId)
|
||||
{
|
||||
m_nvapi.shutdown();
|
||||
|
||||
@@ -733,7 +733,11 @@ namespace bgfx { namespace d3d12
|
||||
m_renderDocDll = loadRenderDoc();
|
||||
}
|
||||
|
||||
setGraphicsDebuggerPresent(NULL != m_renderDocDll || NULL != m_winPixEvent);
|
||||
setGraphicsDebuggerPresent(false
|
||||
|| NULL != m_renderDocDll
|
||||
|| NULL != m_winPixEvent
|
||||
|| NULL != findModule("Nvda.Graphics.Interception.dll")
|
||||
);
|
||||
|
||||
m_fbh.idx = kInvalidHandle;
|
||||
bx::memSet(m_uniforms, 0, sizeof(m_uniforms) );
|
||||
|
||||
@@ -3168,7 +3168,10 @@ namespace bgfx { namespace gl
|
||||
|
||||
m_maxLabelLen = BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 32) || BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL >= 43) || s_extension[Extension::KHR_debug].m_supported ? uint16_t(glGet(GL_MAX_LABEL_LENGTH) ) : 0;
|
||||
|
||||
setGraphicsDebuggerPresent(s_extension[Extension::EXT_debug_tool].m_supported);
|
||||
setGraphicsDebuggerPresent(false
|
||||
|| s_extension[Extension::EXT_debug_tool].m_supported
|
||||
|| NULL != findModule("Nvda.Graphics.Interception.dll")
|
||||
);
|
||||
|
||||
if (NULL == glObjectLabel)
|
||||
{
|
||||
|
||||
@@ -1194,7 +1194,10 @@ VK_IMPORT_DEVICE
|
||||
m_renderDocDll = loadRenderDoc();
|
||||
}
|
||||
|
||||
setGraphicsDebuggerPresent(NULL != m_renderDocDll);
|
||||
setGraphicsDebuggerPresent(false
|
||||
|| NULL != m_renderDocDll
|
||||
|| NULL != findModule("Nvda.Graphics.Interception.dll")
|
||||
);
|
||||
|
||||
m_vulkan1Dll = bx::dlopen(
|
||||
#if BX_PLATFORM_WINDOWS
|
||||
|
||||
Reference in New Issue
Block a user