diff --git a/renderdoc/driver/gl/wrappers/gl_interop_funcs.cpp b/renderdoc/driver/gl/wrappers/gl_interop_funcs.cpp index f2e6b56dc..484276fad 100644 --- a/renderdoc/driver/gl/wrappers/gl_interop_funcs.cpp +++ b/renderdoc/driver/gl/wrappers/gl_interop_funcs.cpp @@ -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