Limit typecast on remap texture format to base type. Closes #1882

* Casting to e.g. unorm causes problems if we're remapping to RGBA16 because not
  all devices will support rendering to RGBA16_UNORM
This commit is contained in:
baldurk
2020-05-14 19:28:09 +01:00
parent 6b657965b1
commit 43e07b8a18
9 changed files with 46 additions and 18 deletions
+4 -1
View File
@@ -2293,7 +2293,7 @@ void ReplayProxy::RemapProxyTextureIfNeeded(TextureDescription &tex, GetTextureD
}
}
void ReplayProxy::EnsureTexCached(ResourceId &texid, CompType typeCast, const Subresource &sub)
void ReplayProxy::EnsureTexCached(ResourceId &texid, CompType &typeCast, const Subresource &sub)
{
if(m_Reader.IsErrored() || m_Writer.IsErrored())
return;
@@ -2365,6 +2365,9 @@ void ReplayProxy::EnsureTexCached(ResourceId &texid, CompType typeCast, const Su
m_TextureProxyCache.insert(entry);
}
if(proxyit->second.params.remap != RemapTexture::NoRemap)
typeCast = BaseRemapType(typeCast);
// change texid to the proxy texture's ID for passing to our proxy renderer
texid = proxyit->second.id;
}