Force a remap if texture type changed even if format didn't

This commit is contained in:
baldurk
2020-10-02 14:39:06 +01:00
parent 501eeff658
commit c66dfec7f1
+3 -2
View File
@@ -2434,12 +2434,13 @@ void GLReplay::GetTextureData(ResourceId tex, const Subresource &sub,
remapFormat = GetViewCastedFormat(remapFormat, typeCast);
if(intFormat != remapFormat)
GLenum newtarget = (texType == eGL_TEXTURE_3D ? eGL_TEXTURE_3D : eGL_TEXTURE_2D);
if(intFormat != remapFormat || newtarget != texType)
{
MakeCurrentReplayContext(m_DebugCtx);
GLenum finalFormat = remapFormat;
GLenum newtarget = (texType == eGL_TEXTURE_3D ? eGL_TEXTURE_3D : eGL_TEXTURE_2D);
// create temporary texture of width/height in the new format to render to
drv.glGenTextures(1, &tempTex);