From 06bce2ddd0958cff3c2ee477a880e998dfc48be7 Mon Sep 17 00:00:00 2001 From: "Graham Linden graham@lindenlab.com" Date: Thu, 15 Feb 2018 21:55:24 +0000 Subject: Add debug setting and code to allow nVidia nSight graphics debugging to capture SL frames. These changes are only enabled if RenderNsightDebugSupport is true and eliminate use of some OpenGL legacy functionality which is incompatible with nSight capture (mostly glReadPixels and other fixed-function pipe rendering calls). --- indra/llappearance/lltexlayer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/llappearance') diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp index 2cf86bb4fe..3f2fcce429 100644 --- a/indra/llappearance/lltexlayer.cpp +++ b/indra/llappearance/lltexlayer.cpp @@ -1577,7 +1577,12 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC } alpha_data = new U8[width * height]; mAlphaCache[cache_index] = alpha_data; - glReadPixels(x, y, width, height, GL_ALPHA, GL_UNSIGNED_BYTE, alpha_data); + + // nSight doesn't support use of glReadPixels + if (!LLRender::sNsightDebugSupport) + { + glReadPixels(x, y, width, height, GL_ALPHA, GL_UNSIGNED_BYTE, alpha_data); + } } getTexLayerSet()->getAvatarAppearance()->dirtyMesh(); -- cgit v1.2.3