From 3a7e3eacb86989c936cd6960cfa7434f3b8232fc Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 30 Jan 2013 13:56:05 -0500 Subject: SH-3800 WIP - flag mismatched expectations for baked texture origins --- indra/newview/llviewertexturelist.cpp | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewertexturelist.cpp') diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index a65a90b9ab..4d79af5acc 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -374,7 +374,21 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string& } LLPointer imagep = findImage(new_id); - + + if (!imagep.isNull()) + { + LLViewerFetchedTexture *texture = imagep.get(); + if (texture->getUrl().empty()) + { + llwarns << "Requested texture " << new_id << " already exists but does not have a URL" << llendl; + } + else if (texture->getUrl() != url) + { + llwarns << "Requested texture " << new_id << " already exists with a different url, requested: " + << url << " current: " << texture->getUrl() << llendl; + } + + } if (imagep.isNull()) { switch(texture_type) @@ -436,7 +450,23 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id, } LLPointer imagep = findImage(image_id); - + if (!imagep.isNull()) + { + LLViewerFetchedTexture *texture = imagep.get(); + if (request_from_host.isOk() && + !texture->getTargetHost().isOk()) + { + llwarns << "Requested texture " << image_id << " already exists but does not have a host" << llendl; + } + else if (request_from_host.isOk() && + texture->getTargetHost().isOk() && + request_from_host != texture->getTargetHost()) + { + llwarns << "Requested texture " << image_id << " already exists with a different target host, requested: " + << request_from_host << " current: " << texture->getTargetHost() << llendl; + } + + } if (imagep.isNull()) { imagep = createImage(image_id, usemipmaps, boost_priority, texture_type, internal_format, primary_format, request_from_host) ; -- cgit v1.2.3