Restore compressed texture data while reading the capture file

This commit is contained in:
Janos Pantos
2017-10-05 17:36:19 +02:00
committed by Baldur Karlsson
parent 2901c3116a
commit 950c27719b
@@ -2969,6 +2969,10 @@ bool WrappedOpenGL::Serialise_glCompressedTextureImage2DEXT(GLuint texture, GLen
{
void *databuf = buf;
if(IsGLES)
StoreCompressedTexData(GetResourceManager()->GetLiveID(id), Target, Level, 0, 0, 0, Width,
Height, 0, fmt, byteSize, buf);
// if we didn't have data provided (this is invalid, but could happen if the data
// should have been sourced from an unpack buffer), then grow our scratch buffer if
// necessary and use that instead to make sure we don't pass NULL to glCompressedTexImage*
@@ -3224,6 +3228,10 @@ bool WrappedOpenGL::Serialise_glCompressedTextureImage3DEXT(GLuint texture, GLen
{
void *databuf = buf;
if(IsGLES)
StoreCompressedTexData(GetResourceManager()->GetLiveID(id), Target, Level, 0, 0, 0, Width,
Height, Depth, fmt, byteSize, buf);
// if we didn't have data provided (this is invalid, but could happen if the data
// should have been sourced from an unpack buffer), then grow our scratch buffer if
// necessary and use that instead to make sure we don't pass NULL to glCompressedTexImage*
@@ -5267,6 +5275,10 @@ bool WrappedOpenGL::Serialise_glCompressedTextureSubImage2DEXT(GLuint texture, G
SAFE_DELETE_ARRAY(unpackedPixels);
if(m_State == READING && IsGLES)
StoreCompressedTexData(GetResourceManager()->GetLiveID(id), Target, Level, xoff, yoff, 0, Width,
Height, 0, fmt, byteSize, buf);
if(m_State <= EXECUTING)
{
PixelUnpackState unpack;
@@ -5464,6 +5476,10 @@ bool WrappedOpenGL::Serialise_glCompressedTextureSubImage3DEXT(GLuint texture, G
SAFE_DELETE_ARRAY(unpackedPixels);
if(m_State == READING && IsGLES)
StoreCompressedTexData(GetResourceManager()->GetLiveID(id), Target, Level, xoff, yoff, zoff,
Width, Height, Depth, fmt, byteSize, buf);
if(m_State <= EXECUTING)
{
PixelUnpackState unpack;