Reset pack state, not unpack state, when fetching texture data

This commit is contained in:
baldurk
2019-05-10 18:25:48 +01:00
parent 301e3b0b3a
commit 3b5dec17fc
+6 -4
View File
@@ -2488,10 +2488,12 @@ void GLReplay::GetTextureData(ResourceId tex, uint32_t arrayIdx, uint32_t mip,
// fetch and return data now
{
PixelUnpackState unpack;
unpack.Fetch(true);
MakeCurrentReplayContext(m_DebugCtx);
ResetPixelUnpackState(true, 1);
PixelPackState pack;
pack.Fetch(true);
ResetPixelPackState(true, 1);
if(texType == eGL_RENDERBUFFER)
{
@@ -2709,7 +2711,7 @@ void GLReplay::GetTextureData(ResourceId tex, uint32_t arrayIdx, uint32_t mip,
}
}
unpack.Apply(true);
pack.Apply(true);
drv.glBindTexture(texType, prevtex);
}