Fix serialisation of data updates in WGL_NV_DX_interop. Refs #904

* Technically this is a backwards incompatible change, but captures with
  these chunks before would have just been broken and fail to open, so
  it's not worth bumping the serialisation version and adding backwards
  compatible code for no reason.
This commit is contained in:
baldurk
2018-03-08 22:36:04 +00:00
parent ab7fa9e281
commit 16018bacf0
@@ -380,6 +380,7 @@ bool WrappedOpenGL::Serialise_wglDXLockObjectsNV(SerialiserType &ser, GLResource
}
SERIALISE_ELEMENT_ARRAY(Contents, length);
SERIALISE_ELEMENT(length);
SERIALISE_CHECK_READ_ERRORS();
@@ -436,9 +437,11 @@ bool WrappedOpenGL::Serialise_wglDXLockObjectsNV(SerialiserType &ser, GLResource
uint32_t size = (uint32_t)GetByteSize(width, height, depth, fmt, type);
int mips = 0;
if(IsReplayingAndReading())
if(!IsStructuredExporting(m_State))
mips = GetNumMips(gl, textype, tex, width, height, depth);
SERIALISE_ELEMENT(mips).Hidden();
byte *scratchBuf = NULL;
// on read and write, we allocate a single buffer big enough for all mips and re-use it