From 16018bacf03d4683f6ac44870bc298ae1b3f7256 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 8 Mar 2018 22:36:04 +0000 Subject: [PATCH] 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. --- renderdoc/driver/gl/wrappers/gl_interop_funcs.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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