summaryrefslogtreecommitdiff
path: root/indra/llappearance/lltexlayer.cpp
diff options
context:
space:
mode:
authorGraham Madarasz <graham@lindenlab.com>2018-02-16 20:52:10 +0000
committerGraham Madarasz <graham@lindenlab.com>2018-02-16 20:52:10 +0000
commit5efc817d9a76fe0b169b831393d794fc2257261b (patch)
tree6bdfe387970573748d66453cbe466fe356501305 /indra/llappearance/lltexlayer.cpp
parentb2f61c0e0b27b9c1dae33a85bfc4db6b3ce95dc0 (diff)
parentcaa60a57310a01041cca74be789935ae6135f4eb (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/llappearance/lltexlayer.cpp')
-rw-r--r--indra/llappearance/lltexlayer.cpp7
1 files changed, 6 insertions, 1 deletions
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();