summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexturelist.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-01-30 13:56:05 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-01-30 13:56:05 -0500
commit3a7e3eacb86989c936cd6960cfa7434f3b8232fc (patch)
treeb6e237a645261aeb3e7f6e04201fd3a7baed8841 /indra/newview/llviewertexturelist.cpp
parent2f638300cd7e2c3ae675125ade037205403b5c54 (diff)
SH-3800 WIP - flag mismatched expectations for baked texture origins
Diffstat (limited to 'indra/newview/llviewertexturelist.cpp')
-rwxr-xr-xindra/newview/llviewertexturelist.cpp34
1 files changed, 32 insertions, 2 deletions
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<LLViewerFetchedTexture> 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<LLViewerFetchedTexture> 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) ;