When capturing, only serialise current state after updating context
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.
TurtleRockStudios/renderdoc_public,TurtleRockStudios/renderdoc_public,baldurk/renderdoc,googlestadia/renderdoc,googlestadia/renderdoc,TurtleRockStudios/renderdoc_public,Zorro666/renderdoc,baldurk/renderdoc,googlestadia/renderdoc,baldurk/renderdoc,Zorro666/renderdoc,TurtleRockStudios/renderdoc_public,baldurk/renderdoc,TurtleRockStudios/renderdoc_public,googlestadia/renderdoc,Zorro666/renderdoc,googlestadia/renderdoc,baldurk/renderdoc,TurtleRockStudios/renderdoc_public,Zorro666/renderdoc,Zorro666/renderdoc,Zorro666/renderdoc,baldurk/renderdoc,googlestadia/renderdoc