Fix emulating luminance format during replay

This commit is contained in:
Janos Pantos
2017-07-20 09:51:17 -07:00
committed by Baldur Karlsson
parent 5af1aa5cad
commit 6eac3dea9d
+5 -3
View File
@@ -1345,8 +1345,13 @@ bool GLResourceManager::Serialise_InitialState(ResourceId resid, GLResource res)
GLint immut = 0;
if(textype != eGL_TEXTURE_BUFFER)
{
gl.glGetTextureParameterivEXT(live, textype, eGL_TEXTURE_IMMUTABLE_FORMAT, &immut);
GLenum dummy;
EmulateLuminanceFormat(gl, live, textype, internalformat, dummy);
}
if(textype != eGL_TEXTURE_BUFFER && immut == 0)
{
GLsizei w = (GLsizei)width;
@@ -1433,9 +1438,6 @@ bool GLResourceManager::Serialise_InitialState(ResourceId resid, GLResource res)
gl.glBindTexture(textype, prevtex);
}
GLenum dummy;
EmulateLuminanceFormat(gl, tex, textype, internalformat, dummy);
// create texture of identical format/size to store initial contents
if(textype == eGL_TEXTURE_BUFFER || details.view)
{