From 53beeec0a34fd926f1b9a5aea04cec9ed94e31d9 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 26 Oct 2010 14:31:20 -0500 Subject: Potential fix for crash in renderBloom. Reviewed by Seraph. --- indra/newview/llviewerdisplay.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index eee94f29da..81acca4fc3 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -218,6 +218,16 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLMemType mt_render(LLMemType::MTYPE_RENDER); LLFastTimer t(FTM_RENDER); + if (gResizeScreenTexture) + { //skip render on frames where screen texture is resizing + gGL.flush(); + glClear(GL_COLOR_BUFFER_BIT); + gViewerWindow->mWindow->swapBuffers(); + gResizeScreenTexture = FALSE; + gPipeline.resizeScreenTexture(); + return; + } + if (LLPipeline::sRenderFrameTest) { send_agent_pause(); @@ -531,6 +541,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) gViewerWindow->setup3DViewport(); gPipeline.resetFrameStats(); // Reset per-frame statistics. + if (!gDisconnected) { LLMemType mt_du(LLMemType::MTYPE_DISPLAY_UPDATE); @@ -641,11 +652,11 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLVertexBuffer::clientCopy(0.016); } - if (gResizeScreenTexture) - { - gResizeScreenTexture = FALSE; - gPipeline.resizeScreenTexture(); - } + //if (gResizeScreenTexture) + //{ + // gResizeScreenTexture = FALSE; + // gPipeline.resizeScreenTexture(); + //} gGL.setColorMask(true, true); glClearColor(0,0,0,0); -- cgit v1.2.3 From dcde5979c3afa8046f3053bc9b8460ac333ceed6 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 26 Oct 2010 14:42:09 -0500 Subject: Anti-alias edge map. --- indra/newview/pipeline.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 295b21d5b4..a5c99d125c 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -634,6 +634,7 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) { addDeferredAttachments(mSampleBuffer); mDeferredScreen.setSampleBuffer(&mSampleBuffer); + mEdgeMap.setSampleBuffer(&mSampleBuffer); } mScreen.setSampleBuffer(&mSampleBuffer); -- cgit v1.2.3 From da04af47cc6e9f6acfcac0d2d6f1466b6f9baec2 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 26 Oct 2010 16:19:24 -0500 Subject: Fix for bad binormals. --- indra/llmath/llvolume.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra') diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 0fe309ddf3..a0874e859c 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -6139,6 +6139,14 @@ void LLVolumeFace::createBinormals() LLVector2* tc = (LLVector2*) mTexCoords; LLVector4a* binorm = (LLVector4a*) mBinormals; + LLVector4a* end = mBinormals+mNumVertices; + while (binorm < end) + { + (*binorm++).clear(); + } + + binorm = mBinormals; + for (U32 i = 0; i < mNumIndices/3; i++) { //for each triangle const U16& i0 = mIndices[i*3+0]; -- cgit v1.2.3