message: Eliminate removeIf from barriers that slowed down opening captures
diff: @@ -702,6 +702,8 @@ void D3D12ResourceManager::SerialiseResourceStates(SerialiserType &ser,
  if(IsReplayingAndReading() && liveid != ResourceId())
  {
  for(size_t m = 0; m < States.size(); m++)
  + {
  + if(states[liveid][m] != States[m])
  {
  D3D12_RESOURCE_BARRIER b;
  b.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
  @@ -714,16 +716,12 @@ void D3D12ResourceManager::SerialiseResourceStates(SerialiserType &ser,
  barriers.push_back(b);
  }
  }
  + }
  if(ser.IsWriting())
  srcit++;
  }
  - // erase any do-nothing barriers
  - barriers.removeIf([](const D3D12_RESOURCE_BARRIER &barrier) {
  - return barrier.Transition.StateBefore == barrier.Transition.StateAfter;
  - });
  -
  ApplyBarriers(barriers, states);
  }
  