message: When capturing, only serialise current state after updating context
  * We need to be sure the context pair has been updated before serialising the
  state, otherwise any resources we query out will be associated with
  potentially the wrong context.
diff: @@ -1010,7 +1010,6 @@ void WrappedOpenGL::ActivateContext(GLWindowingData winData)
  if(winData.ctx)
  {
  - // if we're capturing, we need to serialise out the changed state vector
  if(IsActiveCapturing(m_State))
  {
  // fetch any initial states needed. Note this is insufficient, and doesn't handle the case
  @@ -1038,11 +1037,6 @@ void WrappedOpenGL::ActivateContext(GLWindowingData winData)
  RDCDEBUG("Prepared %zu resources on context/sharegroup %p, %zu left", before - after, ctx,
  after);
  }
  -
  - USE_SCRATCH_SERIALISER();
  - SCOPED_SERIALISE_CHUNK(GLChunk::MakeContextCurrent);
  - Serialise_BeginCaptureFrame(ser);
  - GetContextRecord()->AddChunk(scope.Get());
  }
  // also if there are any queued releases, process them now
  @@ -1278,6 +1272,15 @@ void WrappedOpenGL::ActivateContext(GLWindowingData winData)
  }
  }
  + // if we're capturing, we need to serialise out the changed state vector
  + if(IsActiveCapturing(m_State))
  + {
  + USE_SCRATCH_SERIALISER();
  + SCOPED_SERIALISE_CHUNK(GLChunk::MakeContextCurrent);
  + Serialise_BeginCaptureFrame(ser);
  + GetContextRecord()->AddChunk(scope.Get());
  + }
  +
  // this is hack but GL context creation is an *utter mess*. For first-frame captures, only
  // consider an attribs created context, to avoid starting capturing when the user is creating
  // dummy contexts to be able to create the real one.
  