summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorNiranV <NiranV.Dean@googlemail.com>2019-09-04 04:23:42 +0200
committerNiranV <NiranV.Dean@googlemail.com>2019-09-04 04:23:42 +0200
commit63a3d9b4d99d244481dbd33c184d3ff8039ca7ad (patch)
treef0184ded33136b8a49811cad5b139a168a80bb48 /indra/newview
parent3631057bfabab170798ab377e48151d327479aa4 (diff)
SL-12104 Fixed: Oversized snapshots being broken.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewerwindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 72df31cb5f..a7601fc30c 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -4719,7 +4719,8 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
if ((image_width <= gGLManager.mGLMaxTextureSize && image_height <= gGLManager.mGLMaxTextureSize) &&
(image_width > window_width || image_height > window_height) && LLPipeline::sRenderDeferred && !show_ui)
{
- if (scratch_space.allocate(image_width, image_height, GL_DEPTH_COMPONENT, true, true))
+ U32 color_fmt = type == LLSnapshotModel::SNAPSHOT_TYPE_DEPTH ? GL_DEPTH_COMPONENT : GL_RGBA;
+ if (scratch_space.allocate(image_width, image_height, color_fmt, true, true))
{
original_width = gPipeline.mDeferredScreen.getWidth();
original_height = gPipeline.mDeferredScreen.getHeight();