diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index c32ad187c..9c358301b 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -66,7 +66,7 @@ if (EXISTS ${LIBS_CLOSED_DIR}llkdu AND NOT STANDALONE) add_subdirectory(${LIBS_CLOSED_PREFIX}llkdu) endif (EXISTS ${LIBS_CLOSED_DIR}llkdu AND NOT STANDALONE) -add_subdirectory(${LIBS_OPEN_PREFIX}lscript) +#add_subdirectory(${LIBS_OPEN_PREFIX}lscript) if (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts) add_subdirectory(${LIBS_CLOSED_PREFIX}copy_win_scripts) diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 21eee45ac..8347352d0 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -60,7 +60,7 @@ set(cmake_SOURCE_FILES LLVFS.cmake LLWindow.cmake LLXML.cmake - LScript.cmake +# LScript.cmake Linking.cmake NDOF.cmake OPENAL.cmake diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h index cc1482b18..6e5e51b7e 100644 --- a/indra/llmath/lloctree.h +++ b/indra/llmath/lloctree.h @@ -81,6 +81,33 @@ public: virtual void traverse(const LLOctreeNode* node); }; +struct OctreeGuard +{ + template + OctreeGuard(const LLOctreeNode* node) + {mNode = (void*)node;getNodes().push_back(this);} + ~OctreeGuard() + {llassert_always(getNodes().back() == this); getNodes().pop_back();} + template + static bool checkGuarded(const LLOctreeNode* node) + { + for(std::vector::const_iterator it=getNodes().begin();it != getNodes().end();++it) + { + if((*it)->mNode == node) + { + OCT_ERRS << "!!! MANIPULATING OCTREE BRANCH DURING ITERATION !!!" << llendl; + return true; + } + } + return false; + } + static std::vector& getNodes() + { + static std::vector gNodes; + return gNodes; + } + void* mNode; +}; template class LLOctreeNode : public LLTreeNode { @@ -246,8 +273,8 @@ public: U32 getElementCount() const { return mElementCount; } bool isEmpty() const { return mElementCount == 0; } - element_list& getData() { return mData; } - const element_list& getData() const { return mData; } + //element_list& getData() { return mData; } + //const element_list& getData() const { return mData; } element_iter getDataBegin() { return mData; } element_iter getDataEnd() { return mDataEnd; } const_element_iter getDataBegin() const { return mData; } @@ -317,6 +344,7 @@ public: virtual bool insert(T* data) { + OctreeGuard::checkGuarded(this); if (data == NULL || data->getBinIndex() != -1) { OCT_ERRS << "!!! INVALID ELEMENT ADDED TO OCTREE BRANCH !!!" << llendl; @@ -433,7 +461,7 @@ public: void _remove(T* data, S32 i) { //precondition -- mElementCount > 0, idx is in range [0, mElementCount) - + OctreeGuard::checkGuarded(this); mElementCount--; data->setBinIndex(-1); @@ -463,6 +491,7 @@ public: bool remove(T* data) { + OctreeGuard::checkGuarded(this); S32 i = data->getBinIndex(); if (i >= 0 && i < (S32)mElementCount) @@ -508,6 +537,7 @@ public: void removeByAddress(T* data) { + OctreeGuard::checkGuarded(this); for (U32 i = 0; i < mElementCount; ++i) { if (mData[i] == data) @@ -527,6 +557,7 @@ public: void clearChildren() { + OctreeGuard::checkGuarded(this); mChildCount = 0; U32* foo = (U32*) mChildMap; @@ -587,6 +618,7 @@ public: OCT_ERRS <<"Octree node has too many children... why?" << llendl; } #endif + OctreeGuard::checkGuarded(this); mChildMap[child->getOctant()] = mChildCount; @@ -606,6 +638,8 @@ public: void removeChild(S32 index, BOOL destroy = FALSE) { + OctreeGuard::checkGuarded(this); + for (U32 i = 0; i < this->getListenerCount(); i++) { oct_listener* listener = getOctListener(i); diff --git a/indra/llrender/llpostprocess.cpp b/indra/llrender/llpostprocess.cpp index 2cedee327..c1415e3f6 100644 --- a/indra/llrender/llpostprocess.cpp +++ b/indra/llrender/llpostprocess.cpp @@ -48,6 +48,7 @@ extern LLGLSLShader gPostColorFilterProgram; extern LLGLSLShader gPostNightVisionProgram; extern LLGLSLShader gPostGaussianBlurProgram; extern LLGLSLShader gPostPosterizeProgram; +extern LLGLSLShader gPostMotionBlurProgram; static const unsigned int NOISE_SIZE = 512; @@ -259,6 +260,55 @@ public: } }; +class LLMotionShader : public LLPostProcessShader +{ +private: + LLShaderSetting mEnabled; + LLShaderSetting mStrength; +public: + LLMotionShader() : + mEnabled("enable_motionblur",false), + mStrength("blur_strength",false) + { + mSettings.push_back(&mEnabled); + mSettings.push_back(&mStrength); + } + bool isEnabled() { return mEnabled && gPostMotionBlurProgram.mProgramObject; } + S32 getColorChannel() { return 0; } + S32 getDepthChannel() { return 1; } + QuadType bind() + { + if(!isEnabled()) + { + return QUAD_NONE; + } + + glh::matrix4f inv_proj(gGLModelView); + inv_proj.mult_left(gGLProjection); + inv_proj = inv_proj.inverse(); + glh::matrix4f prev_proj(gGLPreviousModelView); + prev_proj.mult_left(gGLProjection); + + LLVector2 screen_rect = LLPostProcess::getInstance()->getDimensions(); + + gPostMotionBlurProgram.bind(); + gPostMotionBlurProgram.uniformMatrix4fv("prev_proj", 1, GL_FALSE, prev_proj.m); + gPostMotionBlurProgram.uniformMatrix4fv("inv_proj", 1, GL_FALSE, inv_proj.m); + gPostMotionBlurProgram.uniform2fv("screen_res", 1, screen_rect.mV); + gPostMotionBlurProgram.uniform1i("blur_strength", mStrength); + + return QUAD_NORMAL; + } + bool draw(U32 pass) + { + return pass == 1; + } + void unbind() + { + gPostMotionBlurProgram.unbind(); + } +}; + LLPostProcess::LLPostProcess(void) : mVBO(NULL), mDepthTexture(0), @@ -269,11 +319,13 @@ LLPostProcess::LLPostProcess(void) : mSelectedEffectInfo(LLSD::emptyMap()), mAllEffectInfo(LLSD::emptyMap()) { + mShaders.push_back(new LLMotionShader()); mShaders.push_back(new LLColorFilterShader()); mShaders.push_back(new LLNightVisionShader()); mShaders.push_back(new LLGaussBlurShader()); mShaders.push_back(new LLPosterizeShader()); + /* Do nothing. Needs to be updated to use our current shader system, and to work with the move into llrender.*/ std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight", XML_FILENAME)); LL_DEBUGS2("AppInit", "Shaders") << "Loading PostProcess Effects settings from " << pathName << LL_ENDL; diff --git a/indra/llrender/llpostprocess.h b/indra/llrender/llpostprocess.h index ec076842d..9ecd9e293 100644 --- a/indra/llrender/llpostprocess.h +++ b/indra/llrender/llpostprocess.h @@ -142,6 +142,9 @@ private: void drawOrthoQuad(QuadType type); //Finally draws fullscreen quad with the shader currently bound. public: + LLVector2 getDimensions() { return LLVector2(mScreenWidth,mScreenHeight); } + + // UI interaction // Getters inline LLSD const & getAllEffectInfo(void) const { return mAllEffectInfo; } diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index feedabad5..366f506a7 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -42,6 +42,7 @@ LLRender gGL; //Would be best to migrate these to LLMatrix4a and LLVector4a, but that's too divergent right now. LL_ALIGN_16(F32 gGLModelView[16]); LL_ALIGN_16(F32 gGLLastModelView[16]); +LL_ALIGN_16(F32 gGLPreviousModelView[16]); LL_ALIGN_16(F32 gGLLastProjection[16]); LL_ALIGN_16(F32 gGLProjection[16]); LL_ALIGN_16(S32 gGLViewport[4]); diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h index 0d9c5326f..d8f01a75a 100644 --- a/indra/llrender/llrender.h +++ b/indra/llrender/llrender.h @@ -474,6 +474,7 @@ private: extern F32 gGLModelView[16]; extern F32 gGLLastModelView[16]; extern F32 gGLLastProjection[16]; +extern F32 gGLPreviousModelView[16]; extern F32 gGLProjection[16]; extern S32 gGLViewport[4]; diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 6ef3067f3..4c18a6a83 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -34,7 +34,7 @@ include(LLUI) include(LLVFS) include(LLWindow) include(LLXML) -include(LScript) +#include(LScript) include(Linking) include(NDOF) include(GooglePerfTools) @@ -69,8 +69,8 @@ include_directories( ${LLVFS_INCLUDE_DIRS} ${LLWINDOW_INCLUDE_DIRS} ${LLXML_INCLUDE_DIRS} - ${LSCRIPT_INCLUDE_DIRS} - ${LSCRIPT_INCLUDE_DIRS}/lscript_compile +# ${LSCRIPT_INCLUDE_DIRS} +# ${LSCRIPT_INCLUDE_DIRS}/lscript_compile ) set(viewer_SOURCE_FILES @@ -1556,7 +1556,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${LLVFS_LIBRARIES} ${LLWINDOW_LIBRARIES} ${LLXML_LIBRARIES} - ${LSCRIPT_LIBRARIES} +# ${LSCRIPT_LIBRARIES} ${LLMATH_LIBRARIES} ${LLCOMMON_LIBRARIES} ${NDOF_LIBRARY} diff --git a/indra/newview/app_settings/lsl_functions_os.xml b/indra/newview/app_settings/lsl_functions_os.xml new file mode 100644 index 000000000..05e1c94f8 --- /dev/null +++ b/indra/newview/app_settings/lsl_functions_os.xml @@ -0,0 +1,373 @@ + + + + + + + + + + + + + + + + osSetDynamicTextureURL + + osSetDynamicTextureURLBlend + + osSetDynamicTextureURLBlendFace + + osSetDynamicTextureData + + osSetDynamicTextureDataBlend + + osSetDynamicTextureDataBlendFace + + osGetTerrainHeight + + osSetTerrainHeight + + osTerrainFlush + + osRegionRestart + + osRegionNotice + + osConsoleCommand + + osSetParcelMediaURL + + osSetPrimFloatOnWater + + osSetParcelSIPAddress + + osGetAgentIP + + osGetAgents + + osTeleportAgent + + osTeleportOwner + + osAvatarPlayAnimation + + osAvatarStopAnimation + + osForceAttachToAvatar + + osForceDetachFromAvatar + + osMovePen + + osDrawLine + + osDrawText + + osDrawEllipse + + osDrawRectangle + + osDrawFilledRectangle + + osDrawPolygon + + osDrawFilledPolygon + + osSetFontSize + + osSetFontName + + osSetPenSize + + osSetPenColor + + osSetPenCap + + osDrawImage + + osGetDrawStringSize + + osList2Double + + osSetRegionWaterHeight + + osSetRegionSunSettings + + osSetEstateSunSettings + + osGetCurrentSunHour + + osGetSunParam + + osSetSunParam + + osWindActiveModelPluginName + + osSetWindParam + + osGetWindParam + + osParcelJoin + + osParcelSubdivide + + osSetParcelDetails + + osGetScriptEngineName + + osGetSimulatorVersion + + osParseJSON + + osParseJSONNew + + osMessageObject + + osMakeNotecard + + osGetNotecardLine + + osGetNotecard + + osGetNumberOfNotecardLines + + osAvatarName2Key + + osKey2Name + + osGetGridNick + + osGetGridName + + osGetGridLoginURI + + osGetGridHomeURI + + osGetGridGatekeeperURI + + osGetGridCustom + + osFormatString + + osMatchString + + osReplaceString + + osLoadedCreationDate + + osLoadedCreationTime + + osLoadedCreationID + + osGetLinkPrimitiveParams + + osGetMapTexture + + osGetRegionMapTexture + + osGetRegionStats + + osGetSimulatorMemory + + osKickAvatar + + osSetSpeed + + osCauseDamage + + osCauseHealing + + osGetPrimitiveParams + + osSetPrimitiveParams + + osSetProjectionParams + + osGetAvatarList + + osUnixTimeToTimestamp + + osGetInventoryDesc + + osInviteToGroup + + osEjectFromGroup + + osSetTerrainTexture + + osSetTerrainTextureHeight + + + + osSetStateEvents + + osIsNpc + + osNpcCreate + + osNpcSaveAppearance + + osNpcLoadAppearance + + osNpcGetPos + + osNpcMoveTo + + osNpcMoveToTarget + + osNpcGetOwner + + osNpcGetRot + + osNpcSetRot + + osNpcStopMoveToTarget + + osNpcSay + + osNpcSay + + osNpcSit + + osNpcStand + + osNpcRemove + + osNpcPlayAnimation + + osNpcStopAnimation + + osOwnerSaveAppearance + + osAgentSaveAppearance + + osNpcShout + + osNpcWhisper + + + + osReturnObject + + osReturnObjects + + osShutDown + + osAddAgentToGroup + + osRezObject + + + + cmSetWindlightScene + + cmSetWindlightSceneTargeted + + cmGetWindlightScene + + + lsSetWindlightScene + + lsSetWindlightSceneTargeted + + lsGetWindlightScene + + + + aaSetCloudDensity + + aaUpdateDatabase + + aaQueryDatabase + + aaDeserializeXMLValues + + aaDeserializeXMLKeys + + aaSetConeOfSilence + + aaSerializeXML + + aaGetTeam + + aaGetHealth + + aaJoinCombat + + aaLeaveCombat + + aaJoinCombatTeam + + aaRequestCombatPermission + + aaThawAvatar + + aaFreezeAvatar + + aaGetTeamMembers + + aaGetLastOwner + + aaSayDistance + + aaSayTo + + aaGetWalkDisabled + + aaSetWalkDisabled + + aaGetFlyDisabled + + aaSetFlyDisabled + + aaAvatarFullName2Key + + aaRaiseError + + aaGetText + + aaGetTextColor + + aaSetEnv + + aaGetIsInfiniteRegion + + + botGetWaitingTime + + botSetMap + + botCreateBot + + botRemoveBot + + botPauseMovement + + botResumeMovement + + botFollowAvatar + + botStopFollowAvatar + + botSendChatMessage + + botSendIM + + botSetShouldFly + + botSitObject + + botStandUp + + botTouchObject + + botAddTag + + botGetBotsWithTag + + botRemoveBotsWithTag + + + \ No newline at end of file diff --git a/indra/newview/app_settings/lsl_functions_sl.xml b/indra/newview/app_settings/lsl_functions_sl.xml new file mode 100644 index 000000000..f0a49db5f --- /dev/null +++ b/indra/newview/app_settings/lsl_functions_sl.xml @@ -0,0 +1,1014 @@ + + + + llSin + + llCos + + llTan + + llAtan2 + + llSqrt + + llPow + + llAbs + + llFabs + + llFrand + + llFloor + + llCeil + + llRound + + llVecMag + + llVecNorm + + llVecDist + + llRot2Euler + + llEuler2Rot + + llAxes2Rot + + llRot2Fwd + + llRot2Left + + llRot2Up + + llRotBetween + + llWhisper + + llSay + + llShout + + llListen + + llListenControl + + llListenRemove + + llSensor + + llSensorRepeat + + llSensorRemove + + llDetectedName + + llDetectedKey + + llDetectedOwner + + llDetectedType + + llDetectedPos + + llDetectedVel + + llDetectedGrab + + llDetectedRot + + llDetectedGroup + + llDetectedLinkNumber + + llDie + + llGround + + llCloud + + llWind + + llSetStatus + + llGetStatus + + llSetScale + + llGetScale + + llSetColor + + llGetAlpha + + llSetAlpha + + llGetColor + + llSetTexture + + sleep_time + 0.20 + + llScaleTexture + + sleep_time + 0.20 + + llOffsetTexture + + sleep_time + 0.20 + + llRotateTexture + + sleep_time + 0.20 + + llGetTexture + + llSetPos + + sleep_time + 0.20 + + llGetPos + + llGetLocalPos + + llSetRot + + sleep_time + 0.20 + + llGetRot + + llGetLocalRot + + llSetForce + + llGetForce + + llTarget + + llTargetRemove + + llRotTarget + + llRotTargetRemove + + llMoveToTarget + + llStopMoveToTarget + + llApplyImpulse + + llApplyRotationalImpulse + + llSetTorque + + llGetTorque + + llSetForceAndTorque + + llGetVel + + llGetAccel + + llGetOmega + + llGetTimeOfDay + + llGetWallclock + + llGetTime + + llResetTime + + llGetAndResetTime + + llSound + + llPlaySound + + llLoopSound + + llLoopSoundMaster + + llLoopSoundSlave + + llPlaySoundSlave + + llTriggerSound + + llStopSound + + llPreloadSound + + sleep_time + 1.0 + + llGetSubString + + llDeleteSubString + + llInsertString + + llToUpper + + llToLower + + llGiveMoney + + llMakeExplosion + + sleep_time + 0.10 + + llMakeFountain + + sleep_time + 0.10 + + llMakeSmoke + + sleep_time + 0.10 + + llMakeFire + + sleep_time + 0.10 + + llRezObject + + sleep_time + 0.10 + + llLookAt + + llStopLookAt + + llSetTimerEvent + + llSleep + + llGetMass + + llCollisionFilter + + llTakeControls + + llReleaseControls + + llAttachToAvatar + + llDetachFromAvatar + + llTakeCamera + + llReleaseCamera + + llGetOwner + + llInstantMessage + + sleep_time + 2.0 + + llEmail + + sleep_time + 20.0 + + llGetNextEmail + + llGetKey + + llSetBuoyancy + + llSetHoverHeight + + llStopHover + + llMinEventDelay + + llSoundPreload + + llRotLookAt + + llStringLength + + llStartAnimation + + llStopAnimation + + llPointAt + + llStopPointAt + + llTargetOmega + + llGetStartParameter + + llGodLikeRezObject + + god_only + true + + llRequestPermissions + + llGetPermissionsKey + + llGetPermissions + + llGetLinkNumber + + llSetLinkColor + + llCreateLink + + sleep_time + 1.0 + + llBreakLink + + llBreakAllLinks + + llGetLinkKey + + llGetLinkName + + llGetInventoryNumber + + llGetInventoryName + + llSetScriptState + + llGetEnergy + + llGiveInventory + + llRemoveInventory + + llSetText + + llWater + + llPassTouches + + llRequestAgentData + + sleep_time + 0.10 + + llRequestInventoryData + + sleep_time + 1.0 + + llSetDamage + + llTeleportAgentHome + + sleep_time + 5.0 + + llModifyLand + + llCollisionSound + + llCollisionSprite + + llGetAnimation + + llResetScript + + llMessageLinked + + llPushObject + + llPassCollisions + + llGetScriptName + + llGetNumberOfSides + + llAxisAngle2Rot + + llRot2Axis + + llRot2Angle + + llAcos + + llAsin + + llAngleBetween + + llGetInventoryKey + + llAllowInventoryDrop + + llGetSunDirection + + llGetTextureOffset + + llGetTextureScale + + llGetTextureRot + + llSubStringIndex + + llGetOwnerKey + + llGetCenterOfMass + + llListSort + + llGetListLength + + llList2Integer + + llList2Float + + llList2String + + llList2Key + + llList2Vector + + llList2Rot + + llList2List + + llDeleteSubList + + llGetListEntryType + + llList2CSV + + llCSV2List + + llListRandomize + + llList2ListStrided + + llGetRegionCorner + + llListInsertList + + llListFindList + + llGetObjectName + + llSetObjectName + + llGetDate + + llEdgeOfWorld + + llGetAgentInfo + + llAdjustSoundVolume + + sleep_time + 0.10 + + llSetSoundQueueing + + llSetSoundRadius + + llKey2Name + + llSetTextureAnim + + llTriggerSoundLimited + + llEjectFromLand + + llParseString2List + + llOverMyLand + + llGetLandOwnerAt + + llGetNotecardLine + + sleep_time + 0.10 + + llGetAgentSize + + llSameGroup + + llUnSit + + llGroundSlope + + llGroundNormal + + llGroundContour + + llGetAttached + + llGetFreeMemory + + llGetRegionName + + llGetRegionTimeDilation + + llGetRegionFPS + + llParticleSystem + + llGroundRepel + + llGiveInventoryList + + sleep_time + 3.0 + + llSetVehicleType + + llSetVehicleFloatParam + + llSetVehicleVectorParam + + llSetVehicleRotationParam + + llSetVehicleFlags + + llRemoveVehicleFlags + + llSitTarget + + llAvatarOnSitTarget + + llAddToLandPassList + + sleep_time + 0.10 + + llSetTouchText + + llSetSitText + + llSetCameraEyeOffset + + llSetCameraAtOffset + + llDumpList2String + + llScriptDanger + + llDialog + + sleep_time + 1.0 + + llVolumeDetect + + llResetOtherScript + + llGetScriptState + + llRemoteLoadScript + + sleep_time + 3.0 + + llSetRemoteScriptAccessPin + + sleep_time + 0.20 + + llRemoteLoadScriptPin + + sleep_time + 3.0 + + llOpenRemoteDataChannel + + sleep_time + 1.0 + + llSendRemoteData + + sleep_time + 3.0 + + llRemoteDataReply + + sleep_time + 3.0 + + llCloseRemoteDataChannel + + sleep_time + 1.0 + + llMD5String + + llSetPrimitiveParams + + sleep_time + 0.20 + + llStringToBase64 + + llBase64ToString + + llXorBase64Strings + + sleep_time + 0.30 + + llRemoteDataSetRegion + + llLog10 + + llLog + + llGetAnimationList + + llSetParcelMusicURL + + sleep_time + 2.0 + + llGetRootPosition + + llGetRootRotation + + llGetObjectDesc + + llSetObjectDesc + + llGetCreator + + llGetTimestamp + + llSetLinkAlpha + + llGetNumberOfPrims + + llGetNumberOfNotecardLines + + sleep_time + 0.10 + + llGetBoundingBox + + llGetGeometricCenter + + llGetPrimitiveParams + + sleep_time + 0.20 + + llIntegerToBase64 + + sleep_time + 0.00 + + llBase64ToInteger + + sleep_time + 0.00 + + llGetGMTclock + + llGetSimulatorHostname + + sleep_time + 10.0 + + llSetLocalRot + + sleep_time + 0.20 + + llParseStringKeepNulls + + llRezAtRoot + + sleep_time + 0.10 + + llGetObjectPermMask + + llSetObjectPermMask + + god_only + true + + llGetInventoryPermMask + + llSetInventoryPermMask + + god_only + true + + llGetInventoryCreator + + llOwnerSay + + llRequestSimulatorData + + sleep_time + 1.0 + + llForceMouselook + + llGetObjectMass + + llListReplaceList + + llLoadURL + + sleep_time + 10.0 + + llParcelMediaCommandList + + sleep_time + 2.0 + + llParcelMediaQuery + + sleep_time + 2.0 + + llModPow + + sleep_time + 1.0 + + llGetInventoryType + + llSetPayPrice + + llGetCameraPos + + llGetCameraRot + + llSetPrimURL + + sleep_time + 20.0 + + llRefreshPrimURL + + sleep_time + 20.0 + + llEscapeURL + + llUnescapeURL + + llMapDestination + + sleep_time + 1.0 + + llAddToLandBanList + + sleep_time + 0.10 + + llRemoveFromLandPassList + + sleep_time + 0.10 + + llRemoveFromLandBanList + + sleep_time + 0.10 + + llSetCameraParams + + llClearCameraParams + + llGetUnixTime + + llGetParcelFlags + + llGetRegionFlags + + llXorBase64StringsCorrect + + llHTTPRequest + + llResetLandBanList + + sleep_time + 0.10 + + llResetLandPassList + + sleep_time + 0.10 + + llGetObjectPrimCount + + llGetParcelPrimOwners + + sleep_time + 2.00 + + llGetParcelPrimCount + + llGetParcelMaxPrims + + llGetParcelDetails + + llSetLinkPrimitiveParams + + sleep_time + 0.20 + + llSetLinkTexture + + sleep_time + 0.20 + + llStringTrim + + llRegionSay + + llGetObjectDetails + + llSetClickAction + + llGetRegionAgentCount + + llTextBox + + sleep_time + 1.0 + + llGetAgentLanguage + + llDetectedTouchUV + + llDetectedTouchFace + + llDetectedTouchPos + + llDetectedTouchNormal + + llDetectedTouchBinormal + + llDetectedTouchST + + llSHA1String + + llGetFreeURLs + + llRequestURL + + llRequestSecureURL + + llReleaseURL + + llHTTPResponse + + llGetHTTPHeader + + + llSetPrimMediaParams + + sleep_time + 1.00 + + llGetPrimMediaParams + + sleep_time + 1.00 + + llClearPrimMedia + + sleep_time + 1.00 + + llSetLinkPrimitiveParamsFast + + llGetLinkPrimitiveParams + + llLinkParticleSystem + + llSetLinkTextureAnim + + llGetLinkNumberOfSides + + + llGetUsername + + llRequestUsername + + llGetDisplayName + + llRequestDisplayName + + llGetEnv + + llRegionSayTo + + + llSetMemoryLimit + + llGetMemoryLimit + + llSetLinkMedia + + llGetLinkMedia + + llClearLinkMedia + + llSetLinkCamera + + llSetContentType + + llLinkSitTarget + + llAvatarOnLinkSitTarget + + llSetVelocity + + + llCastRay + + llGetMassMKS + + llSetPhysicsMaterial + + llGetPhysicsMaterial + + + llManageEstateAccess + + + llSetKeyframedMotion + + + llTransferLindenDollars + + + llGenerateKey + + + llGetParcelMusicURL + + + llScriptProfiler + + llGetSPMaxMemory + + llGetUsedMemory + + llSetAngularVelocity + + + llSetRegionPos + + + llGetAgentList + + + llAttachToAvatarTemp + + llTeleportAgent + + llTeleportAgentGlobalCoords + + + llCreateCharacter + + llDeleteCharacter + + llEvade + + llExecCharacterCmd + + llFleeFrom + + llGetClosestNavPoint + + llGetStaticPath + + llNavigateTo + + llPatrolPoints + + llPursue + + llUpdateCharacter + + llWanderWithin + + + \ No newline at end of file diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ba485dc74..bc2023902 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -973,6 +973,17 @@ Value 0 + AntiSpamGroupFeeInvites + + Comment + When true, dialogs from group invites that require an entry fee will be blocked. + Persist + 1 + Type + Boolean + Value + 0 + AntiSpamGroupNotices Comment diff --git a/indra/newview/app_settings/shaders/class1/effects/MotionBlurF.glsl b/indra/newview/app_settings/shaders/class1/effects/MotionBlurF.glsl new file mode 100644 index 000000000..89aaa8f10 --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/effects/MotionBlurF.glsl @@ -0,0 +1,55 @@ +/** + * @file colorFilterF.glsl + * + * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc. + * $License$ + */ + +#extension GL_ARB_texture_rectangle : enable + +#ifdef DEFINE_GL_FRAGCOLOR +out vec4 frag_color; +#else +#define frag_color gl_FragColor +#endif + +uniform sampler2DRect tex0; +uniform sampler2DRect tex1; +uniform mat4 inv_proj; +uniform mat4 prev_proj; +uniform vec2 screen_res; +uniform int blur_strength; + +VARYING vec2 vary_texcoord0; + +#define SAMPLE_COUNT 10 + +vec4 getPosition(vec2 pos_screen, out vec4 ndc) +{ + float depth = texture2DRect(tex1, pos_screen.xy).r; + vec2 sc = pos_screen.xy*2.0; + sc /= screen_res; + sc -= vec2(1.0,1.0); + ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0); + vec4 pos = inv_proj * ndc; + pos /= pos.w; + pos.w = 1.0; + return pos; +} + +void main(void) +{ + vec4 ndc; + vec4 pos = getPosition(vary_texcoord0,ndc); + vec4 prev_pos = prev_proj * pos; + prev_pos/=prev_pos.w; + prev_pos.w = 1.0; + vec2 vel = ((ndc.xy-prev_pos.xy) * .5) * screen_res * .001 * blur_strength; + vec3 color = texture2DRect(tex0, vary_texcoord0.st).rgb; + vec2 texcoord = vary_texcoord0 + vel; + for(int i = 1; i < SAMPLE_COUNT; ++i, texcoord += vel) + { + color += texture2DRect(tex0, texcoord.st).rgb; + } + frag_color = vec4(color / SAMPLE_COUNT, 1.0); +} diff --git a/indra/newview/app_settings/windlight/postprocesseffects.xml b/indra/newview/app_settings/windlight/postprocesseffects.xml index 0914b275a..b5b173b40 100644 --- a/indra/newview/app_settings/windlight/postprocesseffects.xml +++ b/indra/newview/app_settings/windlight/postprocesseffects.xml @@ -175,6 +175,8 @@ enable_gauss_blur 0 enable_posterize + 0 + enable_motionblur 0 gauss_blur_passes 2 @@ -190,6 +192,8 @@ 1 posterize_layers 10 + blur_strength + 10 \ No newline at end of file diff --git a/indra/newview/ascentprefschat.cpp b/indra/newview/ascentprefschat.cpp index d368e07a8..2d490f8e8 100644 --- a/indra/newview/ascentprefschat.cpp +++ b/indra/newview/ascentprefschat.cpp @@ -367,6 +367,7 @@ void LLPrefsAscentChat::refreshValues() mBlockAlertSpam = gSavedSettings.getBOOL("AntiSpamAlerts"); mBlockFriendSpam = gSavedSettings.getBOOL("AntiSpamFriendshipOffers"); mBlockGroupInviteSpam = gSavedSettings.getBOOL("AntiSpamGroupInvites"); + mBlockGroupFeeInviteSpam = gSavedSettings.getBOOL("AntiSpamGroupFeeInvites"); mBlockGroupNoticeSpam = gSavedSettings.getBOOL("AntiSpamGroupNotices"); mBlockItemOfferSpam = gSavedSettings.getBOOL("AntiSpamItemOffers"); mBlockScriptSpam = gSavedSettings.getBOOL("AntiSpamScripts"); @@ -583,6 +584,7 @@ void LLPrefsAscentChat::cancel() gSavedSettings.setBOOL("AntiSpamFriendshipOffers", mBlockFriendSpam); gSavedSettings.setBOOL("AntiSpamGroupNotices", mBlockGroupNoticeSpam); gSavedSettings.setBOOL("AntiSpamGroupInvites", mBlockGroupInviteSpam); + gSavedSettings.setBOOL("AntiSpamGroupFeeInvites", mBlockGroupFeeInviteSpam); gSavedSettings.setBOOL("AntiSpamItemOffers", mBlockItemOfferSpam); gSavedSettings.setBOOL("AntiSpamScripts", mBlockScriptSpam); gSavedSettings.setBOOL("AntiSpamTeleports", mBlockTeleportSpam); diff --git a/indra/newview/ascentprefschat.h b/indra/newview/ascentprefschat.h index 661ddc4f6..8bbfad0c0 100644 --- a/indra/newview/ascentprefschat.h +++ b/indra/newview/ascentprefschat.h @@ -96,6 +96,7 @@ protected: BOOL mBlockFriendSpam; BOOL mBlockGroupNoticeSpam; BOOL mBlockGroupInviteSpam; + BOOL mBlockGroupFeeInviteSpam; BOOL mBlockItemOfferSpam; BOOL mBlockScriptSpam; BOOL mBlockTeleportSpam; diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index 50aceb389..874299df3 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -50,7 +50,7 @@ #include "llviewerobject.h" #include "llviewerobjectlist.h" #include "llviewerregion.h" -#include "lscript_rt_interface.h" +//#include "lscript_rt_interface.h" #include "llviewercontrol.h" #include "llviewerobject.h" #include "llviewerregion.h" @@ -444,6 +444,16 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id, data->mItemId, is_running, queue->mMono, queue->getID(), script_data, script_size, data->mScriptName); } + else + { + std::string text = LLTrans::getString("CompileQueueProblemUploading"); + LLChat chat(text); + LLFloaterChat::addChat(chat); + buffer = text + LLTrans::getString(":") + " " + data->mScriptName; + llwarns << "Problem uploading script asset." << llendl; + if(queue) queue->removeItemByItemID(data->mItemId); + } +#if 0 //Client side compiling disabled. else { // It's now in the file, now compile it. @@ -478,6 +488,7 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id, // Delete it after we're done compiling? LLFile::remove(filename); } +#endif } } else @@ -551,6 +562,7 @@ void LLFloaterCompileQueue::onSaveBytecodeComplete(const LLUUID& asset_id, void* } // compile the file given and save it out. +#if 0 //Client side compiling disabled. void LLFloaterCompileQueue::compile(const std::string& filename, const LLUUID& item_id) { @@ -590,6 +602,7 @@ void LLFloaterCompileQueue::compile(const std::string& filename, (void*)data, FALSE); } } +#endif void LLFloaterCompileQueue::removeItemByItemID(const LLUUID& asset_id) { diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h index 25b001e30..e4bccff52 100644 --- a/indra/newview/llcompilequeue.h +++ b/indra/newview/llcompilequeue.h @@ -163,7 +163,9 @@ protected: S32 status, LLExtStat ext_status); // compile the file given and save it out. +#if 0 //Client side compiling disabled. void compile(const std::string& filename, const LLUUID& asset_id); +#endif // remove any object in mScriptScripts with the matching uuid. void removeItemByAssetID(const LLUUID& asset_id); diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp index a79527456..287b799bd 100644 --- a/indra/newview/llfloaterbulkpermission.cpp +++ b/indra/newview/llfloaterbulkpermission.cpp @@ -42,7 +42,7 @@ #include "llviewerobject.h" #include "llviewerobjectlist.h" #include "llviewerregion.h" -#include "lscript_rt_interface.h" +//#include "lscript_rt_interface.h" #include "llviewercontrol.h" #include "llviewerobject.h" #include "llviewerregion.h" diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 9fe20b6b0..852ad01b8 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -33,6 +33,7 @@ #include // library +#include "llanimationstates.h" #include "llaudioengine.h" #include "lldatapacker.h" #include "llinventory.h" @@ -551,6 +552,13 @@ void LLGestureMgr::playGesture(LLMultiGesture* gesture) || anim_step->mFlags & ANIM_FLAG_STOP || gAssetStorage->hasLocalAsset(anim_id, LLAssetType::AT_ANIMATION))) { + //Singu note: Don't attempt to fetch expressions/emotes. + const char* emote_name = gAnimLibrary.animStateToString(anim_id); + if(emote_name && strstr(emote_name,"express_")==emote_name) + { + break; + } + mLoadingAssets.insert(anim_id); LLUUID* id = new LLUUID(gAgentID); diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index baf963d68..31e686adb 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -53,8 +53,8 @@ #include "llscrollcontainer.h" #include "llscrolllistctrl.h" #include "llslider.h" -#include "lscript_rt_interface.h" -#include "lscript_export.h" +//#include "lscript_rt_interface.h" +//#include "lscript_export.h" #include "lltextbox.h" #include "lltooldraganddrop.h" #include "llvfile.h" @@ -92,6 +92,9 @@ #include "llviewercontrol.h" #include "llappviewer.h" #include "llpanelobjectinventory.h" + +#include "llsdserialize.h" + // [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) #include "rlvhandler.h" #include "rlvlocks.h" @@ -206,6 +209,34 @@ struct LLSECKeywordCompare } }; +std::vector LLScriptEdCore::mParsedFunctions; +//static +void LLScriptEdCore::parseFunctions(const std::string& filename) +{ + std::string filepath = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, filename); + + if(LLFile::isfile(filepath)) + { + LLSD function_list; + llifstream importer(filepath); + if(importer.is_open()) + { + LLSDSerialize::fromXMLDocument(function_list, importer); + importer.close(); + + for (LLSD::map_const_iterator it = function_list.beginMap(); it != function_list.endMap(); ++it) + { + LSLFunctionProps fn; + fn.mName = it->first; + fn.mSleepTime = it->second["sleep_time"].asFloat(); + fn.mGodOnly = it->second["god_only"].asBoolean(); + + mParsedFunctions.push_back(fn); + } + } + } +} + LLScriptEdCore::LLScriptEdCore( const std::string& name, const LLRect& rect, @@ -258,8 +289,8 @@ LLScriptEdCore::LLScriptEdCore( std::vector funcs; std::vector tooltips; - for (std::vector::const_iterator i = gScriptLibrary.mFunctions.begin(); - i != gScriptLibrary.mFunctions.end(); ++i) + for (std::vector::const_iterator i = mParsedFunctions.begin(); + i != mParsedFunctions.end(); ++i) { // Make sure this isn't a god only function, or the agent is a god. if (!i->mGodOnly || gAgent.isGodlike()) @@ -1472,10 +1503,20 @@ void LLPreviewLSL::saveIfNeeded() { uploadAssetViaCaps(url, filename, mItemUUID); } + else + { + LLSD row; + row["columns"][0]["value"] = LLTrans::getString("CompileQueueProblemUploading"); + row["columns"][0]["font"] = "SANSSERIF_SMALL"; + mScriptEd->mErrorList->addElement(row); + LLFile::remove(filename); + } +#if 0 //Client side compiling disabled. else if (gAssetStorage) { uploadAssetLegacy(filename, mItemUUID, tid); } +#endif } } @@ -1497,6 +1538,7 @@ void LLPreviewLSL::uploadAssetViaCaps(const std::string& url, LLHTTPClient::post(url, body, new LLUpdateAgentInventoryResponder(body, filename, LLAssetType::AT_LSL_TEXT)); } +#if 0 //Client side compiling disabled. void LLPreviewLSL::uploadAssetLegacy(const std::string& filename, const LLUUID& item_id, const LLTransactionID& tid) @@ -1580,7 +1622,7 @@ void LLPreviewLSL::uploadAssetLegacy(const std::string& filename, LLFile::remove(err_filename); LLFile::remove(dst_filename); } - +#endif // static void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) @@ -2375,10 +2417,20 @@ void LLLiveLSLEditor::saveIfNeeded() uploadAssetViaCaps(url, filename, mObjectID, mItemID, is_running); } + else + { + LLSD row; + row["columns"][0]["value"] = LLTrans::getString("CompileQueueProblemUploading"); + row["columns"][0]["font"] = "SANSSERIF_SMALL"; + mScriptEd->mErrorList->addElement(row); + LLFile::remove(filename); + } +#if 0 //Client side compiling disabled. else if (gAssetStorage) { uploadAssetLegacy(filename, object, tid, is_running); } +#endif } void LLLiveLSLEditor::uploadAssetViaCaps(const std::string& url, @@ -2397,6 +2449,7 @@ void LLLiveLSLEditor::uploadAssetViaCaps(const std::string& url, new LLUpdateTaskInventoryResponder(body, filename, LLAssetType::AT_LSL_TEXT)); } +#if 0 //Client side compiling disabled. void LLLiveLSLEditor::uploadAssetLegacy(const std::string& filename, LLViewerObject* object, const LLTransactionID& tid, @@ -2495,6 +2548,7 @@ void LLLiveLSLEditor::uploadAssetLegacy(const std::string& filename, runningCheckbox->setLabel(getString("script_running")); runningCheckbox->setEnabled(TRUE); } +#endif void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) { diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 4a42332db..f62a8fb5b 100644 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -62,6 +62,7 @@ class LLScriptEdCore : public LLPanel, public LLEventTimer friend class LLLiveLSLEditor; public: + static void parseFunctions(const std::string& filename); LLScriptEdCore( const std::string& name, const LLRect& rect, @@ -169,6 +170,14 @@ private: LLLiveLSLFile* mLiveFile; LLUUID mObjectUUID; LLUUID mItemUUID; + + struct LSLFunctionProps + { + std::string mName; + F32 mSleepTime; + bool mGodOnly; + }; + static std::vector mParsedFunctions; }; diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index d081f51de..dbc2a1961 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -1276,6 +1276,7 @@ void LLSpatialGroup::handleDestruction(const TreeNode* node) LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION); setState(DEAD); + {OctreeGuard guard(mOctreeNode); for (element_iter i = getDataBegin(); i != getDataEnd(); ++i) { LLDrawable* drawable = *i; @@ -1284,6 +1285,7 @@ void LLSpatialGroup::handleDestruction(const TreeNode* node) drawable->setSpatialGroup(NULL); } } + } //clean up avatar attachment stats LLSpatialBridge* bridge = mSpatialPartition->asBridge(); @@ -1363,6 +1365,7 @@ void LLSpatialGroup::destroyGL(bool keep_occlusion) } + OctreeGuard guard(mOctreeNode); for (LLSpatialGroup::element_iter i = getDataBegin(); i != getDataEnd(); ++i) { LLDrawable* drawable = *i; @@ -2065,6 +2068,7 @@ public: { LLSpatialGroup::OctreeNode* branch = group->mOctreeNode; + OctreeGuard guard(branch); for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i) { LLDrawable* drawable = *i; @@ -2189,6 +2193,7 @@ public: LLSpatialGroup* group = (LLSpatialGroup*) state->getListener(0); group->destroyGL(); + {OctreeGuard guard(group->mOctreeNode); for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { LLDrawable* drawable = *i; @@ -2197,6 +2202,7 @@ public: gPipeline.markRebuild(drawable, LLDrawable::REBUILD_ALL, TRUE); } } + } for (LLSpatialGroup::bridge_list_t::iterator i = group->mBridgeList.begin(); i != group->mBridgeList.end(); ++i) { @@ -2502,6 +2508,7 @@ void renderOctree(LLSpatialGroup* group) gGL.flush(); glLineWidth(1.f); gGL.flush(); + OctreeGuard guard(group->mOctreeNode); for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { LLDrawable* drawable = *i; @@ -3358,6 +3365,7 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume) void renderPhysicsShapes(LLSpatialGroup* group) { + OctreeGuard guard(group->mOctreeNode); for (LLSpatialGroup::OctreeNode::const_element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { LLDrawable* drawable = *i; @@ -3885,6 +3893,7 @@ public: } } + {OctreeGuard guard(branch); for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i) { LLDrawable* drawable = *i; @@ -3980,7 +3989,7 @@ public: } } } - } + }} for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i) { @@ -4070,6 +4079,7 @@ public: return; } + OctreeGuard guard(branch); for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i) { LLDrawable* drawable = *i; @@ -4293,6 +4303,7 @@ public: virtual void visit(const LLSpatialGroup::OctreeNode* branch) { + OctreeGuard guard(branch); for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getDataBegin(); i != branch->getDataEnd(); ++i) { check(*i); @@ -4303,6 +4314,7 @@ public: { node->accept(this); + OctreeGuard guard(node); for (U32 i = 0; i < node->getChildCount(); i++) { const LLSpatialGroup::OctreeNode* child = node->getChild(i); diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h index 890a52f0d..e6b018087 100644 --- a/indra/newview/llspatialpartition.h +++ b/indra/newview/llspatialpartition.h @@ -332,7 +332,7 @@ public: void dirtyMesh() { setState(MESH_DIRTY); } //octree wrappers to make code more readable - element_list& getData() { return mOctreeNode->getData(); } + //element_list& getData() { return mOctreeNode->getData(); } element_iter getDataBegin() { return mOctreeNode->getDataBegin(); } element_iter getDataEnd() { return mOctreeNode->getDataEnd(); } U32 getElementCount() const { return mOctreeNode->getElementCount(); } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 91abb8dc5..21f4738f8 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -999,6 +999,8 @@ bool idle_startup() LL_INFOS("AppInit") << "Attempting login as: " << firstname << " " << lastname << LL_ENDL; gDebugInfo["LoginName"] = firstname + " " + lastname; } + + LLScriptEdCore::parseFunctions("lsl_functions_sl.xml"); //Singu Note: This parsing function essentially replaces the entirety of the lscript_library library gHippoGridManager->setCurrentGridAsConnected(); gHippoLimits->setLimits(); @@ -1008,6 +1010,7 @@ bool idle_startup() LLTrans::setDefaultArg("[SECOND_LIFE]", gHippoGridManager->getConnectedGrid()->getGridName()); LLTrans::setDefaultArg("[SECOND_LIFE_GRID]", gHippoGridManager->getConnectedGrid()->getGridName() + " Grid"); LLTrans::setDefaultArg("[GRID_OWNER]", gHippoGridManager->getConnectedGrid()->getGridOwner()); + LLScriptEdCore::parseFunctions("lsl_functions_os.xml"); //Singu Note: This appends to the base functions parsed from lsl_functions_sl.xml } // create necessary directories diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index c33a668f5..8c932285b 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1025,6 +1025,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot, boo //when rendering next frame's occlusion queries for (U32 i = 0; i < 16; i++) { + gGLPreviousModelView[i] = gGLLastModelView[i]; gGLLastModelView[i] = gGLModelView[i]; gGLLastProjection[i] = gGLProjection[i]; } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 7e9cc32d0..e3a98c636 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -42,7 +42,7 @@ #include "llaudioengine.h" #include "llavatarnamecache.h" #include "indra_constants.h" -#include "lscript_byteformat.h" +#include "../lscript/lscript_byteformat.h" //Need LSCRIPTRunTimePermissionBits and SCRIPT_PERMISSION_* #include "llfloaterbump.h" #include "llassetstorage.h" @@ -2558,8 +2558,25 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) break; case IM_GROUP_INVITATION: { + // Read the binary bucket for more information. + struct invite_bucket_t + { + S32 membership_fee; + LLUUID role_id; + }* invite_bucket; + + // Make sure the binary bucket is the correct size. + if (binary_bucket_size != sizeof(invite_bucket_t)) + { + LL_WARNS("Messaging") << "Malformed group invite binary bucket" << LL_ENDL; + break; + } + + invite_bucket = (struct invite_bucket_t*) &binary_bucket[0]; + S32 membership_fee = ntohl(invite_bucket->membership_fee); + // NaCl - Antispam - if(antispam || gSavedSettings.getBOOL("AntiSpamGroupInvites")) + if(antispam || gSavedSettings.getBOOL("AntiSpamGroupInvites") || (membership_fee > 0 && gSavedSettings.getBOOL("AntiSpamGroupFeeInvites"))) return; // NaCl End //if (!is_linden && (is_busy || is_muted)) @@ -2571,22 +2588,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) else { LL_INFOS("Messaging") << "Received IM_GROUP_INVITATION message." << LL_ENDL; - // Read the binary bucket for more information. - struct invite_bucket_t - { - S32 membership_fee; - LLUUID role_id; - }* invite_bucket; - - // Make sure the binary bucket is the correct size. - if (binary_bucket_size != sizeof(invite_bucket_t)) - { - LL_WARNS("Messaging") << "Malformed group invite binary bucket" << LL_ENDL; - break; - } - - invite_bucket = (struct invite_bucket_t*) &binary_bucket[0]; - S32 membership_fee = ntohl(invite_bucket->membership_fee); LLSD payload; payload["transaction_id"] = session_id; diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 629e766d5..ae1fd1bdd 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -880,11 +880,14 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) LLMemType mt(LLMemType::MTYPE_OBJECT); // Update globals - LLViewerObject::setVelocityInterpolate( gSavedSettings.getBOOL("VelocityInterpolate") ); - LLViewerObject::setPingInterpolate( gSavedSettings.getBOOL("PingInterpolate") ); + static const LLCachedControl VelocityInterpolate("VelocityInterpolate"); + static const LLCachedControl PingInterpolate("PingInterpolate"); + LLViewerObject::setVelocityInterpolate( VelocityInterpolate ); + LLViewerObject::setPingInterpolate( PingInterpolate ); - F32 interp_time = gSavedSettings.getF32("InterpolationTime"); - F32 phase_out_time = gSavedSettings.getF32("InterpolationPhaseOut"); + static LLCachedControl interp_time("InterpolationTime"); + static LLCachedControl phase_out_time("InterpolationPhaseOut"); + if (interp_time < 0.0 || phase_out_time < 0.0 || phase_out_time > interp_time) @@ -896,7 +899,8 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) LLViewerObject::setPhaseOutUpdateInterpolationTime( interp_time ); LLViewerObject::setMaxUpdateInterpolationTime( phase_out_time ); - gAnimateTextures = gSavedSettings.getBOOL("AnimateTextures"); + static const LLCachedControl AnimateTextures("AnimateTextures"); + gAnimateTextures = AnimateTextures; // update global timer F32 last_time = gFrameTimeSeconds; diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 356cc6cac..25014b640 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -171,6 +171,7 @@ LLGLSLShader gPostColorFilterProgram(LLViewerShaderMgr::SHADER_EFFECT); //Not LLGLSLShader gPostNightVisionProgram(LLViewerShaderMgr::SHADER_EFFECT); //Not in mShaderList LLGLSLShader gPostGaussianBlurProgram(LLViewerShaderMgr::SHADER_EFFECT); //Not in mShaderList LLGLSLShader gPostPosterizeProgram(LLViewerShaderMgr::SHADER_EFFECT); //Not in mShaderList +LLGLSLShader gPostMotionBlurProgram(LLViewerShaderMgr::SHADER_EFFECT); //Not in mShaderList // Deferred rendering shaders LLGLSLShader gDeferredImpostorProgram(LLViewerShaderMgr::SHADER_DEFERRED); @@ -977,6 +978,26 @@ BOOL LLViewerShaderMgr::loadShadersEffects() gPostPosterizeProgram.uniform1i("tex0", 0); } } + + { + vector shaderUniforms; + shaderUniforms.reserve(3); + shaderUniforms.push_back("inv_proj"); + shaderUniforms.push_back("prev_proj"); + shaderUniforms.push_back("screen_res"); + + gPostMotionBlurProgram.mName = "Motion Blur Shader (Post)"; + gPostMotionBlurProgram.mShaderFiles.clear(); + gPostMotionBlurProgram.mShaderFiles.push_back(make_pair("effects/MotionBlurF.glsl", GL_FRAGMENT_SHADER_ARB)); + gPostMotionBlurProgram.mShaderFiles.push_back(make_pair("interface/onetexturenocolorV.glsl", GL_VERTEX_SHADER_ARB)); + gPostMotionBlurProgram.mShaderLevel = mVertexShaderLevel[SHADER_EFFECT]; + if(gPostMotionBlurProgram.createShader(NULL, &shaderUniforms)) + { + gPostMotionBlurProgram.bind(); + gPostMotionBlurProgram.uniform1i("tex0", 0); + gPostMotionBlurProgram.uniform1i("tex1", 1); + } + } #endif return success; diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index 6434dd619..9e9b0c8a3 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -645,6 +645,7 @@ void LLGrassPartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_count mFaceList.clear(); LLViewerCamera* camera = LLViewerCamera::getInstance(); + OctreeGuard guard(group->mOctreeNode); for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { LLDrawable* drawablep = *i; diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index 0a5a76900..f8c1f84a7 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -557,6 +557,7 @@ void LLParticlePartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_co mFaceList.clear(); LLViewerCamera* camera = LLViewerCamera::getInstance(); + OctreeGuard guard(group->mOctreeNode); for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { LLDrawable* drawablep = *i; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 1e1ca8bad..c7a7c44b0 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3494,6 +3494,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) LLFastTimer t(FTM_REBUILD_VOLUME_FACE_LIST); //get all the faces into a list + OctreeGuard guard(group->mOctreeNode); for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter) { LLDrawable* drawablep = *drawable_iter; @@ -3900,6 +3901,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) if (!LLPipeline::sDelayVBUpdate) { //drawables have been rebuilt, clear rebuild status + OctreeGuard guard(group->mOctreeNode); for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter) { LLDrawable* drawablep = *drawable_iter; @@ -3940,6 +3942,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) std::set mapped_buffers; + OctreeGuard guard(group->mOctreeNode); for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter) { LLDrawable* drawablep = *drawable_iter; @@ -4012,6 +4015,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) llwarns << "Not all mapped vertex buffers are unmapped!" << llendl ; warningsCount = 1; } + OctreeGuard guard(group->mOctreeNode); for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter) { LLDrawable* drawablep = *drawable_iter; @@ -4484,6 +4488,7 @@ void LLGeometryManager::addGeometryCount(LLSpatialGroup* group, U32 &vertex_coun //for each drawable + OctreeGuard guard(group->mOctreeNode); for (LLSpatialGroup::element_iter drawable_iter = group->getDataBegin(); drawable_iter != group->getDataEnd(); ++drawable_iter) { LLDrawable* drawablep = *drawable_iter; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 12f7c170e..d2004a187 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2820,6 +2820,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) else { group->setVisible(); + OctreeGuard guard(group->mOctreeNode); for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { markVisible(*i, camera); @@ -2908,6 +2909,7 @@ void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera) LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT); if (!sSkipUpdate && group->changeLOD()) { + OctreeGuard guard(group->mOctreeNode); for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) { LLDrawable* drawablep = *i; @@ -3044,6 +3046,7 @@ void forAllDrawables(LLCullResult::sg_iterator begin, { for (LLCullResult::sg_iterator i = begin; i != end; ++i) { + OctreeGuard guard((*i)->mOctreeNode); for (LLSpatialGroup::element_iter j = (*i)->getDataBegin(); j != (*i)->getDataEnd(); ++j) { func(*j); @@ -6706,7 +6709,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield, b { //combine result based on alpha if (multisample) { - mDeferredLight.bindTarget(); + mDeferredScreen.bindTarget(); glViewport(0, 0, mDeferredScreen.getWidth(), mDeferredScreen.getHeight()); } else @@ -6749,7 +6752,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield, b if (multisample) { - mDeferredLight.flush(); + mDeferredScreen.flush(); } } } @@ -6757,7 +6760,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield, b { if (multisample) { - mDeferredLight.bindTarget(); + mDeferredScreen.bindTarget(); } LLGLSLShader* shader = &gDeferredPostNoDoFProgram; @@ -6785,7 +6788,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield, b if (multisample) { - mDeferredLight.flush(); + mDeferredScreen.flush(); } } @@ -6806,7 +6809,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield, b S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mDeferredLight.getUsage()); if (channel > -1) { - mDeferredLight.bindTexture(0, channel); + mDeferredScreen.bindTexture(0, channel); } gGL.begin(LLRender::TRIANGLE_STRIP); diff --git a/indra/newview/skins/default/xui/en-us/floater_post_process.xml b/indra/newview/skins/default/xui/en-us/floater_post_process.xml index 12e3d8ad6..2cea1fbb7 100644 --- a/indra/newview/skins/default/xui/en-us/floater_post_process.xml +++ b/indra/newview/skins/default/xui/en-us/floater_post_process.xml @@ -1,230 +1,249 @@ - - - + can_resize="false" height="400" left="50" min_height="400" + min_width="300" mouse_opaque="true" name="Post-Process Floater" + title="Post-Process Settings" width="400"> + + + + + Gamma + + - Gamma - - - + bottom_delta="-20" drop_shadow_visible="true" follows="left|top|right" + font="SansSerif" h_pad="0" halign="left" height="16" + left="10" mouse_opaque="true" name="ColorFilterBrightnessText" v_pad="0" + width="355"> Brightness + height="18" increment="0.01" initial_val="1.0" label="" left="14" + max_val="4" min_val="0" mouse_opaque="true" name="brightness" + show_text="true" value="1.0" width="200" /> + bottom_delta="-20" drop_shadow_visible="true" follows="left|top|right" + font="SansSerif" h_pad="0" halign="left" height="16" + left="10" mouse_opaque="true" name="ColorFilterSaturationText" v_pad="0" + width="355"> Saturation + height="18" increment="0.01" initial_val="1.0" label="" left="14" + max_val="2" min_val="-1" mouse_opaque="true" + name="saturation" show_text="true" value="1.0" width="200" /> + bottom_delta="-20" drop_shadow_visible="true" follows="left|top|right" + font="SansSerif" h_pad="0" halign="left" height="16" + left="10" mouse_opaque="true" name="ColorFilterContrastText" v_pad="0" + width="355"> Contrast + decimal_digits="2" follows="left" height="18" increment="0.01" + initial_val="1.0" label="" left="14" max_val="4" min_val="0" + mouse_opaque="true" name="contrast" show_text="true" + value="1.0" width="200" /> - Contrast Base Colors + bottom_delta="-20" drop_shadow_visible="true" follows="left|top|right" + font="SansSerif" h_pad="0" halign="left" height="16" + left="10" mouse_opaque="true" name="ColorFilterBaseText" v_pad="0" + width="355"> + Contrast Base Colora + decimal_digits="3" follows="left" height="18" increment="0.01" + initial_val="1.0" label="R" left="14" max_val="1" min_val="0" + mouse_opaque="true" name="contrast_base[0]" show_text="true" value="1.0" + width="200" /> + decimal_digits="3" follows="left" height="18" increment="0.01" + initial_val="1.0" label="G" left="14" max_val="1" min_val="0" + mouse_opaque="true" name="contrast_base[1]" show_text="true" value="1.0" + width="200" /> + decimal_digits="3" follows="left" height="18" increment="0.01" + initial_val="1.0" label="B" left="14" max_val="1" min_val="0" + mouse_opaque="true" name="contrast_base[2]" show_text="true" value="1.0" + width="200" /> + decimal_digits="3" follows="left" height="18" increment="0.01" + initial_val="0.5" label="I" left="14" max_val="1" min_val="0" + mouse_opaque="true" name="contrast_base[3]" show_text="true" value="1.0" + width="200" /> - - + + + bottom_delta="-21" drop_shadow_visible="true" follows="left|top|right" + font="SansSerif" h_pad="0" halign="left" height="16" + left="10" mouse_opaque="true" name="GaussBlurPassesText" v_pad="0" + width="355"> Passes to apply + decimal_digits="0" follows="left" + height="18" increment="1" initial_val="9" label="" left="14" + max_val="25" min_val="1" mouse_opaque="true" + name="gauss_blur_passes" show_text="true" value="0.7" width="200" /> - - + + + bottom_delta="-21" drop_shadow_visible="true" follows="left|top|right" + font="SansSerif" h_pad="0" halign="left" height="16" + left="10" mouse_opaque="true" name="NightVisionBrightMultText" v_pad="0" + width="355"> Light Amplification Multiple - + + bottom_delta="-20" drop_shadow_visible="true" follows="left|top|right" + font="SansSerif" h_pad="0" halign="left" height="16" + left="10" mouse_opaque="true" name="NightVisionNoiseSizeText" v_pad="0" + width="355"> Noise Size - + + bottom_delta="-20" drop_shadow_visible="true" follows="left|top|right" + font="SansSerif" h_pad="0" halign="left" height="16" + left="10" mouse_opaque="true" name="NightVisionNoiseStrengthText" + v_pad="0" width="355"> Noise Strength - - - - - - Layer Count - - + + + + + Layer Count + + + + + + + Motionblur Strength + + + + decimal_digits="3" follows="left" height="18" increment="0.01" + initial_val="1.2" label="" left="14" max_val="10" min_val="0" + mouse_opaque="true" name="BloomStrength" show_text="true" value="1.0" + width="200" /> + --> - - -