diff options
author | Graham Madarasz <graham@lindenlab.com> | 2018-02-16 20:52:10 +0000 |
---|---|---|
committer | Graham Madarasz <graham@lindenlab.com> | 2018-02-16 20:52:10 +0000 |
commit | 5efc817d9a76fe0b169b831393d794fc2257261b (patch) | |
tree | 6bdfe387970573748d66453cbe466fe356501305 /indra/llrender | |
parent | b2f61c0e0b27b9c1dae33a85bfc4db6b3ce95dc0 (diff) | |
parent | caa60a57310a01041cca74be789935ae6135f4eb (diff) |
Merged in graham_linden/viewer-neko (pull request #525)
Fixes MAINT-8282 feature req (from me :) )
Add debug setting and code to allow nVidia nSight graphics debugging to capture SL frames.
Approved-by: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Approved-by: Andrey Lihatskiy <andreylproductengine@lindenlab.com>
Approved-by: Ruslan Teliuk <ruslantproductengine@lindenlab.com>
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llgl.cpp | 11 | ||||
-rw-r--r-- | indra/llrender/llrender.cpp | 1 | ||||
-rw-r--r-- | indra/llrender/llrender.h | 3 |
3 files changed, 14 insertions, 1 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 155c2402bd..35b6951779 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -1348,8 +1348,19 @@ void LLGLManager::initExtensions() if (mHasVertexShader) { LL_INFOS() << "initExtensions() VertexShader-related procs..." << LL_ENDL; + + // nSight doesn't support use of ARB funcs that have been normalized in the API + if (!LLRender::sNsightDebugSupport) + { glGetAttribLocationARB = (PFNGLGETATTRIBLOCATIONARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetAttribLocationARB"); glBindAttribLocationARB = (PFNGLBINDATTRIBLOCATIONARBPROC) GLH_EXT_GET_PROC_ADDRESS("glBindAttribLocationARB"); + } + else + { + glGetAttribLocationARB = (PFNGLGETATTRIBLOCATIONARBPROC)GLH_EXT_GET_PROC_ADDRESS("glGetAttribLocation"); + glBindAttribLocationARB = (PFNGLBINDATTRIBLOCATIONARBPROC)GLH_EXT_GET_PROC_ADDRESS("glBindAttribLocation"); + } + glGetActiveAttribARB = (PFNGLGETACTIVEATTRIBARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetActiveAttribARB"); glVertexAttrib1dARB = (PFNGLVERTEXATTRIB1DARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1dARB"); glVertexAttrib1dvARB = (PFNGLVERTEXATTRIB1DVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1dvARB"); diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 76f28bb43f..65d6181920 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -49,6 +49,7 @@ U32 LLRender::sUICalls = 0; U32 LLRender::sUIVerts = 0; U32 LLTexUnit::sWhiteTexture = 0; bool LLRender::sGLCoreProfile = false; +bool LLRender::sNsightDebugSupport = false; static const U32 LL_NUM_TEXTURE_LAYERS = 32; static const U32 LL_NUM_LIGHT_UNITS = 8; diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h index a67fb8da52..2573129fd3 100644 --- a/indra/llrender/llrender.h +++ b/indra/llrender/llrender.h @@ -438,7 +438,8 @@ public: static U32 sUICalls; static U32 sUIVerts; static bool sGLCoreProfile; - + static bool sNsightDebugSupport; + private: friend class LLLightState; |