mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-03 10:57:52 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user