diff options
author | Oz Linden <oz@lindenlab.com> | 2013-02-15 15:40:43 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2013-02-15 15:40:43 -0500 |
commit | 64a4a13397ea7b895ebbeb707bdba72e2d97ff6b (patch) | |
tree | ef28338a5a563a7b7bce2f8fb833e82a9385cf3c /indra/newview | |
parent | b7cd89da5f74663a9fd547af77afaed06cdb05fd (diff) |
fix crasher in setNumTEs
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/lldrawpoolmaterials.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llmaterialmgr.cpp | 27 | ||||
-rw-r--r-- | indra/newview/llpanelface.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llviewerobject.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llvovolume.cpp | 2 |
5 files changed, 27 insertions, 15 deletions
diff --git a/indra/newview/lldrawpoolmaterials.cpp b/indra/newview/lldrawpoolmaterials.cpp index e775346563..c5f4740afc 100644 --- a/indra/newview/lldrawpoolmaterials.cpp +++ b/indra/newview/lldrawpoolmaterials.cpp @@ -68,7 +68,7 @@ void LLDrawPoolMaterials::renderDeferred(S32 pass) switch (params.mDiffuseAlphaMode) { case 0: - LL_INFOS("Asdf") << "Renderererererrerererrrr!!!~!!!~!~" << LL_ENDL; + LL_DEBUGS("Asdf") << "Renderererererrerererrrr!!!~!!!~!~" << LL_ENDL; mShader = &gDeferredMaterialShinyNormal; break; case 1: // Alpha blending not supported in the opaque draw pool. diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp index 474e6b862e..cb628447bf 100644 --- a/indra/newview/llmaterialmgr.cpp +++ b/indra/newview/llmaterialmgr.cpp @@ -96,10 +96,12 @@ void LLMaterialsResponder::result(const LLSD& pContent) void LLMaterialsResponder::error(U32 pStatus, const std::string& pReason) { - LL_WARNS("Materials") << "--------------------------------------------------------------------------" << LL_ENDL; - LL_WARNS("Materials") << mMethod << " Error[" << pStatus << "] cannot access cap '" << MATERIALS_CAPABILITY_NAME - << "' with url '" << mCapabilityURL << "' because " << pReason << LL_ENDL; - LL_WARNS("Materials") << "--------------------------------------------------------------------------" << LL_ENDL; + LL_WARNS("Materials") + << "\n--------------------------------------------------------------------------\n" + << mMethod << " Error[" << pStatus << "] cannot access cap '" << MATERIALS_CAPABILITY_NAME + << "'\n with url '" << mCapabilityURL << "' because " << pReason + << "\n--------------------------------------------------------------------------" + << LL_ENDL; LLSD emptyResult; mCallback(false, emptyResult); @@ -144,6 +146,7 @@ const LLMaterialPtr LLMaterialMgr::get(const LLUUID& region_id, const LLMaterial get_queue_t::iterator itQueue = mGetQueue.find(region_id); if (mGetQueue.end() == itQueue) { + LL_DEBUGS("Materials") << "mGetQueue add region " << region_id << " pending " << material_id << LL_ENDL; std::pair<get_queue_t::iterator, bool> ret = mGetQueue.insert(std::pair<LLUUID, material_queue_t>(region_id, material_queue_t())); itQueue = ret.first; } @@ -171,6 +174,7 @@ boost::signals2::connection LLMaterialMgr::get(const LLUUID& region_id, const LL get_queue_t::iterator itQueue = mGetQueue.find(region_id); if (mGetQueue.end() == itQueue) { + LL_DEBUGS("Materials") << "mGetQueue inserting region "<<region_id<<" material id " << material_id << LL_ENDL; std::pair<get_queue_t::iterator, bool> ret = mGetQueue.insert(std::pair<LLUUID, material_queue_t>(region_id, material_queue_t())); itQueue = ret.first; } @@ -223,10 +227,10 @@ boost::signals2::connection LLMaterialMgr::getAll(const LLUUID& region_id, LLMat void LLMaterialMgr::put(const LLUUID& object_id, const U8 te, const LLMaterial& material) { - LL_DEBUGS("Materials") << "object " << object_id << LL_ENDL; put_queue_t::iterator itQueue = mPutQueue.find(object_id); if (mPutQueue.end() == itQueue) { + LL_DEBUGS("Materials") << "mPutQueue insert object " << object_id << LL_ENDL; mPutQueue.insert(std::pair<LLUUID, facematerial_map_t>(object_id, facematerial_map_t())); itQueue = mPutQueue.find(object_id); } @@ -372,7 +376,9 @@ void LLMaterialMgr::onGetAllResponse(bool success, const LLSD& content, const LL { mGetQueue.erase(itQueue); } - mGetAllRequested.insert(region_id); + + LL_DEBUGS("Materials")<< "recording that getAll has been done for region id " << region_id << LL_ENDL; + mGetAllRequested.insert(region_id); // prevents subsequent getAll requests for this region mGetAllPending.erase(region_id); // Invalidates region_id } @@ -477,6 +483,7 @@ void LLMaterialMgr::processGetQueue() } else if (mGetAllRequested.end() == mGetAllRequested.find(region_id)) { + LL_DEBUGS("Materials") << "calling getAll for " << regionp->getName() << LL_ENDL; getAll(region_id); continue; } @@ -496,7 +503,7 @@ void LLMaterialMgr::processGetQueue() material_queue_t::iterator loopMaterial = materials.begin(); if (materials.end() == loopMaterial) { - //LL_INFOS("Material") << "Get queue for region empty, trying next region." << LL_ENDL; + LL_DEBUGS("Material") << "Get queue for region empty, trying next region." << LL_ENDL; continue; } while ( (materials.end() != loopMaterial) && (materialsData.size() <= MATERIALS_GET_MAX_ENTRIES) ) @@ -506,7 +513,7 @@ void LLMaterialMgr::processGetQueue() materials.erase(itMaterial); mGetPending.insert(std::pair<pending_material_t, F64>(pending_material_t(region_id, *itMaterial), LLFrameTimer::getTotalSeconds())); } - + std::string materialString = zip_llsd(materialsData); S32 materialSize = materialString.size(); @@ -524,6 +531,7 @@ void LLMaterialMgr::processGetQueue() postData[MATERIALS_CAP_ZIP_FIELD] = materialBinary; LLHTTPClient::ResponderPtr materialsResponder = new LLMaterialsResponder("POST", capURL, boost::bind(&LLMaterialMgr::onGetResponse, this, _1, _2, region_id)); + LL_DEBUGS("Materials") << "POSTing to region '" << regionp->getName() << "' at '"<< capURL << "'\ndata: " << ll_pretty_print_sd(materialsData) << LL_ENDL; LLHTTPClient::post(capURL, postData, materialsResponder); } } @@ -557,7 +565,7 @@ void LLMaterialMgr::processGetAllQueue() continue; } - LL_DEBUGS("Materials") << "getAll for region " << region_id << LL_ENDL; + LL_DEBUGS("Materials") << "GET all for region " << region_id << "url " << capURL << LL_ENDL; LLHTTPClient::ResponderPtr materialsResponder = new LLMaterialsResponder("GET", capURL, boost::bind(&LLMaterialMgr::onGetAllResponse, this, _1, _2, *itRegion)); LLHTTPClient::get(capURL, materialsResponder); mGetAllPending.insert(std::pair<LLUUID, F64>(region_id, LLFrameTimer::getTotalSeconds())); @@ -657,6 +665,7 @@ void LLMaterialMgr::onRegionRemoved(LLViewerRegion* regionp) } } + LL_DEBUGS("Materials") << regionp->getName() << " id " << region_id << LL_ENDL; // Get all mGetAllQueue.erase(region_id); mGetAllRequested.erase(region_id); diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 7e9fe212dd..5c4c2693f8 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -1290,6 +1290,7 @@ void LLPanelFace::onMaterialLoaded(const LLMaterialID& material_id, const LLMate void LLPanelFace::updateMaterial() { + LL_WARNS("Materials") << LL_ENDL; if (mUpdateInFlight) { LL_WARNS("Materials") << "Attempt to update material while a previous update is pending ignored." << LL_ENDL; @@ -1351,7 +1352,7 @@ void LLPanelFace::updateMaterial() mMaterial->setEnvironmentIntensity((U8)(255*getChild<LLUICtrl>("environment")->getValue().asReal())); mMaterial->setDiffuseAlphaMode(getChild<LLComboBox>("combobox alphamode")->getCurrentIndex()); mMaterial->setAlphaMaskCutoff((U8)(getChild<LLUICtrl>("maskcutoff")->getValue().asInteger())); - llinfos << "Updating material: " << mMaterial->asLLSD() << llendl; + LL_DEBUGS("Materials") << "Updating material: " << mMaterial->asLLSD() << LL_ENDL; LLSelectMgr::getInstance()->selectionSetMaterial( mMaterial ); // We've sent an update. Need to hold off on any more until @@ -1363,7 +1364,7 @@ void LLPanelFace::updateMaterial() // The user has specified settings that don't need a material. if (mMaterial || !mMaterialID.isNull()) { - llinfos << "Resetting material entry" << llendl; + LL_DEBUGS("Materials") << "Resetting material entry" << LL_ENDL; mMaterial.reset(); mMaterialID = LLMaterialID::null; // Delete existing material entry... @@ -1657,6 +1658,7 @@ void LLPanelFace::onSelectTexture(const LLSD& data) void LLPanelFace::onCommitMaterialTexture( const LLSD& data ) { + LL_DEBUGS("Materials") << data << "\n" << (mUpdateInFlight ? "In Flight" : "Now Pending" ) << LL_ENDL; if (!mUpdateInFlight) { updateMaterial(); @@ -1682,6 +1684,7 @@ void LLPanelFace::onCancelMaterialTexture(const LLSD& data) void LLPanelFace::onSelectMaterialTexture(const LLSD& data) { + LL_DEBUGS("Materials") << data << LL_ENDL; if (!mUpdateInFlight) { updateMaterial(); diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 55d63601e6..f1b54e0e01 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -3947,8 +3947,8 @@ void LLViewerObject::setNumTEs(const U8 num_tes) else if (getNumTEs()) { new_images[i] = mTEImages[getNumTEs()-1]; - new_normmaps[i] = mTENormalMaps[i]; - new_specmaps[i] = mTESpecularMaps[i]; + new_normmaps[i] = mTENormalMaps[getNumTEs()-1]; + new_specmaps[i] = mTESpecularMaps[getNumTEs()-1]; } else { diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 45814a1aa3..f2ede46cfc 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2016,10 +2016,10 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID) { if (!pMaterialID.isNull()) { - LL_INFOS("Materials") << " " << pMaterialID.asString() << LL_ENDL; S32 res = LLViewerObject::setTEMaterialID(te, pMaterialID); if (res) { + LL_DEBUGS("MaterialTEs") << " " << pMaterialID.asString() << LL_ENDL; LLMaterialMgr::instance().get(getRegion()->getRegionID(), pMaterialID, boost::bind(&LLVOVolume::setTEMaterialParamsCallback, this, _1, _2)); gPipeline.markTextured(mDrawable); mFaceMappingChanged = TRUE; |